public class BinaryLogisticRegressionSummaryImpl extends LogisticRegressionSummaryImpl implements BinaryLogisticRegressionSummary
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.
Constructor and Description |
---|
BinaryLogisticRegressionSummaryImpl(Dataset<Row> predictions,
String probabilityCol,
String predictionCol,
String labelCol,
String featuresCol) |
Modifier and Type | Method and Description |
---|---|
double |
areaUnderROC()
Computes the area under the receiver operating characteristic (ROC) curve.
|
Dataset<Row> |
fMeasureByThreshold()
Returns a dataframe with two fields (threshold, F-Measure) curve with beta = 1.0.
|
Dataset<Row> |
pr()
Returns the precision-recall curve, which is a Dataframe containing
two fields recall, precision with (0.0, 1.0) prepended to it.
|
Dataset<Row> |
precisionByThreshold()
Returns a dataframe with two fields (threshold, precision) curve.
|
Dataset<Row> |
recallByThreshold()
Returns a dataframe with two fields (threshold, recall) curve.
|
Dataset<Row> |
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.
|
featuresCol, labelCol, predictionCol, predictions, probabilityCol
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accuracy, asBinary, falsePositiveRateByLabel, featuresCol, fMeasureByLabel, fMeasureByLabel, labelCol, labels, precisionByLabel, predictionCol, predictions, probabilityCol, recallByLabel, truePositiveRateByLabel, weightedFalsePositiveRate, weightedFMeasure, weightedFMeasure, weightedPrecision, weightedRecall, weightedTruePositiveRate
public double areaUnderROC()
BinaryLogisticRegressionSummary
areaUnderROC
in interface BinaryLogisticRegressionSummary
public Dataset<Row> fMeasureByThreshold()
BinaryLogisticRegressionSummary
fMeasureByThreshold
in interface BinaryLogisticRegressionSummary
public Dataset<Row> pr()
BinaryLogisticRegressionSummary
pr
in interface BinaryLogisticRegressionSummary
public Dataset<Row> precisionByThreshold()
BinaryLogisticRegressionSummary
precisionByThreshold
in interface BinaryLogisticRegressionSummary
public Dataset<Row> recallByThreshold()
BinaryLogisticRegressionSummary
recallByThreshold
in interface BinaryLogisticRegressionSummary
public Dataset<Row> roc()
BinaryLogisticRegressionSummary
roc
in interface BinaryLogisticRegressionSummary