predict.logicBagg: Predict Method for logicBagg objects

Description Usage Arguments Value Author(s) See Also

Description

Prediction for test data using an object of class logicBagg.

Usage

1
2
3
## S3 method for class 'logicBagg'
predict(object, newData, prob.case = 0.5, 
    type = c("class", "prob"), score = c("DPO", "Conc", "Brier"), ...)

Arguments

object

an object of class logicBagg.

newData

a matrix or data frame 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. Each row of newData must contain the same variable as the corresponding column of the data matrix used in logic.bagging, i.e.\ x if the default method of logic.bagging has been used, or data without the column containing the response if the formula method has been used.

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" or the response is either quantitative or an object of class Surv.

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 if the response is quantitative or an object of class Surv.

score

a character string naming the score that should be used to assess the performance of the prediction model in the survival case. By default, the distance between predicted outcomes (score = "DPO") proposed by Tietz et al.\ (2018) is used in the assessment of the prediction performance. Alternatively, Harrell's C-Index ("Conc"), or the Brier score ("Brier") can be used. Furthermore, score determines whether a prediction for the cumulative hazard function (score = "DPO" or score = "Conc") or the survival function (score = "Brier") of the new observations should be made. Ignored in all other than the survival case.

...

Ignored.

Value

A numeric vector containing the predicted classes (if type = "class") or the class probabilities (if type = "prob") of the new observations if the classification or the logistic regression approach of logic regression is used. If the response is quantitative, the predicted value of the response for all observations in the test data set is returned. If the response is of class Surv, an object of class predict.survivalFS with either an prediction for the cumulative hazard function or the survival function of the new observations is returned.

Author(s)

Holger Schwender, holger.schwender@hhu.de, Tobias Tietz, tobias.tietz@hhu.de

See Also

logic.bagging


holgerschw/logicFS documentation built on April 15, 2020, 10:42 p.m.