Learn R Programming

LogicForest (version 2.1.3)

proportion.positive: Proportion Positive Predictions

Description

Internal function used by predict.logforest to determine the proportion of logic regression trees within a logic forest that predict a class of one for new observations. It also returns the predicted class values based on a specified cutoff.

Usage

proportion.positive(predictmatrix, cutoff)

Value

A list with:

predmat

A two-column matrix where the first column is the proportion of trees predicting class one for each observation, and the second column is the binary predicted class (0 or 1).

Arguments

predictmatrix

A matrix of predicted values from each tree (rows = observations, columns = trees).

cutoff

Numeric value specifying the proportion of trees that must predict a class of one for the overall prediction to be class one.

Author

Bethany Wolf wolfb@musc.edu

Details

This function is called internally by predict.logforest and is not intended for direct use. It calculates, for each observation, the fraction of trees in the logic forest predicting a positive outcome, and then assigns a predicted class based on whether this fraction meets or exceeds the cutoff.