pfa.lm: PFA Formatting of Fitted Linear models

Description Usage Arguments Value Source See Also Examples

Description

This function takes a linear model fit using lm and returns a list-of-lists representing in valid PFA document that could be used for scoring

Usage

1
2
3
## S3 method for class 'lm'
pfa(object, name = NULL, version = NULL, doc = NULL,
  metadata = NULL, randseed = NULL, options = NULL, ...)

Arguments

object

an object of class "lm"

name

a character which is an optional name for the scoring engine

version

an integer which is sequential version number for the model

doc

a character which is documentation string for archival purposes

metadata

a list of strings that is computer-readable documentation for archival purposes

randseed

a integer which is a global seed used to generate all random numbers. Multiple scoring engines derived from the same PFA file have different seeds generated from the global one

options

a list with value types depending on option name Initialization or runtime options to customize implementation (e.g. optimization switches). May be overridden or ignored by PFA consumer

...

additional arguments affecting the PFA produced

Value

a list of lists that compose valid PFA document

Source

pfa.config.R avro.typemap.R avro.R

See Also

lm pfa.glm

Examples

1
2
3
4
5
6
X1 <- rnorm(100)
X2 <- runif(100)
Y <- 3 - 5 * X1 + 3 * X2 + rnorm(100, 0, 3)

model <- lm(Y ~ X1 + X2)
model_as_pfa <- pfa(model)

aurelius documentation built on May 2, 2019, 3:43 a.m.