Table Of Contents
Table Of Contents

mxnet.metric.EvalMetric

class mxnet.metric.EvalMetric(name, output_names=None, label_names=None, **kwargs)[source]

Base class for all evaluation metrics.

Note

This is a base class that provides common metric interfaces. One should not use this class directly, but instead create new metric classes that extend it.

Parameters
  • name (str) – Name of this metric instance for display.

  • output_names (list of str, or None) – Name of predictions that should be used when updating with update_dict. By default include all predictions.

  • label_names (list of str, or None) – Name of labels that should be used when updating with update_dict. By default include all labels.

__init__(name, output_names=None, label_names=None, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(name[, output_names, label_names])

Initialize self.

get()

Gets the current evaluation result.

get_config()

Save configurations of metric.

get_global()

Gets the current global evaluation result.

get_global_name_value()

Returns zipped name and value pairs for global results.

get_name_value()

Returns zipped name and value pairs.

reset()

Resets the internal evaluation result to initial state.

reset_local()

Resets the local portion of the internal evaluation results to initial state.

update(labels, preds)

Updates the internal evaluation result.

update_dict(label, pred)

Update the internal evaluation with named label and pred