class documentation

Class that stores the results of a regression evaluation.

Parameters
samplesthe fiftyone.core.collections.SampleCollection used
configthe RegressionEvaluationConfig used
eval_keythe evaluation key
ytruea list of ground truth values
ypreda list of predicted values
confsan optional list of confidences for the predictions
eval_keythe evaluation key of the evaluation
gt_fieldthe name of the ground truth field
pred_fieldthe name of the predictions field
idsa list of sample or frame IDs corresponding to the regressions
missinga missing value. Any None-valued regressions are given this value for results purposes
custom_metricsan optional dict of custom metrics
backenda RegressionEvaluation backend
Method __init__ Undocumented
Method metrics Computes various popular regression metrics for the results.
Method plot_results Plots the regression results.
Method print_metrics Prints the metrics computed via metrics.
Instance Variable confs Undocumented
Instance Variable ids Undocumented
Instance Variable missing Undocumented
Instance Variable ypred Undocumented
Instance Variable ytrue Undocumented
Class Method _from_dict Subclass implementation of from_dict.

Inherited from BaseEvaluationResults:

Method _get_custom_metrics Undocumented
Method _print_metrics Undocumented

Inherited from BaseRunResults (via 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=None, ids=None, missing=None, custom_metrics=None, backend=None): (source)
def metrics(self, weights=None): (source)

Computes various popular regression metrics for the results.

The computed metrics are:

  • Mean squared error: sklearn:sklearn.metrics.mean_squared_error
  • Root mean squared error: sklearn:sklearn.metrics.mean_squared_error
  • Mean absolute error: sklearn:sklearn.metrics.mean_absolute_error
  • Median absolute error: sklearn:sklearn.metrics.median_absolute_error
  • R^2 score: sklearn:sklearn.metrics.r2_score
  • Explained variance score: sklearn:sklearn.metrics.explained_variance_score
  • Max error: sklearn:sklearn.metrics.max_error
  • Support: the number of examples

Also includes any custom metrics from custom_metrics.

Parameters
weights:Nonean optional list of weights for each example
Returns
a dict
def plot_results(self, labels=None, sizes=None, backend='plotly', **kwargs): (source)

Plots the regression results.

You can use the labels parameters to define a coloring for the points, and you can use the sizes parameter to scale the sizes of the points.

You can attach plots generated by this method to an App session via its fiftyone.core.session.Session.plots attribute, which will automatically sync the session's view with the currently selected points in the plot.

Parameters
labels:None

data to use to color the points. Can be any of the following:

sizes:None

data to use to scale the sizes of the points. Can be any of the following:

backend:"plotly"the plotting backend to use. Supported values are ("plotly", "matplotlib")
**kwargs

keyword arguments for the backend plotting method:

Returns
an fiftyone.core.plots.base.InteractivePlot
def print_metrics(self, weights=None, digits=2): (source)

Prints the metrics computed via metrics.

Parameters
weights:Nonean optional list of weights for each example
digits:2the number of digits of precision to print

Undocumented

Undocumented

Undocumented

Undocumented

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