Description Usage Arguments Value Examples
Main function for deepboost model creation, using a formula
1 2 3 |
formula |
A R Formula object see : ?formula |
data |
A data.frame of samples to train on |
instance_weights |
The weight of each example |
tree_depth |
maximum depth for a single decision tree in the model |
num_iter |
number of iterations = number of trees in ensemble |
beta |
regularisation for scores (L1) |
lambda |
regularisation for tree depth |
loss_type |
- "l" logistic, "e" exponential |
verbose |
- print extra data while training TRUE / FALSE |
A trained Deepbost model
1 2 3 4 5 6 | deepboost.formula(y ~ .,
data.frame(x1=rep(c(0,0,1,1),2),x2=rep(c(0,1,0,1),2),y=factor(rep(c(0,0,0,1),2))),
num_iter=1)
deepboost.formula(y ~ .,
data.frame(x1=rep(c(0,0,1,1),2),x2=rep(c(0,1,0,1),2),y=factor(rep(c(0,0,0,1),2))),
num_iter=2, beta=0.1, lambda=0.00125)
|
Iteration: 1, error: 0.25, avg tree size: 1, num trees: 1
[1] "Model error: 0.25"
[1] "Average tree size: 1"
[1] "Number of trees: 1"
Iteration: 1, error: 0.25, avg tree size: 1, num trees: 1
Iteration: 2, error: 0, avg tree size: 3, num trees: 2
[1] "Model error: 0"
[1] "Average tree size: 3"
[1] "Number of trees: 2"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.