Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds LossMinimization folder and two examples #96

Merged
merged 2 commits into from
Jan 8, 2021

Conversation

sandreza
Copy link
Contributor

This is meant to be a starting point for a discussion on adding tutorials on how to use calibrate emulate sample with simple examples to build intuition.

In particular PR adds a simple example showing how to use EKI to minimize two loss functions

  1. L(x,y) = (x-1)^2 + (y+1)^2
  2. L(x,y) = (x^2-1)^2 + (y+1)^2

This is accomplished by taking the forward map to just be the loss function. The former has a minimum at (x,y) = (1,-1) and the latter has two minima at (x,y) = (+1,-1) and (x,y) = (-1,-1). By switching the random seed on the latter, one can converge to either minimum. Eventually, such simple examples could be included in the docs

@codecov
Copy link

codecov bot commented Dec 24, 2020

Codecov Report

Merging #96 (921e3b6) into master (f40f997) will increase coverage by 3.61%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #96      +/-   ##
==========================================
+ Coverage   85.19%   88.80%   +3.61%     
==========================================
  Files           7        7              
  Lines         547      545       -2     
==========================================
+ Hits          466      484      +18     
+ Misses         81       61      -20     
Impacted Files Coverage Δ
src/GPEmulator.jl
src/MCMC.jl
src/EKP.jl
src/GaussianProcessEmulator.jl 87.11% <0.00%> (ø)
src/MarkovChainMonteCarlo.jl 85.43% <0.00%> (ø)
src/EnsembleKalmanProcesses.jl 97.53% <0.00%> (ø)
src/Utilities.jl 100.00% <0.00%> (+22.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f40f997...921e3b6. Read the comment docs.

@odunbar
Copy link
Collaborator

odunbar commented Jan 5, 2021

Thanks for starting this! I'd be keen to chat more about some tutorial-type examples. At present we only have the EnsembleKalmanProcesses/runtests (EKP/runtests) for the ensemble methods (in isolation) - with similar loss functions. I have been wondering about where the divide sits between runtests and examples - and i think it would be beneficial to have these as simple tutorials - so that we can relegate the runtests to more unit-style function testing.

@sandreza
Copy link
Contributor Author

sandreza commented Jan 5, 2021

"we can relegate the runtests to more unit-style function testing"
I agree with this!

@odunbar
Copy link
Collaborator

odunbar commented Jan 8, 2021

bors try

bors bot added a commit that referenced this pull request Jan 8, 2021
@bors
Copy link
Contributor

bors bot commented Jan 8, 2021

try

Build succeeded:

@odunbar
Copy link
Collaborator

odunbar commented Jan 8, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Jan 8, 2021

Build succeeded:

@bors bors bot merged commit b19ed8e into CliMA:master Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants