pyspark.ml.classification.
RandomForestClassificationSummary
Abstraction for RandomForestClassification Results for a given model.
New in version 3.1.0.
Methods
fMeasureByLabel([beta])
fMeasureByLabel
Returns f-measure for each label (category).
weightedFMeasure([beta])
weightedFMeasure
Returns weighted averaged f-measure.
Attributes
accuracy
Returns accuracy.
falsePositiveRateByLabel
Returns false positive rate for each label (category).
labelCol
Field in “predictions” which gives the true label of each instance.
labels
Returns the sequence of labels in ascending order.
precisionByLabel
Returns precision for each label (category).
predictionCol
Field in “predictions” which gives the prediction of each class.
predictions
Dataframe outputted by the model’s transform method.
recallByLabel
Returns recall for each label (category).
truePositiveRateByLabel
Returns true positive rate for each label (category).
weightCol
Field in “predictions” which gives the weight of each instance as a vector.
weightedFalsePositiveRate
Returns weighted false positive rate.
weightedPrecision
Returns weighted averaged precision.
weightedRecall
Returns weighted averaged recall.
weightedTruePositiveRate
Returns weighted true positive rate.
Methods Documentation
Attributes Documentation
Returns accuracy. (equals to the total number of correctly classified instances out of the total number of instances.)
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.
Notes
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 weighted averaged recall. (equals to precision, recall and f-measure)
Returns weighted true positive rate. (equals to precision, recall and f-measure)