modelop / hadrian

Implementations of the Portable Format for Analytics (PFA)
Apache License 2.0
130 stars 49 forks source link

aurelius::pfa for rpart (method = "anova") issue argument is length zero #49

Open jgreenfield21 opened 6 years ago

jgreenfield21 commented 6 years ago

Trying to call pfa.rpart on a regression tree (instead of a classification tree as in the example) gives the following

model <- rpart::rpart(Sepal.Length ~ ., data=iris)
model_as_pfa <- pfa(model)

Console:

Error in if (!is.na(node$SplitVar)) { : argument is of length zero

Please advise.