Package ai.sklearn4j.preprocessing.data
Class MaximumAbsoluteScaler
- java.lang.Object
-
- ai.sklearn4j.base.TransformerMixin<NumpyArray<Double>,NumpyArray<Double>>
-
- ai.sklearn4j.preprocessing.data.MaximumAbsoluteScaler
-
public class MaximumAbsoluteScaler extends TransformerMixin<NumpyArray<Double>,NumpyArray<Double>>
Scale each feature by its maximum absolute value. This estimator scales and translates each feature individually such that the maximal absolute value of each feature in the training set will be 1.0. It does not shift/center the data, and thus does not destroy any sparsity. This scaler can also be applied to sparse CSR or CSC matrices.
-
-
Constructor Summary
Constructors Constructor Description MaximumAbsoluteScaler()Instantiate a new object of MaximumAbsoluteScaler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]getFeatureNamesIn()Gets the Names of features seen during `fit`.NumpyArraygetMaxAbs()Gets the Per feature maximum absolute value.longgetNFeaturesIn()Gets the Number of features seen during `fit`.longgetNSamplesSeen()Gets the The number of samples processed by the estimator.NumpyArraygetScale()Gets the Per feature relative scaling of the data.NumpyArray<Double>inverseTransform(NumpyArray<Double> array)Takes a transformed array and reveres the transformation.voidsetFeatureNamesIn(String[] value)Sets the Names of features seen during `fit`.voidsetMaxAbs(NumpyArray value)Sets the Per feature maximum absolute value.voidsetNFeaturesIn(long value)Sets the Number of features seen during `fit`.voidsetNSamplesSeen(long value)Sets the The number of samples processed by the estimator.voidsetScale(NumpyArray value)Sets the Per feature relative scaling of the data.NumpyArray<Double>transform(NumpyArray<Double> array)Takes the input array and transforms it.
-
-
-
Method Detail
-
setScale
public void setScale(NumpyArray value)
Sets the Per feature relative scaling of the data.- Parameters:
value- The new value for scale.
-
getScale
public NumpyArray getScale()
Gets the Per feature relative scaling of the data.
-
setMaxAbs
public void setMaxAbs(NumpyArray value)
Sets the Per feature maximum absolute value.- Parameters:
value- The new value for maxAbs.
-
getMaxAbs
public NumpyArray getMaxAbs()
Gets the Per feature maximum absolute value.
-
setNFeaturesIn
public void setNFeaturesIn(long value)
Sets the Number of features seen during `fit`.- Parameters:
value- The new value for nFeaturesIn.
-
getNFeaturesIn
public long getNFeaturesIn()
Gets the Number of features seen during `fit`.
-
setFeatureNamesIn
public void setFeatureNamesIn(String[] value)
Sets the Names of features seen during `fit`. Defined only when `X` has feature names that are all strings.- Parameters:
value- The new value for featureNamesIn.
-
getFeatureNamesIn
public String[] getFeatureNamesIn()
Gets the Names of features seen during `fit`. Defined only when `X` has feature names that are all strings.
-
setNSamplesSeen
public void setNSamplesSeen(long value)
Sets the The number of samples processed by the estimator. Will be reset on new calls to fit, but increments across `partial_fit` calls.- Parameters:
value- The new value for nSamplesSeen.
-
getNSamplesSeen
public long getNSamplesSeen()
Gets the The number of samples processed by the estimator. Will be reset on new calls to fit, but increments across `partial_fit` calls.
-
transform
public NumpyArray<Double> transform(NumpyArray<Double> array)
Takes the input array and transforms it.- Specified by:
transformin classTransformerMixin<NumpyArray<Double>,NumpyArray<Double>>- Parameters:
array- The array to transform.- Returns:
- The transformed array.
-
inverseTransform
public NumpyArray<Double> inverseTransform(NumpyArray<Double> array)
Takes a transformed array and reveres the transformation.- Specified by:
inverseTransformin classTransformerMixin<NumpyArray<Double>,NumpyArray<Double>>- Parameters:
array- The array to apply reveres transform.- Returns:
- The inversed transform of array.
-
-