Learn R Programming

ndl (version 0.2.18)

ndlVarimp: Permutation variable importance for classification using naive discriminative learning.

Description

ndlVarimp uses permutation variable importance for naive discriminative classification models, typically the output of ndlClassify.

Usage

ndlVarimp(object, verbose=TRUE)

Arguments

object

An object of class "ndlClassify" (or one that can be coerced to that class); typically a model object as produced by ndlClassify.

verbose

A logical (default TRUE) specifying whether the successive predictors being evaluated should be echoed to stdout.

Value

A list with two numeric vectors:

concordance

For binary response variables, a named vector specifying for each predictor the index of concordance when that predictor is permuted. For polytomous response variables, NA.

accuracy

A named vector specifying for each predictor the accuracy of the model with that predictor permuted.

Details

Variable importance is assessed using predictor permutation. Currently, conditional permutation variable importance (as for varimp for random forests in the party package) is not implemented.

References

R. Harald Baayen (2011). Corpus linguistics and naive discriminative learning. Brazilian journal of applied linguistics, 11, 295-328.

Carolin Strobl, Anne-Laure Boulesteix, Thomas Kneib, Thomas Augustin and Achim Zeileis (2008). Conditional Variable Importance for Random Forests. BMC Bioinformatics, 9, 307.

See Also

summary.ndlClassify, plot.ndlClassify, anova.ndlClassify, ndlCuesOutcomes, estimateWeights, cueCoding

Examples

Run this code
# NOT RUN {
data(dative)
dative <- dative[!is.na(dative$Speaker),-2]
dative.ndl <- ndlClassify(RealizationOfRecipient ~ ., data=dative)
dative.varimp <- ndlVarimp(dative.ndl)

library(lattice)
dotplot(sort(summary(dative.ndl)$statistics$accuracy-dative.varimp$accuracy), 
   xlab="permutation variable importance")
# }

Run the code above in your browser using DataLab