Learn R Programming

LogicForest (version 2.1.3)

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.

tmp.mat

Matrix of all binary interactions contained in the tree.

vec.pimpvars

Sorted vector of column indices in data for important predictors.

list.pimps

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

Arguments

tree

An object of class "logregtree".

data

Data frame used to fit the logic forest.

Xs

A 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.