rxn.metrics.true_reactant_accuracy.true_reactant_accuracy

rxn.metrics.true_reactant_accuracy.true_reactant_accuracy(ground_truth_mapped, predictions_mapped)[source]

Compute the top-n “true reactant” accuracy values (i.e. discarding reagents).

Parameters
  • ground_truth_mapped (Sequence[str]) – list of atom-mapped reactions from the ground truth.

  • predictions_mapped (Sequence[str]) – list of atom-mapped reactions from the predictions.

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.