I'm trying to add an isolation forest model to parsnip following the guidance at https://www.tidymodels.org/learn/develop/models/.
I think I've defined the model adm_isolation_forest
and engine.
adm_isolation_forest(ntrees = 100) %>%
translate(engine = "isotree")
Model Specification (anomaly_score)
Main Arguments:
ntrees = 100
Computational engine: isotree
Model fit template:
isotree::isolation.forest(data = missing_arg(), ntrees = 100)
However, when I attempt to fit the model...
model_fit <- adm_isolation_forest(ntrees = 100) %>%
set_engine("isotree") %>%
fit(data = train)
I get...
Error in fit.model_spec(., data = train) :
argument "formula" is missing, with no default
I'm not understanding why the function expects a formula. Isolation forest is unsupervised right? Any suggestions for either a suitable formula to provide, or how to change my parsnip model definition so that it no longer requires one?
Thanks.