class_docstr: This `Metric` calculates the sample Spearman correlation coefficient (r)
  between two tensors. Each element in the two tensors is assumed to be
  a different observation of the variable (i.e., the input tensors are
  implicitly flattened into vectors and the correlation is calculated
  between the vectors).
  
  <https://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient>
class_docstr_tok: ["This","`","Metric","`","calculates","the","sample","Spearman","correlation","coefficient","(","r",")","between","two","tensors",".","Each","element","in","the","two","tensors","is","assumed","to","be","a","different","observation","of","the","variable","(","i.e.",",","the","input","tensors","are","implicitly","flattened","into","vectors","and","the","correlation","is","calculated","between","the","vectors",")",".","<","https",":","\/\/en.wikipedia.org\/wiki\/Spearman","%","27s_rank_correlation_coefficient",">"]
code: def __init__(self) -> None:
      super().__init__()
      self.total_predictions = torch.zeros(0)
      self.total_gold_labels = torch.zeros(0)
  
file_path: allennlp/allennlp/training/metrics/spearman_correlation.py
imports: from typing import Optional
  import torch
  import torch.distributed
  import scipy.stats
  from allennlp.common.util import is_distributed
  from allennlp.training.metrics.metric import Metric
label_desc: Use image node_id 1 to create a new SpearmanCorrelation object from inherited base classes: Metric with example: obj = SpearmanCorrelation()