Interface ClassificationSummary

All Superinterfaces:
Serializable
All Known Subinterfaces:
BinaryClassificationSummary, BinaryLogisticRegressionSummary, BinaryLogisticRegressionTrainingSummary, BinaryRandomForestClassificationSummary, BinaryRandomForestClassificationTrainingSummary, FMClassificationSummary, FMClassificationTrainingSummary, LinearSVCSummary, LinearSVCTrainingSummary, LogisticRegressionSummary, LogisticRegressionTrainingSummary, MultilayerPerceptronClassificationSummary, MultilayerPerceptronClassificationTrainingSummary, RandomForestClassificationSummary, RandomForestClassificationTrainingSummary
All Known Implementing Classes:
BinaryLogisticRegressionSummaryImpl, BinaryLogisticRegressionTrainingSummaryImpl, BinaryRandomForestClassificationSummaryImpl, BinaryRandomForestClassificationTrainingSummaryImpl, FMClassificationSummaryImpl, FMClassificationTrainingSummaryImpl, LinearSVCSummaryImpl, LinearSVCTrainingSummaryImpl, LogisticRegressionSummaryImpl, LogisticRegressionTrainingSummaryImpl, MultilayerPerceptronClassificationSummaryImpl, MultilayerPerceptronClassificationTrainingSummaryImpl, RandomForestClassificationSummaryImpl, RandomForestClassificationTrainingSummaryImpl

public interface ClassificationSummary extends Serializable
Abstraction for multiclass classification results for a given model.
  • Method Details

    • accuracy

      double accuracy()
      Returns accuracy. (equals to the total number of correctly classified instances out of the total number of instances.)
      Returns:
      (undocumented)
    • fMeasureByLabel

      double[] fMeasureByLabel(double beta)
      Returns f-measure for each label (category).
    • fMeasureByLabel

      double[] fMeasureByLabel()
      Returns f1-measure for each label (category).
    • falsePositiveRateByLabel

      double[] falsePositiveRateByLabel()
      Returns false positive rate for each label (category).
    • labelCol

      String labelCol()
      Field in "predictions" which gives the true label of each instance (if available).
    • labels

      double[] labels()
      Returns the sequence of labels in ascending order. This order matches the order used in metrics which are specified as arrays over labels, e.g., truePositiveRateByLabel.

      Note: In most cases, it will be values {0.0, 1.0, ..., numClasses-1}, However, if the training set is missing a label, then all of the arrays over labels (e.g., from truePositiveRateByLabel) will be of length numClasses-1 instead of the expected numClasses.

      Returns:
      (undocumented)
    • precisionByLabel

      double[] precisionByLabel()
      Returns precision for each label (category).
    • predictionCol

      String predictionCol()
      Field in "predictions" which gives the prediction of each class.
    • predictions

      Dataset<Row> predictions()
      Dataframe output by the model's transform method.
      Returns:
      (undocumented)
    • recallByLabel

      double[] recallByLabel()
      Returns recall for each label (category).
    • truePositiveRateByLabel

      double[] truePositiveRateByLabel()
      Returns true positive rate for each label (category).
    • weightCol

      String weightCol()
      Field in "predictions" which gives the weight of each instance.
    • weightedFMeasure

      double weightedFMeasure(double beta)
      Returns weighted averaged f-measure.
    • weightedFMeasure

      double weightedFMeasure()
      Returns weighted averaged f1-measure.
    • weightedFalsePositiveRate

      double weightedFalsePositiveRate()
      Returns weighted false positive rate.
    • weightedPrecision

      double weightedPrecision()
      Returns weighted averaged precision.
    • weightedRecall

      double weightedRecall()
      Returns weighted averaged recall. (equals to precision, recall and f-measure)
      Returns:
      (undocumented)
    • weightedTruePositiveRate

      double weightedTruePositiveRate()
      Returns weighted true positive rate. (equals to precision, recall and f-measure)
      Returns:
      (undocumented)