| eValidation | R Documentation |
Compares the ensemble proximity matrix with the E2Tree-estimated proximity matrix using multiple divergence and similarity measures. Can perform the Mantel test, permutation tests on divergence/similarity measures (nLoI, Hellinger, wRMSE, RV, SSIM), or both.
eValidation(
data,
fit,
D,
test = c("both", "mantel", "measures"),
graph = TRUE,
n_perm = 999,
conf.level = 0.95,
seed = NULL
)
data |
A data frame containing the variables in the model. |
fit |
An e2tree object. |
D |
The dissimilarity matrix obtained with |
test |
Character string specifying which tests to perform. One of
|
graph |
Logical (default TRUE). If TRUE, heatmaps are displayed. |
n_perm |
Integer. Number of permutations for the permutation
test on measures. Default is 999. Set to 0 to skip permutation testing.
Ignored when |
conf.level |
Numeric. Confidence level for intervals. Default is 0.95. |
seed |
Integer or NULL. Random seed for reproducibility. |
An object of class "eValidation" containing:
Ensemble proximity matrix (reordered)
E2Tree proximity matrix (reordered)
Mantel test result (NULL if test = "measures")
LoI object with decomposition (NULL if test = "mantel")
Data frame with all measures (NULL if test = "mantel")
Permutation test results for measures (if applicable)
## Classification:
data(iris)
smp_size <- floor(0.75 * nrow(iris))
train_ind <- sample(seq_len(nrow(iris)), size = smp_size)
training <- iris[train_ind, ]
ensemble <- randomForest::randomForest(Species ~ ., data=training,
importance=TRUE, proximity=TRUE)
D <- createDisMatrix(ensemble, data=training, label = "Species",
parallel = list(active=FALSE, no_cores = 1))
setting <- list(impTotal=0.1, maxDec=0.01, n=2, level=5)
tree <- e2tree(Species ~ ., training, D, ensemble, setting)
val <- eValidation(training, tree, D, n_perm = 199)
print(val)
summary(val)
plot(val)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.