avalanche.evaluation.metrics.AMCAPluginMetric

class avalanche.evaluation.metrics.AMCAPluginMetric(classes=None, streams=None, ignore_validation=True)[source]

Plugin metric for the Average Mean Class Accuracy (AMCA).

The AMCA is tracked for the classes and streams defined in the constructor.

In addition, by default, the results obtained through the periodic evaluation (mid-training validation) mechanism are ignored.

__init__(classes=None, streams=None, ignore_validation=True)[source]

Instantiates the AMCA plugin metric.

Parameters
  • classes – The classes to track. Refer to MultiStreamAMCA for more details.

  • streams – The streams to track. Defaults to None, which means that all streams will be considered. Beware that, when creating instances of this class using the amca_metrics() helper, the resulting metric will only track the “test” stream by default.

  • ignore_validation – Defaults to True, which means that periodic evaluations will be ignored (recommended).

Methods

__init__([classes, streams, ignore_validation])

Instantiates the AMCA plugin metric.

after_backward(strategy)

after_eval(strategy)

after_eval_dataset_adaptation(strategy)

after_eval_exp(strategy)

after_eval_forward(strategy)

after_eval_iteration(strategy)

after_forward(strategy)

after_train_dataset_adaptation(strategy)

after_training(strategy)

after_training_epoch(strategy)

after_training_exp(strategy)

after_training_iteration(strategy)

after_update(strategy)

before_backward(strategy)

before_eval(strategy)

before_eval_dataset_adaptation(strategy)

before_eval_exp(strategy)

before_eval_forward(strategy)

before_eval_iteration(strategy)

before_forward(strategy)

before_train_dataset_adaptation(strategy)

before_training(strategy)

before_training_epoch(strategy)

before_training_exp(strategy)

before_training_iteration(strategy)

before_update(strategy)

metric_value_name(m_value)

reset(strategy)

Resets the metric internal state.

result(strategy)

Obtains the value of the metric.

update(strategy)

Attributes

VALUE_NAME