RealLookAheadGeneralizedWeightedGenomicSelectionProblem#
- class pybrops.breed.prot.sel.prob.RealLookAheadGeneralizedWeightedGenomicSelectionProblem.RealLookAheadGeneralizedWeightedGenomicSelectionProblem(fndr_pgmat, fndr_algmod, mtprot, nparent, ncross, nprogeny, nsimul, ndecn, decn_space, decn_space_lower, decn_space_upper, nobj, obj_wt=None, obj_trans=None, obj_trans_kwargs=None, nineqcv=None, ineqcv_wt=None, ineqcv_trans=None, ineqcv_trans_kwargs=None, neqcv=None, eqcv_wt=None, eqcv_trans=None, eqcv_trans_kwargs=None, **kwargs)[source]#
Bases:
RealSelectionProblemdocstring for RealLookAheadGeneralizedWeightedGenomicSelectionProblem.
Constructor for RealLookAheadGeneralizedWeightedGenomicSelectionProblem.
- Parameters:
kwargs (dict) – Additional keyword arguments used for cooperative inheritance.
Methods
boundsdoEvaluate a candidate solution for the given Problem.
evaluatehas_boundshas_constraintsideal_pointScore a population of individuals based on Conventional Genomic Selection (CGS) (Meuwissen et al., 2001).
nadir_pointnamepareto_frontpareto_setAttributes
A callback function to be called after every evaluation.
Type of the variable to be evaluated.
Decision space boundaries.
Lower boundary of the decision space.
Upper boundary of the decision space.
Whether the evaluation function should be run elementwise.
A class that creates the function that evaluates a single individual.
A function that runs the function that evaluates a single individual.
Function which transforms outputs from
latentfnto equality constraint violation values.Keyword arguments for the latent space to equality constraint violation transformation function.
Equality constraint violation function weights.
attributes which are excluded from being serialized.
Founder genomic prediction model.
Founder genotypes.
Function which transforms outputs from
latentfnto inequality constraint violation values.Keyword arguments for the latent space to inequality constraint violation transformation function.
Inequality constraint violation function weights.
mtprot.
n_constrn_eq_constr.
Number of inequality constraints.
Number of objectives.
Number of decision variables.
ncross.
Number of decision variables.
Number of equality constraint violations.
Number of inequality constraint violation functions.
Number of latent variables.
Number of objectives.
nparent.
nprogeny.
Number of simulations to evaluate a candidate solution.
Function which transforms outputs from
latentfnto objective function values.Keyword arguments for the latent space to objective space transformation function.
Objective function weights.
replace_nan_values_by.
Whether the shapes are checked strictly.
Variables provided in their explicit form.
The variable type.
Lower boundary of the decision space.
Upper boundary of the decision space.
- property callback: Callable | None#
A callback function to be called after every evaluation.
- property data: dict#
Type of the variable to be evaluated.
- property decn_space: ndarray | None#
Decision space boundaries.
- property decn_space_lower: ndarray | None#
Lower boundary of the decision space.
- property decn_space_upper: ndarray | None#
Upper boundary of the decision space.
- property elementwise: bool#
Whether the evaluation function should be run elementwise.
- property elementwise_func: type#
A class that creates the function that evaluates a single individual.
- property elementwise_runner: Callable#
A function that runs the function that evaluates a single individual.
- property eqcv_trans: Callable[[ndarray, ndarray, dict], ndarray]#
Function which transforms outputs from
latentfnto equality constraint violation values.
- property eqcv_trans_kwargs: dict#
Keyword arguments for the latent space to equality constraint violation transformation function.
- property eqcv_wt: ndarray#
Equality constraint violation function weights.
- evalfn(x, *args, **kwargs)#
Evaluate a candidate solution for the given Problem.
This calculates three vectors which are to be minimized:
\[\mathbf{v_{obj}} = \mathbf{w_{obj} \odot T_{obj}(L(x))} \ \mathbf{v_{ineqcv}} = \mathbf{w_{ineqcv} \odot T_{ineqcv}(L(x))} \ \mathbf{v_{eqcv}} = \mathbf{w_{eqcv} \odot T_{eqcv}(L(x))}\]- Parameters:
x (numpy.ndarray) – A candidate solution vector of shape
(ndecn,).args (tuple) – Additional non-keyword arguments.
kwargs (dict) – Additional keyword arguments.
- Returns:
out – A tuple
(obj, ineqcv, eqcv).Where:
objis a numpy.ndarray of shape(nobj,)that containsobjective function evaluations. This is equivalent to \(\mathbf{v_{obj}}\)
ineqcvis a numpy.ndarray of shape(nineqcv,)that containsinequality constraint violation values. This is equivalent to \(\mathbf{v_{ineqcv}}\)
eqcvis a numpy.ndarray of shape(neqcv,)that containsequality constraint violation values. This is equivalent to \(\mathbf{v_{eqcv}}\)
- Return type:
tuple
- property exclude_from_serialization: Iterable | None#
attributes which are excluded from being serialized.
- property fndr_algmod: AdditiveLinearGenomicModel#
Founder genomic prediction model.
- property fndr_pgmat: PhasedGenotypeMatrix#
Founder genotypes.
- property ineqcv_trans: Callable[[ndarray, ndarray, dict], ndarray]#
Function which transforms outputs from
latentfnto inequality constraint violation values.
- property ineqcv_trans_kwargs: dict#
Keyword arguments for the latent space to inequality constraint violation transformation function.
- property ineqcv_wt: ndarray#
Inequality constraint violation function weights.
- latentfn(x, *args, **kwargs)[source]#
Score a population of individuals based on Conventional Genomic Selection (CGS) (Meuwissen et al., 2001). Scoring for CGS is defined as the sum of Genomic Estimated Breeding Values (GEBV) for a population.
- Parameters:
x (numpy.ndarray) – A candidate solution vector of shape
(ndecn,).args (tuple) – Additional non-keyword arguments.
kwargs (dict) – Additional keyword arguments.
- Returns:
out – A GEBV matrix of shape
(t,).Where:
tis the number of traits.
- Return type:
numpy.ndarray
- property mtprot: MatingProtocol#
mtprot.
- property n_eq_constr: Integral#
n_eq_constr.
- property n_ieq_constr: Integral#
Number of inequality constraints.
- property n_obj: Integral#
Number of objectives.
- property n_var: Integral#
Number of decision variables.
- property ncross: Integral#
ncross.
- property ndecn: Integral#
Number of decision variables.
- property neqcv: Integral#
Number of equality constraint violations.
- property nineqcv: Integral#
Number of inequality constraint violation functions.
- property nlatent: Integral#
Number of latent variables.
- property nobj: Integral#
Number of objectives.
- property nparent: Integral#
nparent.
- property nprogeny: Integral#
nprogeny.
- property nsimul: Integral#
Number of simulations to evaluate a candidate solution.
- property obj_trans: Callable[[ndarray, ndarray, dict], ndarray]#
Function which transforms outputs from
latentfnto objective function values.
- property obj_trans_kwargs: dict#
Keyword arguments for the latent space to objective space transformation function.
- property obj_wt: ndarray#
Objective function weights.
- property replace_nan_values_by: Real | None#
replace_nan_values_by.
- property strict: bool#
Whether the shapes are checked strictly.
- property vars: Container | None#
Variables provided in their explicit form.
- property vtype: type | None#
The variable type. So far, just used as a type hint.
- property xl: ndarray | None#
Lower boundary of the decision space.
- property xu: ndarray | None#
Upper boundary of the decision space.