codegen.Rd
EXPERIMENTAL STATE - MAY NOT WORK AS INTENDED
Score code will only be generated successfully for supported models.
Other models and frameworks will be added in due time.
Use create_scoreSample()
to get a structure sample
Disclaimer: The score code that is generated is designed to be a working template for an R model, but is not guaranteed to work out of the box for scoring, publishing, or validating the model.
codegen(model, path, rds, libs, inputs, ...)
# S3 method for class 'lm'
codegen(model, path = "scoreCode.R", rds = "model.rds", libs = c())
# S3 method for class 'glm'
codegen(
model,
path = "scoreCode.R",
rds = "model.rds",
cutoff = 0.5,
libs = c()
)
# S3 method for class 'workflow'
codegen(
tm_workflow,
path = "scoreCode.R",
rds = "model.rds",
inputs = NULL,
libs = c(),
referenceLevel = NULL
)
a code string
codegen(lm)
: Code generator for lm
class models
codegen(glm)
: generator for glm
class models, specifically logistic regression
codegen(workflow)
: generator for tidymodels workflow
class models