GBM_Model | R Documentation |
Gradient Boosting Model
GBM_Model(Data, xvar, yvar)
Data |
The name of the Dataset. |
xvar |
X variables. |
yvar |
Y variable. |
Unlike bagging trees, boosting does not use bootstrap sampling, rather each tree is fit using information from previous trees. An event probability of stochastic gradient boosting model is given by
\hat{π_i} = \frac{1}{1 + exp[-f(x)]^\prime}
where f(x) is in the range of [-∞,∞] and its initial estimate of the model is f^{(0)}_i=log(\frac{π_{i}}{1-π_{i}}), where \hat{π} is the estimated sample proportion of a single class from the training set.
The output from GBM_Model
.
yvar <- c("Loan.Type") sample_data <- sample_data[c(1:120),] xvar <- c("sex", "married", "age", "havejob", "educ", "political.afl", "rural", "region", "fin.intermdiaries", "fin.knowldge", "income") BchMk.GBM <- GBM_Model(sample_data, c(xvar, "networth"), yvar ) BchMk.GBM$finalModel BchMk.GBM$Roc$auc
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.