module documentation

Regression evaluation.

Copyright 2017-2025, Voxel51, Inc.

Class RegressionEvaluation Base class for regression evaluation methods.
Class RegressionEvaluationConfig Base class for configuring RegressionEvaluation instances.
Class RegressionResults Class that stores the results of a regression evaluation.
Class SimpleEvaluation Simple regression evaluation.
Class SimpleEvaluationConfig Base class for configuring SimpleEvaluation instances.
Function evaluate_regressions Evaluates the regression predictions in the given collection with respect to the specified ground truth values.
Variable logger Undocumented
Function _parse_config Undocumented
Function _parse_values Undocumented
Function _safe_mean Undocumented
def evaluate_regressions(samples, pred_field, gt_field='ground_truth', eval_key=None, missing=None, method=None, custom_metrics=None, progress=None, **kwargs): (source)

Evaluates the regression predictions in the given collection with respect to the specified ground truth values.

You can customize the evaluation method by passing additional parameters for the method's config class as kwargs.

The natively provided method values and their associated configs are:

If an eval_key is specified, then this method will record some statistics on each sample:

  • When evaluating sample-level fields, an eval_key field will be populated on each sample recording the error of that sample's prediction.
  • When evaluating frame-level fields, an eval_key field will be populated on each frame recording the error of that frame's prediction. In addition, an eval_key field will be populated on each sample that records the average error of the frame predictions of the sample.
Parameters
samplesa fiftyone.core.collections.SampleCollection
pred_fieldthe name of the field containing the predicted fiftyone.core.labels.Regression instances
gt_field:"ground_truth"the name of the field containing the ground truth fiftyone.core.labels.Regression instances
eval_key:Nonea string key to use to refer to this evaluation
missing:Nonea missing value. Any None-valued regressions are given this value for results purposes
method:Nonea string specifying the evaluation method to use. The supported values are fo.evaluation_config.regression_backends.keys() and the default is fo.evaluation_config.default_regression_backend
custom_metrics:Nonean optional list of custom metrics to compute or dict mapping metric names to kwargs dicts
progress:Nonewhether to render a progress bar (True/False), use the default value fiftyone.config.show_progress_bars (None), or a progress callback function to invoke instead
**kwargsoptional keyword arguments for the constructor of the RegressionEvaluationConfig being used
Returns
a RegressionResults

Undocumented

def _parse_config(pred_field, gt_field, method, **kwargs): (source)

Undocumented

def _parse_values(ytrue, ypred, *args, missing=None): (source)

Undocumented

def _safe_mean(values): (source)

Undocumented