4.2.1. distlib¶
This module contains functions that compute distances and helpers.
| created: | August 2019 |
|---|---|
| last modified: | August 2019 |
-
distlib.filter_values(constraint, species, values)¶ Filter the values based upon the species and the wanted constraint:
- intersection: only the values present in all species are kept.
- atLeastTwo: keep the values present in at least two species.
- union: keep all values.
Note
This function is a generator.
Warning
If constraint is something else than intersection, atLeastTwo or union, then a ValueError exception is raised.
-
distlib.scaled_L2norm(species, values)¶ Compute the distances using the L2-norm scaled by the size with the values for all pairs of species.