SingleDatasetScalarPerformance#

class SingleDatasetScalarPerformance[source]#

Calculate a performance metric as a scalar for a given model and a given dataset.

Parameters
metric: Metric, default: None

An ignite.Metric object whose score should be used. If None is given, use the default metric.

reduce: torch function, default: None

The function to reduce the scores tensor into a single scalar. For metrics that return a scalar use None (default).

metric_name: str, default: None

A name for the metric to show in the check results.

reduce_name: str, default: None

A name for the reduce function to show in the check results.

__init__(metric: Optional[Metric] = None, reduce: Optional[Callable] = None, metric_name: Optional[str] = None, reduce_name: Optional[str] = None, **kwargs)[source]#
__new__(*args, **kwargs)#

Methods

SingleDatasetScalarPerformance.add_condition(...)

Add new condition function to the check.

SingleDatasetScalarPerformance.add_condition_greater_equal_to(...)

Add condition - the result is greater than the threshold.

SingleDatasetScalarPerformance.add_condition_greater_than(...)

Add condition - the result is greater than the threshold.

SingleDatasetScalarPerformance.add_condition_less_equal_to(...)

Add condition - the result is greater than the threshold.

SingleDatasetScalarPerformance.add_condition_less_than(...)

Add condition - the result is greater than the threshold.

SingleDatasetScalarPerformance.clean_conditions()

Remove all conditions from this check instance.

SingleDatasetScalarPerformance.compute(...)

Compute the metric result using the ignite metrics compute method and reduce to a scalar.

SingleDatasetScalarPerformance.conditions_decision(result)

Run conditions on given result.

SingleDatasetScalarPerformance.finalize_check_result(...)

Finalize the check result by adding the check instance and processing the conditions.

SingleDatasetScalarPerformance.initialize_run(...)

Initialize the metric for the check, and validate task type is relevant.

SingleDatasetScalarPerformance.metadata([...])

Return check metadata.

SingleDatasetScalarPerformance.name()

Name of class in split camel case.

SingleDatasetScalarPerformance.params([...])

Return parameters to show when printing the check.

SingleDatasetScalarPerformance.remove_condition(index)

Remove given condition by index.

SingleDatasetScalarPerformance.run(dataset)

Run check.

SingleDatasetScalarPerformance.update(...)

Update the metrics by passing the batch to ignite metric update method.

Examples#