public class NumericAttributeFeature extends Object implements Feature<double[]>
Modifier and Type | Class and Description |
---|---|
static class |
NumericAttributeFeature.Scaling
The types of data scaling.
|
Constructor and Description |
---|
NumericAttributeFeature(Attribute[] attributes,
double[][] data)
Constructor.
|
NumericAttributeFeature(Attribute[] attributes,
double lower,
double upper,
double[][] data)
Constructor.
|
NumericAttributeFeature(Attribute[] attributes,
NumericAttributeFeature.Scaling scaling)
Constructor.
|
NumericAttributeFeature(Attribute[] attributes,
NumericAttributeFeature.Scaling scaling,
double[][] data)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Attribute[] |
attributes()
Returns the variable attributes of generated features.
|
double |
f(double[] object,
int id)
Generates a feature for given object.
|
public NumericAttributeFeature(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(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(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(Attribute[] attributes, double[][] data)
attributes
- the variable attributes. Of which, numeric variables
will be standardized.data
- the training data to learn scaling parameters.public Attribute[] attributes()
Feature
attributes
in interface Feature<double[]>
Copyright © 2015. All rights reserved.