public class BinaryLogisticRegressionSummary extends Object implements LogisticRegressionSummary
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: 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.
Modifier and Type | Method and Description |
---|---|
double |
areaUnderROC()
Computes the area under the receiver operating characteristic (ROC) curve.
|
String |
featuresCol()
Field in "predictions" which gives the features of each instance as a vector.
|
Dataset<Row> |
fMeasureByThreshold()
Returns a dataframe with two fields (threshold, F-Measure) curve with beta = 1.0.
|
String |
labelCol()
Field in "predictions" which gives the true label of each instance (if available).
|
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> |
predictions()
Dataframe output by the model's `transform` method.
|
String |
probabilityCol()
Field in "predictions" which gives the probability of each class as a vector.
|
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.
|
public Dataset<Row> predictions()
LogisticRegressionSummary
predictions
in interface LogisticRegressionSummary
public String probabilityCol()
LogisticRegressionSummary
probabilityCol
in interface LogisticRegressionSummary
public String labelCol()
LogisticRegressionSummary
labelCol
in interface LogisticRegressionSummary
public String featuresCol()
LogisticRegressionSummary
featuresCol
in interface LogisticRegressionSummary
public Dataset<Row> roc()
Note: This ignores instance weights (setting all to 1.0) from LogisticRegression.weightCol
.
This will change in later Spark versions.
public double areaUnderROC()
Note: This ignores instance weights (setting all to 1.0) from LogisticRegression.weightCol
.
This will change in later Spark versions.
public Dataset<Row> pr()
Note: This ignores instance weights (setting all to 1.0) from LogisticRegression.weightCol
.
This will change in later Spark versions.
public Dataset<Row> fMeasureByThreshold()
Note: This ignores instance weights (setting all to 1.0) from LogisticRegression.weightCol
.
This will change in later Spark versions.
public Dataset<Row> precisionByThreshold()
Note: This ignores instance weights (setting all to 1.0) from LogisticRegression.weightCol
.
This will change in later Spark versions.
public Dataset<Row> recallByThreshold()
Note: This ignores instance weights (setting all to 1.0) from LogisticRegression.weightCol
.
This will change in later Spark versions.