ConsensusBasedX

A Julia package for consensus-based optimisation

https://github.com/pdips/consensusbasedx.jl

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

consensus-based-optimisation julia optimisation particle-swarm-optimisation
Last synced: 6 months ago · JSON representation ·

Repository

A Julia package for consensus-based optimisation

Basic Info
Statistics
  • Stars: 16
  • Watchers: 2
  • Forks: 3
  • Open Issues: 0
  • Releases: 5
Topics
consensus-based-optimisation julia optimisation particle-swarm-optimisation
Created almost 3 years ago · Last pushed 6 months ago
Metadata Files
Readme Contributing License Citation

README.md

ConsensusBasedXjl

ConsensusBasedX.jl: Consensus-Based Optimisation in Julia

status Stable Dev Build Status Coverage Aqua License: MIT

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

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

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 2 Total
Rankings
Dependent repos count: 9.7%
Average: 24.4%
Dependent packages count: 39.1%
Last synced: 6 months ago

Dependencies

.github/workflows/CI.yml actions
  • 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
.github/workflows/CompatHelper.yml actions
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite