-
Notifications
You must be signed in to change notification settings - Fork 126
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
'ValueError: kth out of bounds' in MGWR fitting #88
Comments
Thanks for reporting the issue. What I see here is that you are using a fixed bi-square kernel. We had some internal discussions previously and found that the combinations of fixed-bisquare and adaptive-gaussian sometimes have some fitting issues. So we would suggest to use either adaptive-bisquare or fixed-gaussian kernel. I think the reason is that a fixed-bisquare kernel may contain too few points (plus the weights drop to zero at bandwidth) at some locations when the spatial distribution of the points are very irregular. If you changed to a gaussian kernel, it would run ok. Please see the attached screenshot. Regarding the bandwidth exceeds the largest pair-wise distance, this is possible and expected when the relationship approaches global. The upper bound of the bandwidth search range in |
@Ziqi-Li |
@DKchenliyuan Yes, the bandwidth cannot be forced to be inf yet. Please see this issue for some discussions #4. It is not something hard to do, so we could probably add this in somewhere in the summer. I'm closing the issue, if anything else pops up, feel free to reopen it. |
Hi!
I try to fit a MGWR model based on the data (post-process .shp file in attachment).
point_trans.zip
My code is as follow:
First, I notice that the bandwidths of 'ClayPC' and 'NH4Ngkg' (both 7484.08m) exceed the maximum distance (3742.06m) between observation points. These two bandwidths were both 3741.7m in the existing study (see Analyst A in Comber et al. 2020). I don't know if this bias is caused by my mistake. It seems that it happens when the bandwidth tends to be global.
Besides, I get the following error message when the model fitting:
There are 689 observation points in the data, but what does 'kth(=972)' mean? How can I deal with this problem?
Any comments on this greatly appreciated.
The text was updated successfully, but these errors were encountered: