rxn.metrics.context_metrics.identical_fraction
- rxn.metrics.context_metrics.identical_fraction(ground_truth, prediction)[source]
For context prediction models, fraction of compounds that are identical to the ground truth.
The concept of overlap is hard to define uniquely; this is a tentative implementation for getting an idea of how the models behave.
As denominator, takes the size of whichever list is larger.
- Parameters
ground_truth (
str
) –prediction (
str
) –
- Return type
float