vadis_line3 | R Documentation |
Calculate the third line of evidence for the VADIS method
vadis_line3(
mod_object,
path = NULL,
conditional = TRUE,
overwrite = c("no", "yes", "reload"),
verbose = FALSE
)
mod_object |
Either a list of random forest model objects, or a dataframe of variable importance scores, where rows represent predictors in the models and columns represent the varieties to compare. |
path |
Path in which to save the output as an R data file ( |
conditional |
logical. Should conditional (default) or unconditional permutation variable importance be computed. Only applies to |
overwrite |
Should the function overwrite data to location in |
verbose |
Should messages be printed? Default is |
The function loops through a list of model objects, extracts the coefficient estimates, and compiles them in a single dataframe.
A list
of length 4.
varimp.table
A dataframe of P predictors by M random forest models, containing the variable importance scores obtained for each predictor in the models.
rank.table
A dataframe of P predictors by M random forest models, containing the rankings of predictors in each model by variable importance score in varimp.table
.
distance.matrix
An M by M distance matrix of class dist
, derived from rank.table
. Values are calculated as 1 - the Spearman rank correlation \rho.
similarity.scores
A dataframe of similarity scores derive from distance.matrix
. See Szmrecsanyi et al. (2019) for details.
Jason Grafmiller
Szmrecsanyi, Benedikt, Jason Grafmiller & Laura Rosseel. 2019. Variation-Based Distance and Similarity Modeling: A Case Study in World Englishes. Frontiers in Artificial Intelligence 2. https://doi.org/10.3389/frai.2019.00023.
## Not run:
data_list <- split(particle_verbs_short, particle_verbs_short$Variety, drop = TRUE)
fmla <- Response ~ DirObjWordLength + DirObjDefiniteness + DirObjGivenness + DirObjConcreteness + DirObjThematicity + DirectionalPP + PrimeType + Semantics + Surprisal.P + Surprisal.V + Register
rf_func <- function(x) ranger(fmla, data = x, importance = "permutation")
rf_list <- lapply(data_list, rf_func)
names(rf_list) <- names(data_list)
line3 <- vadis_line3(rf_list, path = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.