predict.logforest: Predict Outcomes Using a Logic Forest Model

View source: R/predict.logforest.R

predict.logforestR Documentation

Predict Outcomes Using a Logic Forest Model

Description

Computes predicted values for new observations or the out-of-bag (OOB) predictions for a logic forest model fitted using logforest.

Usage

## S3 method for class 'logforest'
predict(object, newdata, cutoff, ...)

Arguments

object

An object of class "logforest".

newdata

A matrix or data frame of new predictor values. If omitted, predictions are made for the original data used to fit the model (OOB predictions).

cutoff

A numeric value between 0 and 1 specifying the minimum proportion of trees that must predict a class of 1 for the overall prediction to be 1. Ignored for non-classification models.

...

Additional arguments (currently ignored).

Details

For classification models, predictions are determined based on the cutoff proportion. For regression or time-to-event models, the function returns predicted values and OOB statistics if newdata is not provided.

Value

An object of class "LFprediction" containing:

  • LFprediction: numeric vector of predicted responses.

  • proportion_one: numeric vector of the proportion of trees predicting class 1 (classification only).

  • AllTrees: matrix or data frame with predicted values from each tree, the proportion of trees predicting 1, and the overall predicted class (classification), or predicted values for regression/time-to-event models.

Author(s)

Bethany Wolf wolfb@musc.edu

See Also

logforest


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