public abstract class FeatureTransform
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
copy
If false, try to avoid a copy and do inplace transformation instead.
|
Constructor and Description |
---|
FeatureTransform()
Constructor.
|
FeatureTransform(boolean copy)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
learn(smile.data.Attribute[] attributes,
double[][] data)
Learns transformation parameters from a dataset.
|
void |
learn(double[][] data)
Learns transformation parameters from a dataset.
|
abstract double[] |
transform(double[] x)
Transform a feature vector.
|
double[][] |
transform(double[][] x)
Transform an array of feature vectors.
|
protected boolean copy
public FeatureTransform()
public FeatureTransform(boolean copy)
copy
- If false, try to avoid a copy and do inplace scaling instead.public void learn(double[][] data)
data
- The training data.public abstract void learn(smile.data.Attribute[] attributes, double[][] data)
attributes
- The variable attributes. Of which, numeric variables
will be standardized.data
- The training data to learn scaling parameters.
The data will not be modified.public abstract double[] transform(double[] x)
x
- a feature vector.public double[][] transform(double[][] x)
x
- an array of feature vectors. The feature
vectors may be modified on output if copy is false.