pmml.lm: Generate the PMML representation for an lm object from the...

View source: R/pmml.lm.R

pmml.lmR Documentation

Generate the PMML representation for an lm object from the package stats.

Description

Generate the PMML representation for an lm object from the package stats.

Usage

## S3 method for class 'lm'
pmml(
  model,
  model_name = "lm_Model",
  app_name = "SoftwareAG PMML Generator",
  description = "Linear Regression Model",
  copyright = NULL,
  model_version = NULL,
  transforms = NULL,
  missing_value_replacement = NULL,
  weights = NULL,
  ...
)

Arguments

model

An lm object.

model_name

A name to be given to the PMML model.

app_name

The name of the application that generated the PMML.

description

A descriptive text for the Header element of the PMML.

copyright

The copyright notice for the model.

model_version

A string specifying the model version.

transforms

Data transformations.

missing_value_replacement

Value to be used as the 'missingValueReplacement' attribute for all MiningFields.

weights

The weights used for building the model.

...

Further arguments passed to or from other methods.

Details

The resulting PMML representation will not encode interaction terms. Currently, only numeric regression is supported.

Value

PMML representation of the lm object.

Author(s)

Rajarshi Guha

References

R project: Fitting Linear Models

Examples

## Not run: 
fit <- lm(Sepal.Length ~ ., data = iris)
fit_pmml <- pmml(fit)

## End(Not run)

pmml documentation built on March 18, 2022, 5:49 p.m.