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

Strange number in a variogram function #119

Open
juifa-tsai opened this issue Jan 14, 2019 · 5 comments
Open

Strange number in a variogram function #119

juifa-tsai opened this issue Jan 14, 2019 · 5 comments

Comments

@juifa-tsai
Copy link

Dear authors,

I was looking for the python open source of Kriging to solve my works. Feel lucky to find this convenience and clean package. However, I found a small strange number (parameter) with 3. in the exponential function of the line 58.

    return psill * (1. - np.exp(-d/(range_/3.))) + nugget

Actually it doesn't affect the fitting performance, but the scale of the range may cause misunderstanding. Not sure if it is because of the unit from feet to meter or miss-assignment. I know this is A small issue, I am just curiosity about it.

Many thanks,
Jui-Fa

@rth
Copy link
Contributor

rth commented Jan 15, 2019

Looks like there are several variants for the exponential variogram model. In particular,

The parameter a has different values in different references, due to the ambiguity in the definition of the range. E.g. a=1/3 is the value used in (Chiles&Delfiner 1999)

so it should be fine.

@juifa-tsai
Copy link
Author

Thanks for the answer. I agree the number won't affect the fitting performance. But I'd suggest to remove a in any function, since we expect to the fitted "range", i.e. distance, provides the information about spatial correlation. However, it's true that it should be fine in some case. :-)

@MuellerSeb
Copy link
Member

I was thinking about bringing the models of PyKrige in line with the ones from GSTools. There the length scale in the exponential model coincides with its integral scale.

@MuellerSeb
Copy link
Member

MuellerSeb commented Mar 26, 2020

We could also introduce a scaling factor, that is fixed (not estimated during the variogram fitting).
This could also help in the future to automatically determine a search radius (See #143). For example:

serach_radius = 2 * len_scale

Since the len_scale in the model doesn't need to coincide with other scales (like integral scale or a precentile scale), the scaling factor could help, to rescale the len_scale to a meaningful range.

In the mentioned case above, the scaling factor would be 3.

@MuellerSeb
Copy link
Member

This is solved in GSTools with the introduction of the rescale argument, that will be used by PyKrige in the future:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants