Class ProbabilisticClassifier<FeaturesType,E extends ProbabilisticClassifier<FeaturesType,E,M>,M extends ProbabilisticClassificationModel<FeaturesType,M>>

Type Parameters:
FeaturesType - Type of input features. E.g., Vector
E - Concrete Estimator type
M - Concrete Model type
All Implemented Interfaces:
Serializable, org.apache.spark.internal.Logging, ClassifierParams, ProbabilisticClassifierParams, Params, HasFeaturesCol, HasLabelCol, HasPredictionCol, HasProbabilityCol, HasRawPredictionCol, HasThresholds, PredictorParams, Identifiable, scala.Serializable
Direct Known Subclasses:
DecisionTreeClassifier, FMClassifier, GBTClassifier, LogisticRegression, MultilayerPerceptronClassifier, NaiveBayes, RandomForestClassifier

public abstract class ProbabilisticClassifier<FeaturesType,E extends ProbabilisticClassifier<FeaturesType,E,M>,M extends ProbabilisticClassificationModel<FeaturesType,M>> extends Classifier<FeaturesType,E,M> implements ProbabilisticClassifierParams
Single-label binary or multiclass classifier which can output class conditional probabilities.

See Also:
  • Constructor Details

    • ProbabilisticClassifier

      public ProbabilisticClassifier()
  • Method Details

    • probabilityCol

      public final Param<String> probabilityCol()
      Description copied from interface: HasProbabilityCol
      Param for Column name for predicted class conditional probabilities. Note: Not all models output well-calibrated probability estimates! These probabilities should be treated as confidences, not precise probabilities.
      Specified by:
      probabilityCol in interface HasProbabilityCol
    • setProbabilityCol

      public E setProbabilityCol(String value)
    • setThresholds

      public E setThresholds(double[] value)
    • thresholds

      public DoubleArrayParam thresholds()
      Description copied from interface: HasThresholds
      Param for Thresholds in multi-class classification to adjust the probability of predicting each class. Array must have length equal to the number of classes, with values &gt; 0 excepting that at most one value may be 0. The class with largest value p/t is predicted, where p is the original probability of that class and t is the class's threshold.
      Specified by:
      thresholds in interface HasThresholds