Skip to content

Commit

Permalink
Remove all-element-non-negative check from user-prior CMA-ES
Browse files Browse the repository at this point in the history
As this check is not necessary (and even malicious), I remove this
check. I believe this check was simply forgotten to be removed.
  • Loading branch information
nabenabe0928 committed Jan 8, 2025
1 parent 5fff936 commit 8b1a8a0
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions package/samplers/user_prior_cmaes/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ def _validate_user_prior(
)
if not np.allclose(cov0, cov0.T):
raise ValueError("cov0 must be a symmetric matrix.")
if np.any(cov0 < 0.0):
raise ValueError("All elements in cov0 must be non-negative.")
if np.any(np.linalg.eigvals(cov0) < 0.0):
raise ValueError("cov0 must be a semi-positive definite matrix.")

Expand Down

0 comments on commit 8b1a8a0

Please sign in to comment.