public class NumericAttributeFeature extends java.lang.Object implements Feature<double[]>
| Modifier and Type | Class and Description |
|---|---|
static class |
NumericAttributeFeature.Scaling
The types of data scaling.
|
| Constructor and Description |
|---|
NumericAttributeFeature(smile.data.Attribute[] attributes,
double[][] data)
Constructor.
|
NumericAttributeFeature(smile.data.Attribute[] attributes,
double lower,
double upper,
double[][] data)
Constructor.
|
NumericAttributeFeature(smile.data.Attribute[] attributes,
NumericAttributeFeature.Scaling scaling)
Constructor.
|
NumericAttributeFeature(smile.data.Attribute[] attributes,
NumericAttributeFeature.Scaling scaling,
double[][] data)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
smile.data.Attribute[] |
attributes()
Returns the variable attributes of generated features.
|
double |
f(double[] object,
int id)
Generates a feature for given object.
|
public NumericAttributeFeature(smile.data.Attribute[] attributes,
NumericAttributeFeature.Scaling scaling)
attributes - the variable attributes. Of which, numeric variables
will be scaled.scaling - the way of scaling. The scaling type must be NONE or
LOGARITHM because they do not need training data.public NumericAttributeFeature(smile.data.Attribute[] attributes,
NumericAttributeFeature.Scaling scaling,
double[][] data)
attributes - the variable attributes. Of which, numeric variables
will be scaled.scaling - the way of scaling.data - the training data to learn scaling parameters.public NumericAttributeFeature(smile.data.Attribute[] attributes,
double lower,
double upper,
double[][] data)
attributes - the variable attributes. Of which, numeric variables
will be normalized.lower - the lower limit in terms of percentiles of the original
distribution (say 5th percentile).upper - the upper limit in terms of percentiles of the original
distribution (say 95th percentile).data - the training data to learn scaling parameters.public NumericAttributeFeature(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.public smile.data.Attribute[] attributes()
Featureattributes in interface Feature<double[]>