Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
172: Add args/kwargs to `optimize_hyperparameters!()` r=odunbar a=odunbar Resolves #168 to add args + kwargs into `optimize_hyperparameters!()` for `GPJL()` optimizer ## Content - Adds ability to modify the arguments for `Optim` methods. - Adds to docstring, a warning about the positional default argument for `method` forced upon us in `GaussianProcesses.jl` ## Examples I've verified these work in `examples/Emulator/GaussianProcess/learn_noise.jl` example. after adding `Optim,LineSearches` to `examples/Emulator/GaussianProcess/Project.toml`) 1. Add kwargs only ```julia ... kwargs = (key1="val1", key2="val2") optimize_hyperparameters!(emulator, kwargs...) ``` 2. Modify args only (the user MUST add `Optim` and set the first argument to be the `method`, default `LBFGS()`) ```julia using Optim ... other_args = (LBFGS(), arg1, arg2) optimize_hyperparameters!(emulator, args...) ``` 3. Modify the method linesearch [option](https://julianlsolvers.github.io/LineSearches.jl/stable/) (relating to #168) ```julia using Optim, LineSearches ... method_arg = LBFGS(linesearch=BackTracking()) optimize_hyperparameters!(emulator, method_arg) ``` Co-authored-by: odunbar <odunbar@caltech.edu>
- Loading branch information