ConsensusBasedX
A Julia package for consensus-based optimisation
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README -
✓Academic publication links
Links to: wiley.com, joss.theoj.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.9%) to scientific vocabulary
Keywords
Repository
A Julia package for consensus-based optimisation
Basic Info
- Host: GitHub
- Owner: PdIPS
- License: mit
- Language: Julia
- Default Branch: main
- Homepage: https://pdips.github.io/ConsensusBasedX.jl/
- Size: 1.11 MB
Statistics
- Stars: 16
- Watchers: 2
- Forks: 3
- Open Issues: 0
- Releases: 5
Topics
Metadata Files
README.md
ConsensusBasedX.jl: Consensus-Based Optimisation in Julia
ConsensusBasedX.jl is a gradient-free stochastic optimisation package for Julia, born out of Consensus.jl and CBXpy. It uses Consensus-Based Optimisation (CBO), a flavour of Particle Swarm Optimisation (PSO) first introduced by R. Pinnau, C. Totzeck, O. Tse, and S. Martin (2017). This is a method of global optimisation particularly suited for rough functions, where gradient descent would fail. It is useful for optimisation in higher dimensions. It also implements Consensus-Based Sampling (CBS), as introduced in J. A. Carrillo, F. Hoffmann, A. M. Stuart, and U. Vaes (2022).
How to install and use
To install ConsensusBasedX.jl, simply run
julia
using Pkg; Pkg.add("ConsensusBasedX")
in the Julia REPL. You can then load the package in a script or in the REPL by running
julia
using ConsensusBasedX
Basic minimisation
The main functionality of ConsensusBasedX.jl is function minimisation via CBO. It assumes you have defined a function f(x::AbstractVector) that takes a single vector argument x of length D = length(x).
For instance, if D = 2, you can minimise f by running:
julia
minimise(f, D = 2)
Your full code might look like this:
julia
using ConsensusBasedX
f(x) = x[1]^2 + x[2]^2
x = minimise(f, D = 2)
Basic sampling
ConsensusBasedX.jl also provides CBS. The package exports sample, which has the same syntax as minimise.
For instance, if D = 2, you can sample exp(-αf) by running:
julia
out = sample(f, D = 2, extended_output=true)
out.sample
For more detailed explanations and full-code examples, see the documentation.
Bug reports, feature requests, and contributions
See the contribution guidelines.
Copyright © 2024 Dr Rafael Bailo and Purpose-Driven Interacting Particle Systems Group. MIT License.
Owner
- Name: Purpose-driven particle systems
- Login: PdIPS
- Kind: organization
- Repositories: 1
- Profile: https://github.com/PdIPS
Citation (citation.cff)
cff-version: "1.2.0"
authors:
- family-names: Bailo
given-names: Rafael
orcid: "https://orcid.org/0000-0001-8018-3799"
- family-names: Barbaro
given-names: Alethea
orcid: "https://orcid.org/0000-0001-9856-2818"
- family-names: Gomes
given-names: Susana N.
orcid: "https://orcid.org/0000-0002-8731-367X"
- family-names: Riedl
given-names: Konstantin
orcid: "https://orcid.org/0000-0002-2206-4334"
- family-names: Roith
given-names: Tim
orcid: "https://orcid.org/0000-0001-8440-2928"
- family-names: Totzeck
given-names: Claudia
orcid: "https://orcid.org/0000-0001-6283-7154"
- family-names: Vaes
given-names: Urbain
orcid: "https://orcid.org/0000-0002-7629-7184"
doi: 10.5281/zenodo.12207224
message: If you use this software, please cite our article in the
Journal of Open Source Software.
preferred-citation:
authors:
- family-names: Bailo
given-names: Rafael
orcid: "https://orcid.org/0000-0001-8018-3799"
- family-names: Barbaro
given-names: Alethea
orcid: "https://orcid.org/0000-0001-9856-2818"
- family-names: Gomes
given-names: Susana N.
orcid: "https://orcid.org/0000-0002-8731-367X"
- family-names: Riedl
given-names: Konstantin
orcid: "https://orcid.org/0000-0002-2206-4334"
- family-names: Roith
given-names: Tim
orcid: "https://orcid.org/0000-0001-8440-2928"
- family-names: Totzeck
given-names: Claudia
orcid: "https://orcid.org/0000-0001-6283-7154"
- family-names: Vaes
given-names: Urbain
orcid: "https://orcid.org/0000-0002-7629-7184"
date-published: 2024-06-21
doi: 10.21105/joss.06611
issn: 2475-9066
issue: 98
journal: Journal of Open Source Software
publisher:
name: Open Journals
start: 6611
title: "CBX: Python and Julia Packages for Consensus-Based Interacting
Particle Methods"
type: article
url: "https://joss.theoj.org/papers/10.21105/joss.06611"
volume: 9
title: "CBX: Python and Julia Packages for Consensus-Based Interacting
Particle Methods"
GitHub Events
Total
- Watch event: 1
- Delete event: 5
- Issue comment event: 1
- Push event: 20
- Pull request event: 9
- Create event: 6
Last Year
- Watch event: 1
- Delete event: 5
- Issue comment event: 1
- Push event: 20
- Pull request event: 9
- Create event: 6
Packages
- Total packages: 1
-
Total downloads:
- julia 2 total
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 5
juliahub.com: ConsensusBasedX
A Julia package for consensus-based optimisation
- Homepage: https://pdips.github.io/ConsensusBasedX.jl/
- Documentation: https://docs.juliahub.com/General/ConsensusBasedX/stable/
- License: MIT
-
Latest release: 1.3.1
published over 1 year ago
Rankings
Dependencies
- actions/checkout v3 composite
- codecov/codecov-action v3 composite
- julia-actions/cache v1 composite
- julia-actions/julia-buildpkg v1 composite
- julia-actions/julia-docdeploy v1 composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/julia-runtest v1 composite
- julia-actions/setup-julia v1 composite
- JuliaRegistries/TagBot v1 composite