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

Differentiate more precisely bewteen swarm and iterate in PSO more stricly #344

Merged
merged 5 commits into from
Jan 16, 2024

Conversation

kellertuer
Copy link
Member

We noticed an inconsistency yesterday, where (probably for historic reasons) the swarm was sometimes returned when calling get_iterate on the ParticleSwarmState – probably since it made a few things easer.

This PR fixes that and introduces :Swarm to access the swarm in general within the (much newer than PSO) get_manopt_parameter and updates its occurrences accordingly.
Furthermore get_manopt_parameter is now as tolerant as set_manopt_parameter! and returns nothing (but does not error) if a state/problem/... does not have a certain parameter.

src/plans/stopping_criterion.jl Outdated Show resolved Hide resolved
src/solvers/particle_swarm.jl Outdated Show resolved Hide resolved
src/solvers/particle_swarm.jl Outdated Show resolved Hide resolved
src/solvers/particle_swarm.jl Outdated Show resolved Hide resolved
src/solvers/particle_swarm.jl Outdated Show resolved Hide resolved
test/utils/dummy_types.jl Outdated Show resolved Hide resolved
test/utils/dummy_types.jl Outdated Show resolved Hide resolved
test/utils/example_tasks.jl Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jan 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (40955df) 99.60% compared to head (ff27769) 99.62%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #344      +/-   ##
==========================================
+ Coverage   99.60%   99.62%   +0.01%     
==========================================
  Files          69       69              
  Lines        6372     6380       +8     
==========================================
+ Hits         6347     6356       +9     
+ Misses         25       24       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mateuszbaran
Copy link
Member

For a generic interface maybe :Population would be better as it can refer to any evolutionary algorithm. Adding CMA-ES to Manopt is on my TODO list.

@kellertuer
Copy link
Member Author

kellertuer commented Jan 13, 2024

That sounds like a very good idea, to call that generic name :Population – will do that :)

@kellertuer kellertuer requested a review from hajg-ijk January 13, 2024 11:00
@kellertuer kellertuer added documentation Ready-for-Review A label for pull requests that are feature-ready labels Jan 13, 2024
@kellertuer kellertuer merged commit 86a2866 into master Jan 16, 2024
15 checks passed
@kellertuer kellertuer deleted the kellertuer/fix-particle-swarm branch May 4, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Ready-for-Review A label for pull requests that are feature-ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants