JuliaGaussianProcesses / JuliaGaussianProcesses/ParameterHandling.jl

Multistart optimization

Open
#57 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
74
Forks
10
PR merge metrics
No merged PRs in 30d

Description

Hello,

I have a multistart optimization code that generates initial parameter guesses initialps as you can see below and later used every row of them to solve a new optimization problem.

using Distributions, LatinHypercubeSampling, Statistics
p = convert(Array{Float64,1}, 1:3)
bounds = [Vector{Float64}(undef,2) for _ in 1:length(p)]
searchgrid = [1E-9, 1E-1]
for (ipara,para) in enumerate(p)
  bounds[ipara][1] = para * searchgrid[1]
  bounds[ipara][2] = para * searchgrid[2]
end

function latinCube(bounds, dims, nguess = 100)  
    initialps = []
    plan, _ = LHCoptim(nguess, dims, 1000)
    plan /= nguess
    
    for i in 1:dims
        append!(initialps, [quantile(LogUniform(bounds[i][1], bounds[i][2]), plan[:,i])])
    end
    return permutedims(hcat(initialps...))
end

nguess = 100
initialps = latinCube(bounds, length(p), nguess)

My problem is that I do not know how to implement it on p when it is a named tuple in the format of,

p = (p₁ = 1., p₂ = fixed(2.), p₃ = bounded(3., 0, 100))

So my question is how I can do multistart optimization using ParameterHandling.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the issue's p, fixed, bounded, and latinCube examples, then trace the public ParameterHandling API for named tuples and parameter constraints. Determine whether the requested behavior belongs in the library or in user code, and define how free parameters, bounds, and fixed values should be handled before implementing or documenting a multistart workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.