giscience-fsu / sperrorest

Spatial error estimation and variable importance
https://giscience-fsu.github.io/sperrorest/
GNU General Public License v3.0
17 stars 3 forks source link

sperrorest() fails when factor levels of predictors exist in test data only (and do not exist in train data) #37

Closed pat-s closed 7 years ago

pat-s commented 7 years ago

This can happen due to partitioning, especially when using spatial partitioning (partition_kmeans()).

The solution (removing the problematic factor levels from the test data) was adapted from https://stackoverflow.com/a/39495480/4185785 and implemented in c399512e86304c1143238f0a8df76d6bc5dfbeea. err_fun() was updated in ba8587ec2b78b667fca776c262c506689ee66f13.

pat-s commented 7 years ago

Calculation of variable importance still fails and needs to be updated