Description Usage Arguments Value
View source: R/cross.validator.R
Returns three column matrix, with as many rows as there are crossvalidation subsets.
Column 1 has the fitted models
Column 2 has the confusion.matrix
for each cross-validation subset
Column 3 has the model.acc
for each cross-validation subset
1 2 3 4 5 | cross.validator(training.data, label, cv.marker, method, threads = 2,
nrounds = 10, eta = 0.1, subsample = 1, max.depth = 10,
eval_metric = "merror", early_stopping_rounds = 50,
colsample_bytree = 1, min_child_weight = 1, gamma = 1, seed = NULL,
verbose = 1)
|
training.data |
The data.frame of training data you want to cross-validate |
label |
A variable of the same length as the rows of |
cv.marker |
A numeric marker for cross-validation subsets |
method |
The method to use, currently either "randomForest" or "xgboost" |
threads |
number of threads to pass to xgboost to allow parralel computation, default is 2 |
nrounds |
The number of iterations for xgboost to perform, default is 10 |
eta |
The eta value to supply to xgboost, between 0 and 1, lowe values reduce overfitting, default 0.1 |
subsample |
The proportion of data for xgboost toapply to each tree, smaller values reduce overfitting, default 0.2 |
max.depth |
The maximum tree depth for xgboost, default is 10 |
verbose |
What level of printed output you want. See ?xgboost for details, 1 is default, 0 is silent |
A four column matrix (I realise this is not terribly elegant, it will probably be changed). The rows contain different cross-validation subsets.
The columns are as follows:
1. Fitted models for each cross-validation subset
2. The confusion.matrix
for each cross-validation subset
3. The model.acc
for each cross-validation subset
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.