rxn.metrics.metrics.class_diversity

rxn.metrics.metrics.class_diversity(ground_truth, predictions, predicted_classes)[source]

Compute the class diversity values, split by n-th predictions.

Raises

ValueError – if the list sizes are incompatible, forwarded from get_sequence_multiplier().

Return type

Tuple[Dict[int, float], Dict[int, float]]

Returns

Tuple of Dictionaries of class diversity “n” values and standard deviation (std) “n” values. Here the standard deviation is the measure of how much the average class diversity can change from one sample to the other.

Parameters
  • ground_truth (Sequence[TypeVar(T)]) –

  • predictions (Sequence[TypeVar(T)]) –

  • predicted_classes (Sequence[str]) –