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
There was an error when I tried to visualize the sample code:line 68, in plot
dimension = front[0][0].number_of_objectives
AttributeError: 'FloatSolution' object has no attribute 'number_of_objectives'
The text was updated successfully, but these errors were encountered:
Please, could you indicate the file containing the error?
AttributeError Traceback (most recent call last)
Cell In[3], line 4
1 from jmetal.lab.visualization import Plot
3 plot_front = Plot(title='Pareto front approximation', axis_labels=['x', 'y'])
----> 4 plot_front.plot(front, label='NSGAII-ZDT1', filename='NSGAII-ZDT1', format='png')
File ~/Documents/venve/lib/python3.12/site-packages/jmetal/lab/visualization/plotting.py:68, in Plot.plot(self, front, label, normalize, filename, format)
65 if len(front) != len(label):
66 raise Exception("Number of fronts and labels must be the same")
---> 68 dimension = front[0][0].number_of_objectives
70 if dimension == 2:
71 self.two_dim(front, label, filename, format)
AttributeError: 'FloatSolution' object has no attribute 'number_of_objectives'
The number_of_objectives of class FloatSolution was refactored as a method called number_of_objectives(). Any reference to the former should be replaced by the latter in the current version of the project in GitHub.
There was an error when I tried to visualize the sample code:line 68, in plot
dimension = front[0][0].number_of_objectives
AttributeError: 'FloatSolution' object has no attribute 'number_of_objectives'
The text was updated successfully, but these errors were encountered: