Class BinaryLogisticRegressionSummaryImpl
Object
org.apache.spark.ml.classification.LogisticRegressionSummaryImpl
org.apache.spark.ml.classification.BinaryLogisticRegressionSummaryImpl
- All Implemented Interfaces:
Serializable
,BinaryClassificationSummary
,BinaryLogisticRegressionSummary
,ClassificationSummary
,LogisticRegressionSummary
- Direct Known Subclasses:
BinaryLogisticRegressionTrainingSummaryImpl
public class BinaryLogisticRegressionSummaryImpl
extends LogisticRegressionSummaryImpl
implements BinaryLogisticRegressionSummary
Binary logistic regression results for a given model.
param: predictions dataframe output by the model's transform
method.
param: probabilityCol field in "predictions" which gives the probability of
each class as a vector.
param: predictionCol field in "predictions" which gives the prediction of
each class as a double.
param: labelCol field in "predictions" which gives the true label of each instance.
param: featuresCol field in "predictions" which gives the features of each instance as a vector.
param: weightCol field in "predictions" which gives the weight of each instance.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Computes the area under the receiver operating characteristic (ROC) curve.Returns a dataframe with two fields (threshold, F-Measure) curve with beta = 1.0.pr()
Returns the precision-recall curve, which is a Dataframe containing two fields recall, precision with (0.0, 1.0) prepended to it.Returns a dataframe with two fields (threshold, precision) curve.Returns a dataframe with two fields (threshold, recall) curve.roc()
Returns the receiver operating characteristic (ROC) curve, which is a Dataframe having two fields (FPR, TPR) with (0.0, 0.0) prepended and (1.0, 1.0) appended to it.Methods inherited from class org.apache.spark.ml.classification.LogisticRegressionSummaryImpl
featuresCol, labelCol, predictionCol, predictions, probabilityCol, weightCol
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.spark.ml.classification.BinaryLogisticRegressionSummary
scoreCol
Methods inherited from interface org.apache.spark.ml.classification.ClassificationSummary
accuracy, falsePositiveRateByLabel, fMeasureByLabel, fMeasureByLabel, labelCol, labels, precisionByLabel, predictionCol, predictions, recallByLabel, truePositiveRateByLabel, weightCol, weightedFalsePositiveRate, weightedFMeasure, weightedFMeasure, weightedPrecision, weightedRecall, weightedTruePositiveRate
Methods inherited from interface org.apache.spark.ml.classification.LogisticRegressionSummary
asBinary, featuresCol, probabilityCol
-
Constructor Details
-
BinaryLogisticRegressionSummaryImpl
-
-
Method Details
-
areaUnderROC
public double areaUnderROC()Description copied from interface:BinaryClassificationSummary
Computes the area under the receiver operating characteristic (ROC) curve.- Specified by:
areaUnderROC
in interfaceBinaryClassificationSummary
- Returns:
- (undocumented)
-
fMeasureByThreshold
Description copied from interface:BinaryClassificationSummary
Returns a dataframe with two fields (threshold, F-Measure) curve with beta = 1.0.- Specified by:
fMeasureByThreshold
in interfaceBinaryClassificationSummary
- Returns:
- (undocumented)
-
pr
Description copied from interface:BinaryClassificationSummary
Returns the precision-recall curve, which is a Dataframe containing two fields recall, precision with (0.0, 1.0) prepended to it.- Specified by:
pr
in interfaceBinaryClassificationSummary
- Returns:
- (undocumented)
-
precisionByThreshold
Description copied from interface:BinaryClassificationSummary
Returns a dataframe with two fields (threshold, precision) curve. Every possible probability obtained in transforming the dataset are used as thresholds used in calculating the precision.- Specified by:
precisionByThreshold
in interfaceBinaryClassificationSummary
- Returns:
- (undocumented)
-
recallByThreshold
Description copied from interface:BinaryClassificationSummary
Returns a dataframe with two fields (threshold, recall) curve. Every possible probability obtained in transforming the dataset are used as thresholds used in calculating the recall.- Specified by:
recallByThreshold
in interfaceBinaryClassificationSummary
- Returns:
- (undocumented)
-
roc
Description copied from interface:BinaryClassificationSummary
Returns the receiver operating characteristic (ROC) curve, which is a Dataframe having two fields (FPR, TPR) with (0.0, 0.0) prepended and (1.0, 1.0) appended to it. See http://en.wikipedia.org/wiki/Receiver_operating_characteristic- Specified by:
roc
in interfaceBinaryClassificationSummary
- Returns:
- (undocumented)
-