SampledSelectionConfigurationMixin#
- class pybrops.breed.prot.sel.cfg.SampledSelectionConfigurationMixin.SampledSelectionConfigurationMixin[source]#
Bases:
objectA 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
xconfigvalue.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
xconfigvalue.- Parameters:
return_xconfig (bool) – Whether to return the sampled
xconfigmatrix.- Returns:
out – The sampled
xconfigmatrix ifreturn_xconfigis true, otherwise return nothing.- Return type:
numpy.ndarray, None
- property xconfig_decn: ndarray#
Decision vector for calculating the cross configuration matrix.