class documentation

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
samplesthe fiftyone.core.collections.SampleCollection used
configthe ClassificationEvaluationConfig used
eval_keythe evaluation key
ytruea list of ground truth labels
ypreda list of predicted labels
confsa list of confidences for the predictions
classesthe (neg_label, pos_label) label strings for the task
weightsan optional list of sample weights
ytrue_idsa list of IDs for the ground truth labels
ypred_idsa list of IDs for the predicted labels
custom_metricsan optional dict of custom metrics
backenda ClassificationEvaluation backend
Method __init__ Undocumented
Method average_precision Computes the average precision for the results via sklearn:sklearn.metrics.average_precision_score.
Method plot_pr_curve Plots a precision-recall (PR) curve for the results.
Method plot_roc_curve Plots a receiver operating characteristic (ROC) curve for the results.
Instance Variable scores Undocumented
Class Method _from_dict Subclass implementation of from_dict.
Method _parse_classes Undocumented
Instance Variable _pos_label Undocumented

Inherited from BaseClassificationResults (via ClassificationResults):

Method confusion_matrix 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_confusion_matrix Plots a confusion matrix for the evaluation results.
Method print_metrics Prints the metrics computed via metrics.
Method print_report 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_matrix Undocumented

Inherited from BaseEvaluationResults (via ClassificationResults, BaseClassificationResults):

Method _get_custom_metrics Undocumented
Method _print_metrics Undocumented

Inherited from BaseRunResults (via ClassificationResults, BaseClassificationResults, BaseEvaluationResults, EvaluationResults):

Class Method from_dict Builds a BaseRunResults from a JSON dict representation of it.
Static Method base_results_cls 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_config 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
def __init__(self, samples, config, eval_key, ytrue, ypred, confs, classes, weights=None, ytrue_ids=None, ypred_ids=None, custom_metrics=None, backend=None): (source)
def average_precision(self, average='micro'): (source)

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
def plot_pr_curve(self, average='micro', backend='plotly', **kwargs): (source)

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
def plot_roc_curve(self, backend='plotly', **kwargs): (source)

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

Undocumented

@classmethod
def _from_dict(cls, d, samples, config, eval_key, **kwargs): (source)

Subclass implementation of from_dict.

Parameters
da JSON dict
samplesthe fiftyone.core.collections.SampleCollection for the run
configthe BaseRunConfig for the run
eval_keyUndocumented
keythe run key
**kwargsUndocumented
Returns
a BaseRunResults
def _parse_classes(self, classes): (source)
_pos_label = (source)

Undocumented