class_docstr: Computes heatmap accuracy for keypoint
  Parameters
  ----------
  axis : int, default=1
      The axis that represents classes
  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.
  ignore_labels : int or iterable of integers, optional
      If provided as not None, will ignore these labels during update.
  Examples
  --------
  >>> predicts = [mx.nd.array([[0.3, 0.7], [0, 1.], [0.4, 0.6]])]
  >>> labels   = [mx.nd.array([0, 1, 1])]
  >>> acc = mx.metric.Accuracy()
  >>> acc.update(preds = predicts, labels = labels)
  >>> print acc.get()
  ('accuracy', 0.6666666666666666)
class_docstr_tok: ["Computes","heatmap","accuracy","for","keypoint","Parameters","--","--","--","--","--","axis",":","int",",","default=1","The","axis","that","represents","classes","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",".","ignore_labels",":","int","or","iterable","of","integers",",","optional","If","provided","as","not","None",",","will","ignore","these","labels","during","update",".","Examples","--","--","--","--",">",">",">","predicts","=","[","mx.nd.array","(","[","[","0.3",",","0.7","]",",","[","0",",","1",".","]",",","[","0.4",",","0.6","]","]",")","]",">",">",">","labels","=","[","mx.nd.array","(","[","0",",","1",",","1","]",")","]",">",">",">","acc","=","mx.metric.Accuracy","(",")",">",">",">","acc.update","(","preds","=","predicts",",","labels","=","labels",")",">",">",">","print","acc.get","(",")","(","'accuracy","'",",","0.6666666666666666",")"]
code: def _dist_acc(self, dists):
      dist_cal = np.not_equal(dists, -1)
      num_dist_cal = dist_cal.sum()
      if num_dist_cal > 0:
          return (
              np.less(dists[dist_cal], self.threshold).sum()
              * 1.0
              / num_dist_cal
          )
      else:
          return -1
  
imports: import numpy
label_desc: Use image node_id 3 for calling the HeatmapAccuracy obj's underlying member method code with example usage: obj._dist_acc(dists) and returns: unknown, unknown