Package ai.sklearn4j.utils
Class Preprocessings
- java.lang.Object
-
- ai.sklearn4j.utils.Preprocessings
-
public class Preprocessings extends Object
Utils method that scikit-learn provide to preprocess the data.
-
-
Constructor Summary
Constructors Constructor Description Preprocessings()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NumpyArray<Double>binarizeInput(NumpyArray<Double> x, double threshold)Binarize a numpy array based on a given threshold.
-
-
-
Method Detail
-
binarizeInput
public static NumpyArray<Double> binarizeInput(NumpyArray<Double> x, double threshold)
Binarize a numpy array based on a given threshold.- Parameters:
x- Array to be binarized.threshold- The threshold for binarization. If the value in x is greater than threshold, the target element is 1.0 otherwise is 0.0.- Returns:
- The binarized numpy array.
-
-