alphagov / govuk-related-links-recommender

Machine learning model to recommend related content
MIT License
19 stars 4 forks source link

Round off confidence scores to avoid floating-point errors when running tests #169

Closed maxf closed 2 years ago

maxf commented 2 years ago

This is to address tests failing randomly.

Given the random process used to compute confidence scores, they can slightly vary with no consequence on the final output. The related links tests aren't meant to check that, so we round off the confidence scores, so that it's the actual related links result that is compared.