Closed Martin-Jung closed 3 months ago
Interesting that all test etc. still run. But I will try to figure out what broke exactly to address this. In general, I only removed predictors that are provided in the predictors object but actually never used in the formula.
Yeah, the tests don't check for factor variables, only the vignettes do use them. In the vignette I added the explode_factors flag which makes them render. Merged dev
with main
branch recently.
Not quite sure why this is not working anymore (some engines always require split factors, but others won't)
This is really hard to debug since I cannot always re-produce the error. Sometime it runs locally (Code chunk Train models with spatial constrains
), and sometimes it does not?!
Update 1: One warning gets thrown in clamp_predictions
because the pmax
/ pmin
on a factor
Update 2: Issue might be in clamp_predictions
because many columns get char
if factors are present due to the loop starting in L486
Update 3: Few more issues related to exploding factors but not removing the original one
I am working on this on a new branch (https://github.com/iiasa/ibis.iSDM/tree/factors) because its all a bit more puzzling than expected
There were quite a few issues with factors, mainly:
add_predictors
.Should be all fixed (#128)
Will close for now. Please re-open if needed
The reason why Pkgdown rendering failed lately is due to a bug probably introduced with issue #106 or earlier, and in particular the handling of factor variables as predictors. I think it has something to do with the code added here where variables subset?
This reprex here fails regardless of engine (glm, xgboost, etc) now, resulting in several vignettes to fail to render...
It does work if factors are fully exploded, e.g. split up per factor level (
add_predictors(..,explode_factors = TRUE
). I will set this flag now by default in the vignette and hope that they render...