mozilla / taar-lite

A lightweight version of the TAAR service intended for specific deployments with reduced feature visibility.
Mozilla Public License 2.0
2 stars 6 forks source link

Turn recommendation score tie breaking into a Treatment #48

Open dzeber opened 6 years ago

dzeber commented 6 years ago

The idea behind the Treatment class (currently on the dev branch) is to represent each of the transformations we apply to coinstallation graph separately, for clarity and modularity.

In this vein, we should convert the tie-breaking logic from _build_sorted_result_list into a Treatment which modifies the weights in the treated graph so as to break ties, ie resulting in a matrix with no repeated scores along any row. This would then be applied as the final treatment when building the treated graph.

This resolves #42 (assuming the ranking strings are not used elsewhere), since recommend() can then simply sort scores without worrying about ties.

birdsarah commented 5 years ago

Discussed on Sep 10. As we do not need to return ranking key, tie breaking can be a Treatment.