Skip to content

Error when trying to add new objective #631

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
otonoco opened this issue Mar 22, 2025 · 0 comments
Open

Error when trying to add new objective #631

otonoco opened this issue Mar 22, 2025 · 0 comments

Comments

@otonoco
Copy link

otonoco commented Mar 22, 2025

Hello,

I notice the following error when trying to use a customised objective:

`CVXPY note: This failure was encountered while trying to certify
that a matrix is positive semi-definite (see [1] for a definition).
In rare cases, this method fails for numerical reasons even when the matrix is
positive semi-definite. If you know that you're in that situation, you can
replace the matrix A by cvxpy.psd_wrap(A).

    [1] https://en.wikipedia.org/wiki/Definite_matrix`

Specifically, here's the customised objective I'm trying to add:

weighted_sigma = w @ sigmas risk = cvxpy.sqrt(cvxpy.quad_form(w, cov_matrix)) target = -weighted_sigma / risk return objective_functions._objective_value(w, target)

I notice that this error appeared even I'm copy + pasting the quadratic_utility code into this function. I'm wondering if I missed anything here.

Best,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant