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#
|
|
|
|
|
|
Return the serializable config of the metric. |
|
Reset the state of the metric. |
|
|
Calculate the result of the metric. |
|
|
|
|
|
Update the state of the metric. |
Attributes#
- SpearmanCorrelationPerClass.dtype#
- SpearmanCorrelationPerClass.variables#
Methods#
- SpearmanCorrelationPerClass.add_variable(shape, initializer, dtype=None, aggregation='sum', name=None)#
- SpearmanCorrelationPerClass.add_weight(shape=(), initializer=None, dtype=None, name=None)#
- classmethod SpearmanCorrelationPerClass.from_config(config)#
- SpearmanCorrelationPerClass.get_config()#
Return the serializable config of the metric.
- SpearmanCorrelationPerClass.reset_state()#
Reset the state of the metric.
- SpearmanCorrelationPerClass.result()#
Calculate the result of the metric.
- SpearmanCorrelationPerClass.stateless_reset_state()#
- SpearmanCorrelationPerClass.stateless_result(metric_variables)#
- SpearmanCorrelationPerClass.stateless_update_state(metric_variables, *args, **kwargs)#
- 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).