From 473aae5203b639d459b92612fde08a9205363783 Mon Sep 17 00:00:00 2001 From: Guillaume Dalle <22795598+gdalle@users.noreply.github.com> Date: Sat, 4 May 2024 11:54:42 +0200 Subject: [PATCH 1/5] Typos in docs --- docs/src/distribution_sampling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/distribution_sampling.md b/docs/src/distribution_sampling.md index 01b079b..d5195c5 100644 --- a/docs/src/distribution_sampling.md +++ b/docs/src/distribution_sampling.md @@ -2,7 +2,7 @@ ConsensusBasedX.jl also provides [Consensus-Based Sampling](@ref). -The package exports `sample`, which behaves exactly as `minimise` in [Function minimisation](@ref). It assumes you have defined a function `f(x::AbstractVector)` that takes a single vector argumemt `x` of length `D = length(x)`. +The package exports `sample`, which behaves exactly as `minimise` in [Function minimisation](@ref). 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 sample `exp(-αf)` by running: ```julia From 8bff1d03c4610b00835aa04ac467727dc92fc1cb Mon Sep 17 00:00:00 2001 From: Guillaume Dalle <22795598+gdalle@users.noreply.github.com> Date: Sat, 4 May 2024 11:56:43 +0200 Subject: [PATCH 2/5] Typos in maximise and minimise --- src/interface/maximise.jl | 2 +- src/interface/minimise.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interface/maximise.jl b/src/interface/maximise.jl index fa81a99..8286ca3 100644 --- a/src/interface/maximise.jl +++ b/src/interface/maximise.jl @@ -4,7 +4,7 @@ maximise(f; keywords...) ``` ```julia -maximise(config::NamedTuple, f) +maximise(f, config::NamedTuple) ``` Maximise the function `f` using Consensus-Based Optimisation. diff --git a/src/interface/minimise.jl b/src/interface/minimise.jl index 427f067..2f71f6a 100644 --- a/src/interface/minimise.jl +++ b/src/interface/minimise.jl @@ -9,7 +9,7 @@ minimise(f, config::NamedTuple) Minimise the function `f` using Consensus-Based Optimisation (see [Function minimisation](@ref)). -You must specify the dimension `D` of the problem. Other paramters (e.g. the number of particles `N` or the number of ensembles `M` can also be specified; see [Summary of options](@ref). +You must specify the dimension `D` of the problem. Other parameters (e.g. the number of particles `N` or the number of ensembles `M` can also be specified; see [Summary of options](@ref). `minimize`, `optimise`, or `optimize` are aliases for `minimise`. From e7a8300747f8cdf7855cb5614707d43b1907ec38 Mon Sep 17 00:00:00 2001 From: Guillaume Dalle <22795598+gdalle@users.noreply.github.com> Date: Sat, 4 May 2024 11:57:17 +0200 Subject: [PATCH 3/5] Typo in minimise --- src/interface/minimise.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interface/minimise.jl b/src/interface/minimise.jl index 2f71f6a..4968103 100644 --- a/src/interface/minimise.jl +++ b/src/interface/minimise.jl @@ -9,7 +9,7 @@ minimise(f, config::NamedTuple) Minimise the function `f` using Consensus-Based Optimisation (see [Function minimisation](@ref)). -You must specify the dimension `D` of the problem. Other parameters (e.g. the number of particles `N` or the number of ensembles `M` can also be specified; see [Summary of options](@ref). +You must specify the dimension `D` of the problem. Other parameters (e.g. the number of particles `N` or the number of ensembles `M`) can also be specified; see [Summary of options](@ref). `minimize`, `optimise`, or `optimize` are aliases for `minimise`. From 27b0c56f4d7f7fd1e540e584bb0ed5da2c30d3e4 Mon Sep 17 00:00:00 2001 From: Guillaume Dalle <22795598+gdalle@users.noreply.github.com> Date: Sat, 4 May 2024 11:58:29 +0200 Subject: [PATCH 4/5] Typo in sample --- src/interface/sample.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interface/sample.jl b/src/interface/sample.jl index c1f1772..c91e510 100644 --- a/src/interface/sample.jl +++ b/src/interface/sample.jl @@ -9,7 +9,7 @@ sample(f, config::NamedTuple) Sample the distribution `exp(-αf)` using Consensus-Based Sampling (see [Distribution sampling](@ref)). -You must specify the dimension `D` of the problem. Other paramters (e.g. the number of particles `N` or the number of ensembles `M` can also be specified; see [Summary of options](@ref). +You must specify the dimension `D` of the problem. Other paramters (e.g. the number of particles `N` or the number of ensembles `M`) can also be specified; see [Summary of options](@ref). # Examples From 596ba7c31e816533ac4d7c9f66b7e86bfd538654 Mon Sep 17 00:00:00 2001 From: Guillaume Dalle <22795598+gdalle@users.noreply.github.com> Date: Sat, 4 May 2024 12:04:12 +0200 Subject: [PATCH 5/5] Typo in particle init --- docs/src/particle_initialisation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/particle_initialisation.md b/docs/src/particle_initialisation.md index e7379d1..b631fc6 100644 --- a/docs/src/particle_initialisation.md +++ b/docs/src/particle_initialisation.md @@ -10,7 +10,7 @@ If no options are provided, ConsensusBasedX.jl initialises its particles by samp ## Initial guess -If you have an initial guess for the global minimiser of the function `f`, you can pass the option `initial_guess` (or `initial_mean`). This can be a `Real`, if you want to use the same value for each coordinate of the initial guess, or an `AbstractVector` of size `size(initial_guess) = (D,)`. The particles will be initisalised by sampling a normal distribution with mean `initial_guess`/`initial_mean` and unit variance. [Full-code example](https://github.com/PdIPS/ConsensusBasedX.jl/blob/main/examples/basic_usage/initial_guess.jl). +If you have an initial guess for the global minimiser of the function `f`, you can pass the option `initial_guess` (or `initial_mean`). This can be a `Real`, if you want to use the same value for each coordinate of the initial guess, or an `AbstractVector` of size `size(initial_guess) = (D,)`. The particles will be initialised by sampling a normal distribution with mean `initial_guess`/`initial_mean` and unit variance. [Full-code example](https://github.com/PdIPS/ConsensusBasedX.jl/blob/main/examples/basic_usage/initial_guess.jl). ### Specify a normal distribution