BAG_Model {pomodoro} | R Documentation |
Bagging Model
Description
Bagging Model
Usage
BAG_Model(Data, xvar, yvar)
Arguments
Data |
The name of the Dataset. |
xvar |
X variables. |
yvar |
Y variable. |
Details
Decision trees suffer from high
variance (If we split the training data-set randomly into two parts and set a decision tree to both parts, the results might be quite different).
Bagging is an ensemble procedure which reduces the variance and increases the prediction accuracy of a statistical learning method
by considering many training sets
()
from the population. Since we can not have multiple training-sets, from a single training data-set, we can generate
different bootstrapped training data-sets
(
)
by each
trees and take a majority vote. Therefore, bagging for classification problem defined as
Value
The output from BAG_Model
.
Examples
yvar <- c("Loan.Type")
sample_data <- sample_data[c(1:750),]
xvar <- c("sex", "married", "age", "havejob", "educ", "political.afl",
"rural", "region", "fin.intermdiaries", "fin.knowldge", "income")
BchMk.BAG <- BAG_Model(sample_data, c(xvar, "networth"), yvar )
BchMk.BAG$Roc$auc
[Package pomodoro version 3.8.0 Index]