spearman_correlation
[ allennlp.training.metrics.spearman_correlation ]
SpearmanCorrelation Objects#
class SpearmanCorrelation(Metric):
| def __init__(self) -> None
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
get_metric#
| @overrides
| def get_metric(self, reset: bool = False)
Returns
- The accumulated sample Spearman correlation.
reset#
| @overrides
| def reset(self)