Closed pawelbielski closed 4 years ago
Good job @pierretoussing! Code in both calculations.py
and similarity_metrics.py
reads very well.
I like your clean definition of calculate_pointwise_similarity()
using calculate_series_similarity()
.
When updating new similarity measure current solution requires updating 2 docstrings in calculations.py
and dictionary in similarity_measures.py
. Maybe instead of passing string as an argument, you could pass just the similarity function directly? This would save you some documentation effort later.
You can find the styleguide here.
Most important aspects:
[x] snake_case for function and variable names
[x] active verb for functions (not nouns)
[x] full names for variables (exception indices)
[x] docstring format as defined in guide
[x] pylint python formatter (line length 120, not 80)
The goal is that your code reads like an algorithm. Consider dividing complex transformations into few simplier steps for code clarity (if it does not hurt the performance).