package classification
- Alphabetic
- Public
- All
Type Members
-
sealed
trait
BinaryLogisticRegressionSummary extends LogisticRegressionSummary
:: Experimental :: Abstraction for binary logistic regression results for a given model.
:: Experimental :: Abstraction for binary logistic regression results for a given model.
Currently, the summary ignores the instance weights.
- Annotations
- @Experimental()
-
sealed
trait
BinaryLogisticRegressionTrainingSummary extends BinaryLogisticRegressionSummary with LogisticRegressionTrainingSummary
:: Experimental :: Abstraction for binary logistic regression training results.
:: Experimental :: Abstraction for binary logistic regression training results. Currently, the training summary ignores the training weights except for the objective trace.
- Annotations
- @Experimental()
-
abstract
class
ClassificationModel[FeaturesType, M <: ClassificationModel[FeaturesType, M]] extends PredictionModel[FeaturesType, M] with ClassifierParams
:: DeveloperApi ::
:: DeveloperApi ::
Model produced by a Classifier. Classes are indexed {0, 1, ..., numClasses - 1}.
- FeaturesType
Type of input features. E.g.,
Vector
- M
Concrete Model type
- Annotations
- @DeveloperApi()
-
abstract
class
Classifier[FeaturesType, E <: Classifier[FeaturesType, E, M], M <: ClassificationModel[FeaturesType, M]] extends Predictor[FeaturesType, E, M] with ClassifierParams
:: DeveloperApi ::
:: DeveloperApi ::
Single-label binary or multiclass classification. Classes are indexed {0, 1, ..., numClasses - 1}.
- FeaturesType
Type of input features. E.g.,
Vector
- E
Concrete Estimator type
- M
Concrete Model type
- Annotations
- @DeveloperApi()
-
class
DecisionTreeClassificationModel extends ProbabilisticClassificationModel[Vector, DecisionTreeClassificationModel] with DecisionTreeModel with DecisionTreeClassifierParams with MLWritable with Serializable
Decision tree model (http://en.wikipedia.org/wiki/Decision_tree_learning) for classification.
Decision tree model (http://en.wikipedia.org/wiki/Decision_tree_learning) for classification. It supports both binary and multiclass labels, as well as both continuous and categorical features.
- Annotations
- @Since( "1.4.0" )
-
class
DecisionTreeClassifier extends ProbabilisticClassifier[Vector, DecisionTreeClassifier, DecisionTreeClassificationModel] with DecisionTreeClassifierParams with DefaultParamsWritable
Decision tree learning algorithm (http://en.wikipedia.org/wiki/Decision_tree_learning) for classification.
Decision tree learning algorithm (http://en.wikipedia.org/wiki/Decision_tree_learning) for classification. It supports both binary and multiclass labels, as well as both continuous and categorical features.
- Annotations
- @Since( "1.4.0" )
-
class
GBTClassificationModel extends ProbabilisticClassificationModel[Vector, GBTClassificationModel] with GBTClassifierParams with TreeEnsembleModel[DecisionTreeRegressionModel] with MLWritable with Serializable
Gradient-Boosted Trees (GBTs) (http://en.wikipedia.org/wiki/Gradient_boosting) model for classification.
Gradient-Boosted Trees (GBTs) (http://en.wikipedia.org/wiki/Gradient_boosting) model for classification. It supports binary labels, as well as both continuous and categorical features.
- Annotations
- @Since( "1.6.0" )
- Note
Multiclass labels are not currently supported.
-
class
GBTClassifier extends ProbabilisticClassifier[Vector, GBTClassifier, GBTClassificationModel] with GBTClassifierParams with DefaultParamsWritable with Logging
Gradient-Boosted Trees (GBTs) (http://en.wikipedia.org/wiki/Gradient_boosting) learning algorithm for classification.
Gradient-Boosted Trees (GBTs) (http://en.wikipedia.org/wiki/Gradient_boosting) learning algorithm for classification. It supports binary labels, as well as both continuous and categorical features.
The implementation is based upon: J.H. Friedman. "Stochastic Gradient Boosting." 1999.
Notes on Gradient Boosting vs. TreeBoost:
- This implementation is for Stochastic Gradient Boosting, not for TreeBoost.
- Both algorithms learn tree ensembles by minimizing loss functions.
- TreeBoost (Friedman, 1999) additionally modifies the outputs at tree leaf nodes based on the loss function, whereas the original gradient boosting method does not.
- We expect to implement TreeBoost in the future: [https://issues.apache.org/jira/browse/SPARK-4240]
- Annotations
- @Since( "1.4.0" )
- Note
Multiclass labels are not currently supported.
-
class
LinearSVC extends Classifier[Vector, LinearSVC, LinearSVCModel] with LinearSVCParams with DefaultParamsWritable
:: Experimental ::
:: Experimental ::
This binary classifier optimizes the Hinge Loss using the OWLQN optimizer. Only supports L2 regularization currently.
- Annotations
- @Since( "2.2.0" ) @Experimental()
-
class
LinearSVCModel extends ClassificationModel[Vector, LinearSVCModel] with LinearSVCParams with MLWritable
:: Experimental :: Linear SVM Model trained by LinearSVC
:: Experimental :: Linear SVM Model trained by LinearSVC
- Annotations
- @Since( "2.2.0" ) @Experimental()
-
class
LogisticRegression extends ProbabilisticClassifier[Vector, LogisticRegression, LogisticRegressionModel] with LogisticRegressionParams with DefaultParamsWritable with Logging
Logistic regression.
Logistic regression. Supports:
- Multinomial logistic (softmax) regression.
- Binomial logistic regression.
This class supports fitting traditional logistic regression model by LBFGS/OWLQN and bound (box) constrained logistic regression model by LBFGSB.
- Annotations
- @Since( "1.2.0" )
-
class
LogisticRegressionModel extends ProbabilisticClassificationModel[Vector, LogisticRegressionModel] with LogisticRegressionParams with MLWritable
Model produced by LogisticRegression.
Model produced by LogisticRegression.
- Annotations
- @Since( "1.4.0" )
-
sealed
trait
LogisticRegressionSummary extends Serializable
:: Experimental :: Abstraction for logistic regression results for a given model.
:: Experimental :: Abstraction for logistic regression results for a given model.
Currently, the summary ignores the instance weights.
- Annotations
- @Experimental()
-
sealed
trait
LogisticRegressionTrainingSummary extends LogisticRegressionSummary
:: Experimental :: Abstraction for multiclass logistic regression training results.
:: Experimental :: Abstraction for multiclass logistic regression training results. Currently, the training summary ignores the training weights except for the objective trace.
- Annotations
- @Experimental()
-
class
MultilayerPerceptronClassificationModel extends ProbabilisticClassificationModel[Vector, MultilayerPerceptronClassificationModel] with Serializable with MLWritable
Classification model based on the Multilayer Perceptron.
Classification model based on the Multilayer Perceptron. Each layer has sigmoid activation function, output layer has softmax.
- Annotations
- @Since( "1.5.0" )
-
class
MultilayerPerceptronClassifier extends ProbabilisticClassifier[Vector, MultilayerPerceptronClassifier, MultilayerPerceptronClassificationModel] with MultilayerPerceptronParams with DefaultParamsWritable
Classifier trainer based on the Multilayer Perceptron.
Classifier trainer based on the Multilayer Perceptron. Each layer has sigmoid activation function, output layer has softmax. Number of inputs has to be equal to the size of feature vectors. Number of outputs has to be equal to the total number of labels.
- Annotations
- @Since( "1.5.0" )
-
class
NaiveBayes extends ProbabilisticClassifier[Vector, NaiveBayes, NaiveBayesModel] with NaiveBayesParams with DefaultParamsWritable
Naive Bayes Classifiers.
Naive Bayes Classifiers. It supports Multinomial NB (see here) which can handle finitely supported discrete data. For example, by converting documents into TF-IDF vectors, it can be used for document classification. By making every vector a binary (0/1) data, it can also be used as Bernoulli NB (see here). The input feature values must be nonnegative.
- Annotations
- @Since( "1.5.0" )
-
class
NaiveBayesModel extends ProbabilisticClassificationModel[Vector, NaiveBayesModel] with NaiveBayesParams with MLWritable
Model produced by NaiveBayes
Model produced by NaiveBayes
- Annotations
- @Since( "1.5.0" )
-
final
class
OneVsRest extends Estimator[OneVsRestModel] with OneVsRestParams with HasParallelism with MLWritable
Reduction of Multiclass Classification to Binary Classification.
Reduction of Multiclass Classification to Binary Classification. Performs reduction using one against all strategy. For a multiclass classification with k classes, train k models (one per class). Each example is scored against all k models and the model with highest score is picked to label the example.
- Annotations
- @Since( "1.4.0" )
-
final
class
OneVsRestModel extends Model[OneVsRestModel] with OneVsRestParams with MLWritable
Model produced by OneVsRest.
Model produced by OneVsRest. This stores the models resulting from training k binary classifiers: one for each class. Each example is scored against all k models, and the model with the highest score is picked to label the example.
- Annotations
- @Since( "1.4.0" )
-
abstract
class
ProbabilisticClassificationModel[FeaturesType, M <: ProbabilisticClassificationModel[FeaturesType, M]] extends ClassificationModel[FeaturesType, M] with ProbabilisticClassifierParams
:: DeveloperApi ::
:: DeveloperApi ::
Model produced by a ProbabilisticClassifier. Classes are indexed {0, 1, ..., numClasses - 1}.
- FeaturesType
Type of input features. E.g.,
Vector
- M
Concrete Model type
- Annotations
- @DeveloperApi()
-
abstract
class
ProbabilisticClassifier[FeaturesType, E <: ProbabilisticClassifier[FeaturesType, E, M], M <: ProbabilisticClassificationModel[FeaturesType, M]] extends Classifier[FeaturesType, E, M] with ProbabilisticClassifierParams
:: DeveloperApi ::
:: DeveloperApi ::
Single-label binary or multiclass classifier which can output class conditional probabilities.
- FeaturesType
Type of input features. E.g.,
Vector
- E
Concrete Estimator type
- M
Concrete Model type
- Annotations
- @DeveloperApi()
-
class
RandomForestClassificationModel extends ProbabilisticClassificationModel[Vector, RandomForestClassificationModel] with RandomForestClassifierParams with TreeEnsembleModel[DecisionTreeClassificationModel] with MLWritable with Serializable
Random Forest model for classification.
Random Forest model for classification. It supports both binary and multiclass labels, as well as both continuous and categorical features.
- Annotations
- @Since( "1.4.0" )
-
class
RandomForestClassifier extends ProbabilisticClassifier[Vector, RandomForestClassifier, RandomForestClassificationModel] with RandomForestClassifierParams with DefaultParamsWritable
Random Forest learning algorithm for classification.
Random Forest learning algorithm for classification. It supports both binary and multiclass labels, as well as both continuous and categorical features.
- Annotations
- @Since( "1.4.0" )
Value Members
-
object
DecisionTreeClassificationModel extends MLReadable[DecisionTreeClassificationModel] with Serializable
- Annotations
- @Since( "2.0.0" )
-
object
DecisionTreeClassifier extends DefaultParamsReadable[DecisionTreeClassifier] with Serializable
- Annotations
- @Since( "1.4.0" )
-
object
GBTClassificationModel extends MLReadable[GBTClassificationModel] with Serializable
- Annotations
- @Since( "2.0.0" )
-
object
GBTClassifier extends DefaultParamsReadable[GBTClassifier] with Serializable
- Annotations
- @Since( "1.4.0" )
-
object
LinearSVC extends DefaultParamsReadable[LinearSVC] with Serializable
- Annotations
- @Since( "2.2.0" )
-
object
LinearSVCModel extends MLReadable[LinearSVCModel] with Serializable
- Annotations
- @Since( "2.2.0" )
-
object
LogisticRegression extends DefaultParamsReadable[LogisticRegression] with Serializable
- Annotations
- @Since( "1.6.0" )
-
object
LogisticRegressionModel extends MLReadable[LogisticRegressionModel] with Serializable
- Annotations
- @Since( "1.6.0" )
-
object
MultilayerPerceptronClassificationModel extends MLReadable[MultilayerPerceptronClassificationModel] with Serializable
- Annotations
- @Since( "2.0.0" )
-
object
MultilayerPerceptronClassifier extends DefaultParamsReadable[MultilayerPerceptronClassifier] with Serializable
- Annotations
- @Since( "2.0.0" )
-
object
NaiveBayes extends DefaultParamsReadable[NaiveBayes] with Serializable
- Annotations
- @Since( "1.6.0" )
-
object
NaiveBayesModel extends MLReadable[NaiveBayesModel] with Serializable
- Annotations
- @Since( "1.6.0" )
-
object
OneVsRest extends MLReadable[OneVsRest] with Serializable
- Annotations
- @Since( "2.0.0" )
-
object
OneVsRestModel extends MLReadable[OneVsRestModel] with Serializable
- Annotations
- @Since( "2.0.0" )
-
object
RandomForestClassificationModel extends MLReadable[RandomForestClassificationModel] with Serializable
- Annotations
- @Since( "2.0.0" )
-
object
RandomForestClassifier extends DefaultParamsReadable[RandomForestClassifier] with Serializable
- Annotations
- @Since( "1.4.0" )