Replies: 1 comment 1 reply
-
Actually I may have just found the answer; do I just have to evaluate using a StaticProblem? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! I'm having some trouble setting up a GA optimization when I want to give it an initial population. I read from https://pymoo.org/customization/initialization.html that I can have a pre-evaluated population. However, the sample code calls Evaluator().eval(problem, pop). What if I already have an excel file, say, with all of the X values with the corresponding F values?
I tried to create a population with known F values, something like:
pop = Population.new("X", X, "F", F)
where X is a 100 sample parameter sets, and F is a 100 sample objective function values.
However, if I insert this pop directly into the algorithm, it evaluates each parameter set, despite already having values of "F". Is there a way to bypass this? In other words; following the example on the website, I would like to do something like this:
X = np.random.random((300, problem.n_var))
F = np.random.random((300, 1))
pop = Population.new("X", X, "F", F)
algorithm = NSGA2(pop_size=100, sampling=pop)
minimize(problem,
algorithm,
('n_gen', 10),
seed=1,
verbose=True)
And I would like to have the algorithm skip evaluating the initial 300 samples, and take the "F" values that already exist in the population object. Is that possible?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions