-
Notifications
You must be signed in to change notification settings - Fork 0
check_uncertainty_constraint
check_uncertainty_constraint(z, w, omega, tol, debug)
Given a solution to a robust OCS problem, this checks the gap in the relaxed term associated with robustness.
In our model for robust genetic selection we relax the objective term
-
z : float
Auxiliary variable$z$ from a solution to the robust selection problem. -
w : ndarray
Portfolio vector$\mathbf{w}$ from a solution to the robust selection problem. -
omega : ndarray
Covariance matrix$\Omega$ for the distribution of expected breeding values. -
tol : float, optional
Tolerance with which to compare the two values. Default is$10^{-8}$ . -
debug : float, optional
Determines whether to print a comparison of the variables to the terminal. Default isFalse
.
-
bool
True
if the check was within tolerance successful,False
otherwise.
If using the debug output, some like the following will be printed the terminal:
>>> check_uncertainty_constraint(w, z, omega, debug=True)
z: 0.37923871642022844
wT*Ω*w: 0.3792386953366983
Diff: 2.1083530143961582e-08
This documentation relates to the latest version of the package on GitHub. For past versions, download the zip bundled with the release from here. If anything in this wiki looks incorrect or you think key information is missing, please do open an issue.