Package ai.sklearn4j.base
Class ClassifierMixin
- java.lang.Object
-
- ai.sklearn4j.base.ClassifierMixin
-
- Direct Known Subclasses:
BaseNaiveBayes
public abstract class ClassifierMixin extends Object
Mixin class for all classifiers in scikit-learn.
-
-
Constructor Summary
Constructors Constructor Description ClassifierMixin()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract NumpyArray<Long>predict(NumpyArray<Double> x)Perform classification on an array of test vectors X.abstract NumpyArray<Double>predictLogProbabilities(NumpyArray<Double> x)Return log-probability estimates for the test vector X.abstract NumpyArray<Double>predictProbabilities(NumpyArray<Double> x)Return probability estimates for the test vector X.
-
-
-
Method Detail
-
predict
public abstract NumpyArray<Long> predict(NumpyArray<Double> x)
Perform classification on an array of test vectors X.- Parameters:
x- Array-like of shape (n_samples, n_features) The input samples.- Returns:
- NumpyArray of shape (n_samples,) Predicted target values for X.
-
predictLogProbabilities
public abstract NumpyArray<Double> predictLogProbabilities(NumpyArray<Double> x)
Return log-probability estimates for the test vector X.- Parameters:
x- array-like of shape (n_samples, n_features) The input samples.- Returns:
- array-like of shape (n_samples, n_classes) Returns the log-probability of the samples for each class in the model. The columns correspond to the classes in sorted order, as they appear in the attribute :term:`classes_`.
-
predictProbabilities
public abstract NumpyArray<Double> predictProbabilities(NumpyArray<Double> x)
Return probability estimates for the test vector X.- Parameters:
x- array-like of shape (n_samples, n_features) The input samples.- Returns:
- array-like of shape (n_samples, n_classes) Returns the probability of the samples for each class in the model. The columns correspond to the classes in sorted order, as they appear in the attribute :term:`classes_`.
-
-