Description Usage Arguments Value Examples
Reduce the size of a fitted GLM model by a massive factor. This is crucial in deploying R in production settings as the standard GLM is way to liberal with storing stuff we don't need for prediction.
1 |
a |
the glm model object to strip |
a stripped GLM model
1 2 3 4 5 | mylm <- glm(dist ~ speed, data = cars)
print(object.size(mylm))
mylm <- stripGlmModel(mylm)
print(object.size(mylm))
print(predict(mylm, cars))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.