Index functions

Utility module with common index functions.

chromax.index_functions.phenotype_index(simulator, environments: ndarray) Callable[source]

Function to select based on phenotyping with some environments.

Parameters:
  • simulator (chromax.Simulator) – chromax simulator instance to use for phenotyping simulation.

  • environments – environments created using create_environments method from the simulator.

Returns:

the phenotyping index function to use for selection.

Return type:

Callable[[Population[“n”]], Float[Array, “n”]]

chromax.index_functions.conventional_index(GEBV_model: TraitModel)[source]

Function to select based on Genomic Estimated Breeding Value (GEBV).

Parameters:

GEBV_model (chromax.TraitModel) – GEBV model to estimate the genomic breeding value. It must return a single value for an individual, i.e. estimate a single trait.

Returns:

the conventional genomic selection index function.

Return type:

Callable[[Population[“n”]], Float[Array, “n”]]

chromax.index_functions.visual_selection(simulator, noise_factor: int = 1, seed: int = None) Callable[source]

Function to select based on visual selection.

Practically, this is similar to phenotyping but with more noise.

Parameters:
  • simulator (chromax.Simulator) – chromax simulator instance to use for phenotyping simulation.

  • noise_factor (int) – variance ratio between the phenotype and artificial noise added to simulate visual selection inaccuracy.

  • seed (int) – random seed for reproducibility.

Returns:

the visual selection index function.

Return type:

Callable[[Population[“n”]], Float[Array, “n”]]