crested.tl.metrics.SpearmanCorrelationPerClass#

class crested.tl.metrics.SpearmanCorrelationPerClass(num_classes, name='multiclass_spearman_correlation', **kwargs)#

Spearman correlation metric for multiclass models.

Attributes table#

Methods table#

reset_state()

Reset the state of the metric.

result()

Calculate the result of the metric.

update_state(y_true, y_pred[, sample_weight])

Update the state of the metric.

Attributes#

Methods#

SpearmanCorrelationPerClass.reset_state()#

Reset the state of the metric.

SpearmanCorrelationPerClass.result()#

Calculate the result of the metric.

SpearmanCorrelationPerClass.update_state(y_true, y_pred, sample_weight=None)#

Update the state of the metric.

Args:

y_true (tensor): Ground truth labels of shape (batch_size, num_classes). y_pred (tensor): Predicted outputs of shape (batch_size, num_classes).