bhepop2.enrichment.uniform
Simple uniform enrichment using a global distribution.
This enrichment method is not very interesting, but it provides a simple implementation of the enrichment logic. It also provides a good comparison point with other enrichment methods.
Module Contents
Classes
This class implements a simple enrichment using a global distribution. |
- class bhepop2.enrichment.uniform.SimpleUniformEnrichment(population: pandas.DataFrame, source, feature_name: str = None, seed=None)
Bases:
bhepop2.enrichment.base.SyntheticPopulationEnrichment
This class implements a simple enrichment using a global distribution.
Expected source types:
The global distribution describes the feature values of the whole population, using deciles (see
global_distribution
).To evaluate a feature value for an individual, we randomly choose one of the deciles, and then draw a random value between its two boundaries.
This method ensures a good distribution of the feature values over the total population, but no more.
- _evaluate_feature_on_population()
Evaluate a list of feature values for each individual.
- Returns:
iterable with same size and order than the population
- _draw_feature_value()