Learn R Programming

LogicForest (version 2.1.4)

prime.imp: Extract Prime Variable Interactions from a Logic Regression Tree

Description

Internal function called by pimp.import. It is not intended to be used independently. Generates a list of all variables and variable interactions identified by a specific logic regression tree within a logic forest or LBoost model.

Usage

prime.imp(tree, data, Xs, mtype)

Value

An object of class "primeImp" with the following elements:

vec.primes

Character vector of variable interactions in logical format (negated predictors prefixed with !).

tmp.mat

Matrix of all binary interactions considered for the tree.

vec.pimpvars

Sorted vector of unique predictor indices involved in any prime interaction.

list.pimps

List of vectors, each containing indices of predictors involved in each interaction.

Arguments

tree

An object of class "logregtree" representing a fitted logic regression tree.

data

A data frame containing predictor variables used to fit the logic forest. Columns should correspond exactly to the variables specified in Xs.

Xs

A character vector of predictor names corresponding to columns in data.

mtype

Model type (e.g., classification, linear regression, survival regression).

Author

Bethany Wolf wolfb@musc.edu

Details

This function constructs all possible interactions of the predictors contained in the tree, identifies those that contribute to a positive outcome ("prime interactions"), and returns information about which variables and interactions are included in each. Negated predictors are indicated with a ! prefix in the vec.primes output.

See Also

pimp.import