rxn.metrics.metrics.top_n_accuracy
- rxn.metrics.metrics.top_n_accuracy(ground_truth, predictions)[source]
Compute the top-n accuracy values.
- Raises
ValueError – if the list sizes are incompatible, forwarded from get_sequence_multiplier().
- Return type
Dict
[int
,float
]- Returns
Dictionary of top-n accuracy values.
- Parameters
ground_truth (
Sequence
[TypeVar
(T
)]) –predictions (
Sequence
[TypeVar
(T
)]) –