Catalano.MachineLearning.FeatureScaling
Class VectorNormalization
- java.lang.Object
-
- Catalano.MachineLearning.FeatureScaling.VectorNormalization
-
- All Implemented Interfaces:
- IFeatureScaling, java.io.Serializable
public class VectorNormalization extends java.lang.Object implements IFeatureScaling
Vector normalization. f(x) = 1 / ||x||- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description VectorNormalization()Initializes a new instance of the VectorNormalization class.VectorNormalization(int l)Initializes a new instance of the VectorNormalization class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description double[][]Apply(DecisionVariable[] variables, double[][] data)Apply the normalization.double[][]Apply(double[][] data)Apply the normalization.voidApplyInPlace(DecisionVariable[] variables, double[][] data)Apply the normalization in place of the original data.voidApplyInPlace(double[][] data)Apply the normalization in place of the original data.double[]Compute(DecisionVariable[] variables, double[] feature)Normalize the feature.double[]Compute(double[] feature)Normalize the feature.intgetOrder()Get the order of the normalization.voidsetOrder(int l)Set the order of the normalization.
-
-
-
Constructor Detail
-
VectorNormalization
public VectorNormalization()
Initializes a new instance of the VectorNormalization class.
-
VectorNormalization
public VectorNormalization(int l)
Initializes a new instance of the VectorNormalization class.- Parameters:
l- Order.
-
-
Method Detail
-
getOrder
public int getOrder()
Get the order of the normalization.- Returns:
- Order.
-
setOrder
public void setOrder(int l)
Set the order of the normalization.- Parameters:
l- Order.
-
Apply
public double[][] Apply(double[][] data)
Description copied from interface:IFeatureScalingApply the normalization.- Specified by:
Applyin interfaceIFeatureScaling- Parameters:
data- Data to be normalized.- Returns:
- Normalized data.
-
Apply
public double[][] Apply(DecisionVariable[] variables, double[][] data)
Description copied from interface:IFeatureScalingApply the normalization.- Specified by:
Applyin interfaceIFeatureScaling- Parameters:
variables- Decision variables.data- Data to be normalized.- Returns:
- Normalized. data.
-
ApplyInPlace
public void ApplyInPlace(double[][] data)
Description copied from interface:IFeatureScalingApply the normalization in place of the original data.- Specified by:
ApplyInPlacein interfaceIFeatureScaling- Parameters:
data- Data to be normalized.
-
ApplyInPlace
public void ApplyInPlace(DecisionVariable[] variables, double[][] data)
Description copied from interface:IFeatureScalingApply the normalization in place of the original data.- Specified by:
ApplyInPlacein interfaceIFeatureScaling- Parameters:
variables- Decision variables.data- Data to be normalized.
-
Compute
public double[] Compute(double[] feature)
Description copied from interface:IFeatureScalingNormalize the feature.- Specified by:
Computein interfaceIFeatureScaling- Parameters:
feature- Feature to be normalized.- Returns:
- Normalized feature.
-
Compute
public double[] Compute(DecisionVariable[] variables, double[] feature)
Description copied from interface:IFeatureScalingNormalize the feature.- Specified by:
Computein interfaceIFeatureScaling- Parameters:
variables- Decision variables.feature- Feature.- Returns:
- Normalized feature.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG