jMetalPy icon indicating copy to clipboard operation
jMetalPy copied to clipboard

Solution Matrix

Open statsarah opened this issue 4 years ago • 2 comments

Hello, I am trying to optimize over a function that contains a known array of matrices A, an unknown array of matrices B, and two penalty hyperparameters c and d . Is it possible to return a solution that is an array of optimal matrices along with the two optimal values for the hyperparameters?

Currently my objective function is coded using numpy array operations (no loops), but the returned solutions contain three values rather than an array of matrices and two individual values. I'm using NSGA-II and class FloatProblem. Thank you in advance.

statsarah avatar Mar 20 '20 21:03 statsarah

Hi.

I'm not sure to understand your issue. If you are working with a FloatProblem then the solution variables should be a list of float values. Is that right?

Antonio

ajnebro avatar Mar 24 '20 14:03 ajnebro

They are float variables, yes. But when one of my solution variables is a matrix, I cannot get a solution. I get the error

...\jmetal\util\comparator.py", line 192, in dominance_test if vector1[i] > vector2[i]: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

statsarah avatar Mar 25 '20 20:03 statsarah