predict.prim.peel: Validate peels

Description Usage Arguments Details Value Author(s) Examples

View source: R/prim.R

Description

Validate the results taken from the PRIM peeling process

Usage

1
2
## S3 method for class 'prim.peel'
predict(object, newdata, ...)

Arguments

object

An S3 object of class prim.peel

newdata

A data frame in which to look for variables with which to predict

...

further arguments passed to or from other methods

Details

This function takes the result of the prim peeling process and applies it to new data. Usually the optimal box in the peeling process is not the best on unobserved data.

Value

An S3 object of type prim.predict

Author(s)

Jurian Baas

Examples

1
2
3
4
5
6
7
  data(ames)
  ames.sample <- sample(nrow(ames), nrow(ames) * 0.75)
  ames <- prim.data.prepare(ames)
  ames.model <- prim(SalePrice ~ . - PID - Order, ames[ames.sample,])
  ames.predict <- predict(ames.model, ames[-ames.sample,])
  plot(ames.model)
  plot(ames.predict)

Jurian/bump.hunting documentation built on March 24, 2020, 8:07 a.m.