export a random forest model to C code for use outside of mlr3

25 Views Asked by At

I have trained a radom forest model like this:

task <- as_task_regr(my_data, id= "rf", target = "Q")

train_set = sample(task$row_ids, 0.80 * task$nrow) test_set = setdiff(task$row_ids, train_set)

learner_rf <- lrn("regr.ranger", num.trees= 30) learner_rf$train(task, row_ids = train_set)

I'm happy with the model and want to export it to C code for use in other simulations like

Q = Random_forest(V1,V2,...)

d/dt = periph * Q/V2 - centr * (CL/V1 + Q/V1)

How can I do this? Are there mlr3 functions that I can use?

I didn't find similar questions from internet.

1

There are 1 best solutions below

1
Lars Kotthoff On

This isn't supported by mlr3 or the underlying package as far as I know.