predict.logicBagg {logicFS}R Documentation

Predict Method for logicBagg objects

Description

Prediction of test data Using an object of class logicBagg.

Usage

## S3 method for class 'logicBagg':
predict(object, newData, prob.case = 0.5, 
    type = c("class", "prob"), ...)

Arguments

object an object of class logicBagg
newData a matrix containing new data. If omitted object\$data, i.e. the original training data, are used. Each row of newData must correspond to a new observation. newData must have the same number of columns as object\$data, and the order of the variables must be same in both matrices
prob.case a numeric value between 0 and 1. A new observation will be classified as case (or more exactly, as 1) if the class probability, i.e. the average of the predicted probabilities of the models (if the logistic regression approach of logic regression has been used), or the percentage of votes for class 1 (if the classification approach of logic regression has been used) is larger than prob.case. Ignored if type = "prob"
type character vector indicating the type of output. If "class", a numeric vector of zeros and ones containing the predicted classes of the observations (using the specification of prob.case) will be returned. If "prob", the class probabilities or percentages of votes for class 1, respectively, for all observations are returned
... Ignored

Value

A numeric vector containing the predicted classes (if type = "class") or the class probabilities (if type = "prob") of the new observations.

Author(s)

Holger Schwender, holger.schwender@udo.edu

See Also

logic.bagging


[Package logicFS version 1.8.0 Index]