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.
proportion.positive(predictmatrix, cutoff)A list with:
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).
A matrix of predicted values from each tree (rows = observations, columns = trees).
Numeric value specifying the proportion of trees that must predict a class of one for the overall prediction to be class one.
Bethany Wolf wolfb@musc.edu
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.