class documentation

class EvaluationMetric(Operator): (source)

Constructor: EvaluationMetric(_builtin)

View In Hierarchy

Base class for evaluation metric operators.

Method cleanup Cleans up the results of the evaluation metric with the given key from the collection.
Method compute Computes the evaluation metric for the given collection.
Method get_fields Lists the fields that were populated by the evaluation metric with the given key, if any.
Method get_parameters Defines any necessary properties to collect this evaluation metric's parameters from a user during prompting.
Method parse_parameters Performs any necessary execution-time formatting to this evaluation metric's parameters.
Method rename Performs any necessary operations required to rename this evaluation metric's key.

Inherited from Operator:

Method __init__ Undocumented
Method add_secrets Adds secrets to the operator.
Method execute Executes the operator.
Method method_to_uri Converts a method name to a URI.
Method resolve_delegation Returns the resolved forced delegation flag.
Method resolve_execution_options Returns the resolved execution options.
Method resolve_input Returns the resolved input property.
Method resolve_output Returns the resolved output property.
Method resolve_placement Returns the resolved placement of the operator.
Method resolve_type Returns the resolved input or output property.
Method to_json Returns a JSON representation of the operator.
Instance Variable plugin_name Undocumented
Property builtin Whether the operator is builtin.
Property config The OperatorConfig for the operator.
Property name Undocumented
Property uri The unique identifier of the operator: plugin_name/operator_name.
Instance Variable _builtin Undocumented
Instance Variable _plugin_secrets Undocumented
def cleanup(self, samples, config, eval_key): (source)

Cleans up the results of the evaluation metric with the given key from the collection.

Parameters
samplesa fiftyone.core.collections.SampleCollection
configan fiftyone.core.evaluation.EvaluationMethodConfig
eval_keyan evaluation key
def compute(self, samples, results, **kwargs): (source)

Computes the evaluation metric for the given collection.

Parameters
samplesa fiftyone.core.collections.SampleCollection
resultsan fiftyone.core.evaluation.EvaluationResults
**kwargsarbitrary metric-specific parameters
Returns
an optional aggregate metric value to store on the results
def get_fields(self, samples, config, eval_key): (source)

Lists the fields that were populated by the evaluation metric with the given key, if any.

Parameters
samplesa fiftyone.core.collections.SampleCollection
configan fiftyone.core.evaluation.EvaluationMethodConfig
eval_keyan evaluation key
Returns
a list of fields
def get_parameters(self, ctx, inputs): (source)

Defines any necessary properties to collect this evaluation metric's parameters from a user during prompting.

Parameters
ctxan fiftyone.operators.ExecutionContext
inputsa fiftyone.operators.types.Property
def parse_parameters(self, ctx, params): (source)

Performs any necessary execution-time formatting to this evaluation metric's parameters.

Parameters
ctxan fiftyone.operators.ExecutionContext
paramsa params dict
def rename(self, samples, config, eval_key, new_eval_key): (source)

Performs any necessary operations required to rename this evaluation metric's key.

Parameters
samplesa fiftyone.core.collections.SampleCollection
configan fiftyone.core.evaluation.EvaluationMethodConfig
eval_keyan evaluation key
new_eval_keya new evaluation key