Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify convergence plotting #380

Merged
merged 7 commits into from
Mar 4, 2022
Merged

Conversation

zStupan
Copy link
Contributor

@zStupan zStupan commented Mar 4, 2022

Summary

  • Modified convergence plotting so that a user can control whether generations or evaluations will be on the x axis of the graph.
    In case of generations/iterations the best global fitness at each iteration is plotted. In case of evaluations, we have the number of evaluations at which improvements were made on the x axis and the fitness values at those points on the y axis.
  • Renamed task.plot() to task.plot_convergence().
  • Renamed task.return_conv() to task.convergence_data().
  • Both task.convergence_data() and task.plot_convergence() have an argument x_axis which can be either 'evals' or 'iters' and it controls what goes on the x_axis. The default is 'iters'. task.plot_convergence() has an aditional parameter title, to set the title of the matplotlib graph.
  • task.convergence_data() now returns a tuple of numpy arrays instead of python lists.
  • Also fixed a flake8 dependency issue which caused it to crash.

@firefly-cpp
Copy link
Contributor

Thanks @zStupan! Can we merge this commit?

@zStupan
Copy link
Contributor Author

zStupan commented Mar 4, 2022

@firefly-cpp Yes

@firefly-cpp
Copy link
Contributor

I ask @GregaVrbancic to release a fresh version of this package -- 2.0.1

@firefly-cpp firefly-cpp merged commit 5e67e77 into NiaOrg:master Mar 4, 2022
@zStupan zStupan deleted the feature-convergence branch March 4, 2022 21:27
@GregaVrbancic
Copy link
Contributor

I ask @GregaVrbancic to release a fresh version of this package -- 2.0.1

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants