SampledSelectionConfigurationMixin#
- class pybrops.breed.prot.sel.cfg.SampledSelectionConfigurationMixin.SampledSelectionConfigurationMixin[source]#
Bases:
object
A mixin class to provide functionality for selection configurations which require random samples to be drawn.
Methods
Sample a cross configuration from the decision vector and set it as the
xconfig
value.Attributes
A random number source.
Decision vector for calculating the cross configuration matrix.
- property rng: Generator | RandomState#
A random number source.
- abstract sample_xconfig(return_xconfig)[source]#
Sample a cross configuration from the decision vector and set it as the
xconfig
value.- Parameters:
return_xconfig (bool) – Whether to return the sampled
xconfig
matrix.- Returns:
out – The sampled
xconfig
matrix ifreturn_xconfig
is true, otherwise return nothing.- Return type:
numpy.ndarray, None
- property xconfig_decn: ndarray#
Decision vector for calculating the cross configuration matrix.