Learn R Programming

r2pmml (version 0.31.0)

verify.glm: Enhances a "glm" object with verification data.

Description

Enhances a "glm" object with verification data.

Usage

# S3 method for glm
verify(x, newdata, precision = 1e-13, zeroThreshold = 1e-13, ...)

Arguments

x

A "glm" object.

newdata

The verification dataset.

precision

Maximal relative error.

zeroThreshold

Maximal absolute error near the zero value.

...

Further arguments.

Examples

Run this code
# \donttest{
library("mlbench")
library("r2pmml")

data(BostonHousing)
housing.glm = glm(medv ~ ., data = BostonHousing, family = "gaussian")
housing.glm = verify(housing.glm, newdata = BostonHousing[sample(nrow(BostonHousing), 10), ])
# Please uncomment the next line
#r2pmml(housing.glm, file.path(tempdir(), "Housing-GLM-verified.pmml"))
# }

Run the code above in your browser using DataLab