I'm getting an error, or I am confused about how the nsga-ii algorithm works.
Why do results generate points in objective space which are not in the original CSV, when Problem functions are simply referring to their original values? See below:
And why can't I assign Integer type to the first variable? That seems to throw an error: IndexError: invalid index to scalar variable..
algorithm = NSGAII(problem = BestActivity(), population_size = 542, generator = MyGenerator(), variator=None)
algorithm.run(10000)
x = [s.objectives[0] for s in algorithm.result]
y = [s.objectives[1] for s in algorithm.result]
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
plt.scatter(x,y)
plt.show()
This issue is stale and will be closed soon. If you feel this issue is still relevant, please comment to keep it active. Please also consider working on a fix and submitting a PR.
I'm getting an error, or I am confused about how the nsga-ii algorithm works.
Why do results generate points in objective space which are not in the original CSV, when Problem functions are simply referring to their original values? See below:
And why can't I assign
Integer
type to the first variable? That seems to throw an error:IndexError: invalid index to scalar variable.
.See the Gist and csv here
First I define the problem:
Then a custom Generator with data from a csv file using
list(df.itertuples().next())
from Pandas dataframe:Run and plot results: