public static class GridUtil.QuantileTransformer extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<GridUtil.QuantileTransformer>
Constructor and Description |
---|
QuantileTransformer(int nQuantiles,
int subsample)
Create an empty quantile transformer with the specified number of quantiles and subsample.
|
QuantileTransformer(int nQuantiles,
int subsample,
double[] references,
double[] quantiles)
Construct a quantile transformer from an existing internal representation.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Clears the cache of transformers.
|
int |
compareTo(GridUtil.QuantileTransformer other) |
<I> void |
fit(I x) |
int |
getColInputCount() |
int |
getColOutputCount() |
GridUtil.QuantileTransformer |
getQuantileTransformerFromCache(GridUtil.QuantileTransformer transformer)
Stores transformers in a private cache.
|
void |
shutdown() |
<I,O> O |
transform(I x,
java.lang.Class<O> returnType,
boolean rowMajorOrder) |
public QuantileTransformer(int nQuantiles, int subsample)
nQuantiles
- Number of quantilessubsample
- Number of subsamplespublic QuantileTransformer(int nQuantiles, int subsample, double[] references, double[] quantiles)
nQuantiles
- Number of quantilessubsample
- Number of subsamplesreferences
- The referencesquantiles
- The quantilespublic GridUtil.QuantileTransformer getQuantileTransformerFromCache(GridUtil.QuantileTransformer transformer)
compareTo==0
with transformer
then the cached object will be
returned. Otherwise transformer
will be returned. QuantileTransformer
constructor private, set your local
transformer to the result of this cache method to prevent duplicating transformers in memory.
transformer
- The transformerpublic void clearCache()
public <I> void fit(I x)
public <I,O> O transform(I x, java.lang.Class<O> returnType, boolean rowMajorOrder)
public int getColInputCount()
public int getColOutputCount()
public void shutdown()
public int compareTo(GridUtil.QuantileTransformer other)
compareTo
in interface java.lang.Comparable<GridUtil.QuantileTransformer>