You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After running the GA optimization with constraints, I printed the following information. Could anyone teach me how to output the f_avg, f_min, cv_min, cv_avg to a csv file.
I tried the following method. However, the output values are not exactly the same as those in the above table:
optimization_info = pd.DataFrame({
'n_gen': [gen + 1 for gen in range(res.algorithm.n_gen)] [:-1],
'favg': [np.mean(-h.pop.get("F")) for h in res.history]
})
optimization_info.to_csv(config.save_path / 'optimization_info.csv', index=False)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
After running the GA optimization with constraints, I printed the following information. Could anyone teach me how to output the f_avg, f_min, cv_min, cv_avg to a csv file.
=================================================================================
n_gen | n_eval | cv_min | cv_avg | f_avg | f_min
I tried the following method. However, the output values are not exactly the same as those in the above table:
optimization_info = pd.DataFrame({
'n_gen': [gen + 1 for gen in range(res.algorithm.n_gen)] [:-1],
'favg': [np.mean(-h.pop.get("F")) for h in res.history]
})
optimization_info.to_csv(config.save_path / 'optimization_info.csv', index=False)
Beta Was this translation helpful? Give feedback.
All reactions