proportion.positive: Proportion Positive Predictions

View source: R/proportion.positive.R

proportion.positiveR Documentation

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)

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.

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.

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

Note

This is a supplementary function and not intended to be used independently of the other functions in the package.

Author(s)

Bethany Wolf wolfb@musc.edu


LogicForest documentation built on Feb. 14, 2026, 1:08 a.m.