I hereby claim:
- I am foliea on github.
- I am foliea (https://keybase.io/foliea) on keybase.
- I have a public key ASB1vTkkkGbHy_0HV1UgdHXvBAKkWzQA-ElWd1WlybpgJAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| def euclidean_distance(flat, target, criteria) | |
| sum_of_squares = criteria.sum do |criterion| | |
| (flat[criterion] - target[criterion]) ** 2 | |
| end | |
| Math.sqrt(sum_of_squares) | |
| end | |
| def rank_flats(flats, target) | |
| criteria = target.keys |