1
votes

I developed a Random Forest regression algorithm in R using CARET. I need to export the algorithm as universal data-type (for instance xml), so it can be implemented on a different platform.

So far, I found this thread where pmml is recommanded to get a xml, but it only works if one has a "Random Forest formula" (results from function RandomForest). However, it does not lead me to equal performance as I used caret::train, which results into a "large train object"

I found another package r2pmml, which shall convert my model into a pmml but I cannot install the package (probably outdated, as I cannot install from repository or on other Rstudio versions).

Here is how I create my regression model

 rf.model.tuned <- train(response ~ ., data = training,
                    method = "rf", importance=TRUE,
                    trControl =  trainControl (method= "repeatedcv", 
                                 number=5, repeats = 5))

Anyone an idea how I can use regression models outside the R environment?

1
sorry but why would you suggest something I mentioned in my inital description as not appropiate?usel
r2pmml is different than pmmlemilliman5
Im aware of that: "So far, I only found this thread where pmml is recommanded to get a xml, but it only works if one has a "Random Forest formula" (results from function RandomForest). However, it does not lead me to equal performance as I used caret::train, which results into a "large train object"usel
"I cannot install the r2pmml package" - This package is not available in CRAN and/or RStudio repositories. You need to install it from GitHub, exactly as detailed in r2pmml README file.user1808924

1 Answers

0
votes

You can export caret-trained Random Forest models with the r2pmml package.