Software
tidypredict

tidypredict

Run predictions inside the database

R

The tidypredict package converts R model objects into formulas that can be executed inside databases via SQL. It parses fitted models (like lm, glm, randomForest, xgboost, and others) and extracts the coefficients and structure needed to generate predictions without requiring the original model object or R environment.

This package solves the problem of scoring models at scale by pushing predictions into the database layer rather than pulling data into R. It works through dplyr’s database interface to support multiple SQL backends, eliminating the need to save model objects as .rds files or use PMML for deployment. The package also provides a parsed model specification format that can be stored as a simple data structure and works with parsnip-fitted models from the tidymodels ecosystem.

Contributors