jMetalPy
jMetalPy copied to clipboard
Solution Matrix
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.
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
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()