Description Usage Arguments Details Value Author(s) References See Also Examples
The Cross-Validation of Classification and Regression models using Random Forest
1 2 |
xtr |
A data frame or a matrix of predictors. |
ytr |
A response vector. If a factor, classification is assumed, otherwise regression is assumed. |
cv.fold |
The fold, the defalut is 5. |
type |
method type. |
trees |
Number of trees to grow. This should not be set to too small a number, to ensure that every input row gets predicted at least a few times. |
mtrysize |
Number of variables randomly sampled as candidates at each
split. Note that the default values are different for
classification (sqrt(p) where p is number of variables in
|
rf.cv
implements Breiman's random forest algorithm for classification and
regression. here we use it to make a k-fold cross-validation
if type is regression, the retrun a list containing four components:
RFpred
- the predicted values of the input data based on cross-validation
Error
- error for all samples
RMSECV
- Root Mean Square Error for cross-validation
Q2
- R2 for cross-validation
if type is classification, the retrun a list containing four components:
table
- confusion matrix
ACC
- accuracy
SE
- sensitivity
SP
- specifivity
F1
- a measure of a test's accuracy.
MCC
- Mathews correlation coefficient
RFPred
- the predicted values
prob
- the predicted probability values
Min-feng Zhu <wind2zhu@163.com>
Breiman, L. (2001), Random Forests, Machine Learning 45(1), 5-32.
See pls.cv
for the Cross-Validation of Classification and
Regression models using PLS
1 2 3 4 |
OpenJDK 64-Bit Server VM warning: Can't detect primordial thread stack location - find_vma failed
.....
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.