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

Extend tests for GPEmulator.jl and Observations.jl #62

Merged
merged 1 commit into from
Jun 28, 2020
Merged

Conversation

bielim
Copy link
Contributor

@bielim bielim commented Jun 27, 2020

This PR extends the coverage of the tests for the modules GPEmulator.jl and Observations.jl.

@bielim bielim self-assigned this Jun 27, 2020
@bielim bielim added the tests label Jun 27, 2020
@@ -117,12 +117,12 @@ function GPObj(inputs, data, package::GPJL; GPkernel::Union{K, KPy, Nothing}=not
GPkernel_i = deepcopy(GPkernel)
# inputs: N_samples x N_parameters
# data: N_samples x N_data
logstd_obs_noise = log(sqrt(0.5)) # log standard dev of obs noise
logstd_obs_noise = log(sqrt(0.01)) # log standard dev of obs noise
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make this dependent on the ensemble covariance? I also think that Ollie wanted to base this on the SVD stuff.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should! This will come in another (probably the next) PR though - the purpose of this one is merely to extend the test coverage. The change of the hard-coded regularization noise from log(sqrt(0.5)) to log(sqrt(0.01)) is just there because I experimented with it after our discussion and thought I could as well leave it at a smaller value until we have implemented the SVD (since the idea is that the regularization noise should be smaller than the learned white noise, a criterion that is more likely to be met the smaller the regularization noise is - speaking of which, one of the next PRs should also address the issue of naming all these noises (white noise, observational noise, regularization noise etc.) in a consistent way that minimizes confusion as much as possible).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. And yes, I think with all the covariances involved, being precise in the notation would be helpful.

Copy link
Member

@charleskawczynski charleskawczynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from the algorithmic changes, this looks fine to me.

Update src/Observations.jl

Co-authored-by: Charles Kawczynski <kawczynski.charles@gmail.com>
@@ -117,12 +117,12 @@ function GPObj(inputs, data, package::GPJL; GPkernel::Union{K, KPy, Nothing}=not
GPkernel_i = deepcopy(GPkernel)
# inputs: N_samples x N_parameters
# data: N_samples x N_data
logstd_obs_noise = log(sqrt(0.5)) # log standard dev of obs noise
logstd_obs_noise = log(sqrt(0.01)) # log standard dev of obs noise
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. And yes, I think with all the covariances involved, being precise in the notation would be helpful.

# Zero mean function
kmean = MeanZero()
m = GPE(inputs', dropdims(data[:, i]', dims=1), kmean, GPkernel_i,
logstd_obs_noise)
optimize!(m, noise=false)
optimize!(m, noise=true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI this is the default of optimize!. I will try to read the documentation of GaussianProcesses.jl to see what would be the best setting for our purposes.

@ilopezgp
Copy link
Contributor

bors r+

@bors
Copy link
Contributor

bors bot commented Jun 28, 2020

Build succeeded:

@bors bors bot merged commit 34459fe into master Jun 28, 2020
@bors bors bot deleted the extend_unit_tests branch June 28, 2020 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants