Open kielc opened 4 years ago
If you set the fixed = True
, which is using distance rather than the nearest neighbors, I would also suggest to set the kernel function to be "gaussian". The default is "bisquare", in your current code bw = Sel_BW(coords_mercator, y, X, fixed=True).search()
.
So when fixed bi-square kernel is used, my guess is that for a smaller bandwidth, there are locations that they don't have enough nearby data points for the local regression during the bandwidth searching, thus yielding this error.
Again, the workaround would be using a adaptive bisquare kernel or a fixed gaussian kernel.
@kielc Did you ever find a solution? I'm having a similar issue, but the adaptive bisquare kernel or a fixed gaussian kernel are not helping.
@jamisbruening No, unfortunately I wasn't able to resolve the issue. I ended up implementing a simpler geographical regression instead of using mgwr which was more complicated than I needed for my project.
Getting a warning and error with a bandwidth selection search using the below code. There is no error when using adaptive bandwidth.