class BinaryClassificationResults(ClassificationResults): (source)
Constructor: BinaryClassificationResults(samples, config, eval_key, ytrue, ...)
Class that stores the results of a binary classification evaluation.
Any missing ground truth or prediction labels are assumed to be examples of the negative class (with zero confidence, for predictions).
Parameters | |
samples | the fiftyone.core.collections.SampleCollection used |
config | the ClassificationEvaluationConfig used |
eval | the evaluation key |
ytrue | a list of ground truth labels |
ypred | a list of predicted labels |
confs | a list of confidences for the predictions |
classes | the (neg_label, pos_label) label strings for the task |
weights | an optional list of sample weights |
ytrue | a list of IDs for the ground truth labels |
ypred | a list of IDs for the predicted labels |
custom | an optional dict of custom metrics |
backend | a ClassificationEvaluation backend |
Method | __init__ |
Undocumented |
Method | average |
Computes the average precision for the results via sklearn:sklearn.metrics.average_precision_score . |
Method | plot |
Plots a precision-recall (PR) curve for the results. |
Method | plot |
Plots a receiver operating characteristic (ROC) curve for the results. |
Instance Variable | scores |
Undocumented |
Class Method | _from |
Subclass implementation of from_dict . |
Method | _parse |
Undocumented |
Instance Variable | _pos |
Undocumented |
Inherited from BaseClassificationResults
(via ClassificationResults
):
Method | confusion |
Generates a confusion matrix for the results via sklearn:sklearn.metrics.confusion_matrix . |
Method | metrics |
Computes classification metrics for the results, including accuracy, precision, recall, and F-beta score. |
Method | plot |
Plots a confusion matrix for the evaluation results. |
Method | print |
Prints the metrics computed via metrics . |
Method | print |
Prints a classification report for the results via sklearn:sklearn.metrics.classification_report . |
Method | report |
Generates a classification report for the results via sklearn:sklearn.metrics.classification_report . |
Instance Variable | ypred |
Undocumented |
Instance Variable | ytrue |
Undocumented |
Method | _confusion |
Undocumented |
Inherited from BaseEvaluationResults
(via ClassificationResults
, BaseClassificationResults
):
Method | _get |
Undocumented |
Method | _print |
Undocumented |
Inherited from BaseRunResults
(via ClassificationResults
, BaseClassificationResults
, BaseEvaluationResults
, EvaluationResults
):
Class Method | from |
Builds a BaseRunResults from a JSON dict representation of it. |
Static Method | base |
Returns the results class for the given run type. |
Method | attributes |
Returns the list of class attributes that will be serialized by serialize . |
Method | save |
Saves the results to the database. |
Method | save |
Saves these results config to the database. |
Property | cls |
The fully-qualified name of this BaseRunResults class. |
Property | config |
The BaseRunConfig for these results. |
Property | key |
The run key for these results. |
Property | samples |
The fiftyone.core.collections.SampleCollection associated with these results. |
Instance Variable | _backend |
Undocumented |
Instance Variable | _config |
Undocumented |
Instance Variable | _key |
Undocumented |
Instance Variable | _samples |
Undocumented |
Undocumented
Computes the average precision for the results via
sklearn:sklearn.metrics.average_precision_score
.
Parameters | |
average:"micro" | the averaging strategy to use |
Returns | |
the average precision |
Plots a precision-recall (PR) curve for the results.
Parameters | |
average:"micro" | the averaging strategy to use when computing average precision |
backend:"plotly" | the plotting backend to use. Supported values are ("plotly", "matplotlib") |
**kwargs | keyword arguments for the backend plotting method:
|
Returns | |
one of the following |
|
Plots a receiver operating characteristic (ROC) curve for the results.
Parameters | |
backend:"plotly" | the plotting backend to use. Supported values are ("plotly", "matplotlib") |
**kwargs | keyword arguments for the backend plotting method:
|
Returns | |
one of the following |
|
Subclass implementation of from_dict
.
Parameters | |
d | a JSON dict |
samples | the fiftyone.core.collections.SampleCollection
for the run |
config | the BaseRunConfig for the run |
eval | Undocumented |
key | the run key |
**kwargs | Undocumented |
Returns | |
a BaseRunResults |