-
Notifications
You must be signed in to change notification settings - Fork 7
Add NestedVariogram model #33
Conversation
Codecov Report
@@ Coverage Diff @@
## master #33 +/- ##
===========================================
+ Coverage 68.67% 89.81% +21.14%
===========================================
Files 11 13 +2
Lines 399 432 +33
===========================================
+ Hits 274 388 +114
+ Misses 125 44 -81
Continue to review full report at Codecov.
|
|
This PR is ready for review. Appreciate if you can take a look before we go ahead and merge it. The main question I have is about the After this PR is merged, we can open a separate issue to discuss and implement the canonical form transformation. |
rmcaixeta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice. Only reading the code I was skeptical that all that mix of matrix and scalars would work. I cloned and tested with some univariate nested scenarios comparing against GSLIB vmodel benchmarks I had. All working nicely. Only got error with some strange structures (details above). For my workflow downstream it helps a lot this way of looping structures. For future cokriging I expect that these matrix forms will work as they are after a canonical normalization of the sills. Some constraints might be necessary later in the solvers to adapt to eventual matrix format outputs, but that's for the future too
exepulveda
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for you PR. See my review. Cheers
|
For some reason GitHub isn't allowing me to comment on your last comment directly @exepulveda. I will reply here as a separate comment:
We can still perform checks on the constructor of the |
Coefficients can be scalars for the univariate case or squared matrices for multivariate case. |
These squared matrices need to be symmetric? I have to review the co-Kriging literature, it is been a while. |
|
So it seems we have two issues left to be solved:
The first issue seems to require a clear statement about what types of coefficients are permitted and if we want to allow for a mixed approach (scalar + matrix). My plan is to merge the PR by tomorrow, and then think about the multivariate case when we need it. Please let me know if that works. The second issue is on my TODO list already. |
For a LMC yes, they need to be symmetric and positive semi definite See here for more details |
That is a nice link @exepulveda , thanks for sharing. I am taking care of the other suggestions you raised. |
For (1), I think in practice we'll always work with same type of coefficients:
IMO, it's better to let it really crash if the user mix the coefficients |
|
After adding more tests as suggested by @exepulveda, I went ahead and implemented the canonical form in this same PR to speed up things and don't block your research. The γ = SphericalVariogram() + 2*ExponentialVariogram() + NuggetEffect(10.0)
@test structures(γ) == (10.0, (1.0, 2.0), (SphericalVariogram(), ExponentialVariogram()))Appreciate if you can review and/or add more tests before we merge it. The current behavior makes sense? |
rmcaixeta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine for me. It'll help a lot, thanks guys
|
Thank you guys for the input. I will roll out a new release with the |
Fix JuliaEarth/GeoStats.jl#127, JuliaEarth/GeoStats.jl#126
This PR is work in progress. Everything is working except for the fact that the return type of the model is
UniformScaling. I am trying to find a way to return a simpleNumberwhen the coefficients are matrices with a single entry.