Probing Intra Model Metrics

Available Metrics

Accuracy

Metric Name: probe_ably.core.metrics.selectivity.SelectivityMetric

class probe_ably.core.metrics.accuracy.AccuracyMetric[source]
calculate_metrics(targets: numpy.array, predicitons: numpy.array, **kwargs)float[source]

Calculates and returns accruacy score

Parameters
  • targets (np.array) – Gold target scores

  • predicitons (np.array) – Predictions data

Returns

Returns accuracy score

Return type

float

metric_name()[source]

Returns the name of metric. Used for visualization purposes

Returns

Metric name

Return type

str

Implementing New Metrics

You need to extend and implement the following class

class probe_ably.core.metrics.abstract_intra_model_metric.AbstractIntraModelMetric[source]
abstract calculate_metrics(targets: numpy.array, predicitons: numpy.array, **kwargs)[source]

Abstract method that calcuate the intra model metric

Parameters
  • targets (np.array) – Gold labels of data

  • predicitons (np.array) – Predictions of data

Returns

Intra model metric score

Return type

float

abstract metric_name()[source]

Abstract method returns the name of metric. Used for visualization purposes

Returns

Metric name

Return type

str

Once implemented you can use the full class name in the configuration file