Description Usage Arguments Value Examples
Decision Forest algorithm: Model prediction with constructed DF models. DT_models is a list of Decision Tree models (rpart.objects) generated by DF_train() DT_train_CV() is only designed for Cross-validation and won't generate models
1 |
DT_models |
Constructed DF models |
X |
Test Dataset |
Y |
Test data endpoint |
.$accuracy: Overall test accuracy
.$predictions: Detailed test prediction
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | data(demo_simple)
X = Data_simple$X
Y = Data_simple$Y
names(Y)=rownames(X)
random_seq=sample(nrow(X))
split_rate=3
split_sample = suppressWarnings(split(random_seq,1:split_rate))
Train_X = X[-random_seq[split_sample[[1]]],]
Train_Y = Y[-random_seq[split_sample[[1]]]]
Test_X = X[random_seq[split_sample[[1]]],]
Test_Y = Y[random_seq[split_sample[[1]]]]
used_model = DF_train(Train_X, Train_Y,stop_step=4, Method = "MCC")
Pred_result = DF_pred(used_model,Test_X,Test_Y)
DF_ConfPlot(Pred_result, Test_Y, bin = 40)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.