class_docstr: Class for obtaining an Accuracy Matrix for the evaluation stream
class_docstr_tok: ["Class","for","obtaining","an","Accuracy","Matrix","for","the","evaluation","stream"]
docstr: Updates the matrix with the accuracy value for a given task pair.
  
  :param num_training_steps: The ID of the current training experience.
  :param eval_exp_id: The ID of the evaluation experience.
docstr_tok: ["Updates","the","matrix","with","the","accuracy","value","for","a","given","task","pair",".",":","param","num_training_steps",":","The","ID","of","the","current","training","experience",".",":","param","eval_exp_id",":","The","ID","of","the","evaluation","experience","."]
code: def update(self, num_training_steps, eval_exp_id):
      """Updates the matrix with the accuracy value for a given task pair.
  
      :param num_training_steps: The ID of the current training experience.
      :param eval_exp_id: The ID of the evaluation experience.
      """
      if (max(num_training_steps, eval_exp_id) + 1) > self.matrix.size(
          0
      ):
          self.add_new_task(max(num_training_steps, eval_exp_id) + 1)
  
      acc = self._accuracy.result()
      self.matrix[num_training_steps, eval_exp_id] = acc
  
      self._accuracy.reset()
  
file_path: avalanche/avalanche/evaluation/metrics/acc_matrix.py
imports: import torch
  from typing import List
  from avalanche.evaluation import PluginMetric
  from avalanche.evaluation.metric_results import MetricValue, MetricResult
  from avalanche.evaluation.metrics.accuracy import Accuracy
  from avalanche.training.templates import SupervisedTemplate
label_desc: Use image node_id 5 for calling the AccuracyMatrixPluginMetric obj's underlying member method code with example usage: obj.update(num_training_steps, eval_exp_id) without return types