stripGlmModel: Strip a fitted GLM model

Description Usage Arguments Value Examples

View source: R/glmmodels.R

Description

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.

Usage

1

Arguments

a

the glm model object to strip

Value

a stripped GLM model

Examples

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))

DoktorMike/datools documentation built on Feb. 28, 2021, 8:39 a.m.