Deployment of machine learning model developed in R for production

r
machine_learning
data_science

#1

What is the easiest way to deploy a machine learning model developed in R for production?


#2

i think it depends what you wanna achieve out of it, e.g if it is regression, you just need weights to predict. if it is complex algorithm, you can use POJO, which can easily be extracted using h2o package for almost all algorithm.
Additionally you can also make use of shiny.


#3

Hi @Arihant

it really depends of your productive environment, for example if you have to run it on regular basis with new data coming from let say one SQL Data base, you first build a layer which does the query to the sql and prepare one data frame or data table then load your model that you save as one RDS and call your model.
You can build one more complicated layer with reporting of the results for example or pushing back to the DB (of BI )
Hope this help
Best regards
Alain


#4

Thanks . How about deploying Random Forest , SVM , Xgboost model developed in R in Production . Which cloud to use and on that also how deployment happens ?


#5

Thanks . How about deploying Random Forest , SVM , Xgboost model developed in R in Production ?


#6

@Lesaffrea that is really a nice explanation.

But what if i just have the R script of the MOdel and i want deploy it to the live scenario .
Where in the volume flow in and my model makes prediction with the volume .

Any suggestion on this will be really very helpful…
Thanks … :slight_smile:


#7

Easiest way is to deploy your production model using “PLUMBER”, a library that has been written specifically for R.

For more details, refer to this link.

Peace!


#8

Is this production solution which can be reliable ?


#9

Can’t comment on this, but it should be.


#10

There is now another very interesting alternative converting your model to SQL with this new package. By converting it to SQL makes it fully compatible with many backend production solutions.

https://cloud.r-project.org/web/packages/tidypredict/vignettes/randomForest.html

Regards,
Carlos.