prim.box.index: Prim Box Index

Description Usage Arguments Value Author(s) Examples

View source: R/prim.R

Description

For a given box (defined as a set of peels) id, return the index of those rows that satisfy all conditions of the box

Usage

1
prim.box.index(object, newdata, box.index)

Arguments

object

An S3 object of class prim.peel or prim.predict

newdata

A data frame on which to apply the conditions

box.index

Optionally, the index of the peel which defines the box. If not provided, the simplest box with the highest quality is used

Value

A vector of indices

Author(s)

Jurian Baas

Examples

1
2
3
4
5
6
7
  data(pima)
  pima.sample <- sample(nrow(pima), 0.75*nrow(pima))
  pima <- prim.data.prepare(pima)
  pima.model <- prim(class ~ ., data = pima[pima.sample,],
    peeling.quantile = 0.4, min.support = 0.4)
  pima.predict <- predict(pima.model, pima[-pima.sample,])
  pima.idx <- prim.box.index(pima.predict, pima)

subgroup.discovery documentation built on Feb. 4, 2020, 9:11 a.m.