Learn R Programming

LogicForest (version 2.1.3)

predict.logreg2: Predict Method for Logic Regression Objects (Internal)

Description

INTERNAL FUNCTION: evaluates the importance of predictor combinations and generates predictions from a fitted logic regression object.

Usage

# S3 method for logreg2
predict(object, msz, ntr, newbin, newsep, newcens, ...)

Value

A numeric vector or matrix of predictions.

Arguments

object

An object of class "logreg".

msz

Integer. Maximum number of leaves in a tree.

ntr

Integer. Number of trees in object.

newbin

Matrix containing binary predictor values for new data points.

newsep

Integer. Number of separate predictors in newbin.

newcens

Vector. Censoring indicator for survival data (if applicable).

...

Additional arguments (currently ignored).

Details

This function is typically called internally by other functions and is not intended for direct use by package users.

Depending on the model type (object$type), this function produces:

  • Classification predictions (0/1) if type == "classification".

  • Predicted probabilities if type == "logistic".

  • Survival model predictions if type == "proportional.hazards".