Type: | Package |
Title: | A Simple Implementation and Demonstration of Gradient Boosting |
Version: | 0.1.1 |
Date: | 2016-04-19 |
Description: | A basic, clear implementation of tree-based gradient boosting designed to illustrate the core operation of boosting models. Tuning parameters (such as stochastic subsampling, modified learning rate, or regularization) are not implemented. The only adjustable parameter is the number of training rounds. If you are looking for a high performance boosting implementation with tuning parameters, consider the 'xgboost' package. |
License: | GPL-3 |
Depends: | R (≥ 3.1.1), rpart (≥ 4.1-10) |
Suggests: | testthat |
URL: | https://github.com/dashaub/DidacticBoost |
BugReports: | https://github.com/dashaub/DidacticBoost/issues |
ByteCompile: | true |
NeedsCompilation: | no |
LazyData: | TRUE |
RoxygenNote: | 5.0.1 |
Packaged: | 2016-04-19 01:46:08 UTC; david |
Author: | David Shaub [aut, cre] |
Maintainer: | David Shaub <davidshaub@gmx.com> |
Repository: | CRAN |
Date/Publication: | 2016-04-19 08:11:59 |
Simple Gradient Boosting
Description
Fit a simple, educational implementation of tree-based gradient boosting model.
Usage
fitBoosted(formula, data, iterations = 100, verbose = TRUE)
Arguments
formula |
an object of class "formula" with a response but no interaction terms.
The response variable should be a binomial factor that has values of |
data |
the dataframe containing the independent variables and the response |
iterations |
The number of training rounds for boosting. |
verbose |
should the current training round be printed to the console? |
Value
An S3 object of class boosted
. This includes
Examples
k <- kyphosis
k$Kyphosis <- factor(ifelse(k$Kyphosis == "present", 1L, -1L))
fit <- fitBoosted(Kyphosis ~ Age + Number + Start, data = k, iterations = 10)
Is the Object a Boosted Model
Description
Test the inheritance of an object
Usage
is.boosted(x)
Arguments
x |
any |
Value
TRUE
if the object is a boosted model
Model Predictions
Description
Apply a fitted boosted
model to newdata to form predictions. If no newdata
is included, returned the fitted values of the model.
Usage
## S3 method for class 'boosted'
predict(object, newdata = NULL, ...)
Arguments
object |
a |
newdata |
the new independent variables to use for prediction. This should be a data frame. |
... |
additional arguments affecting the predictions produced (ignored). |
Value
predict.boosted
produces a numeric vector with the predicted classes from the boosted
model.