Learn R Programming

emil (version 2.2.10)

get_importance: Feature (variable) importance of a fitted model

Description

Note that different methods calculates feature importance in different ways and that they are not directly comparable.

Usage

get_importance(object, format, ...)

Arguments

object

Fitted model.

format

Table format of the output. See http://en.wikipedia.org/wiki/Wide_and_narrow_data for more info.

...

Sent on to the procedure's feature importance scoring function.

Value

A vector of length p or an p-x-c matrix of feature importance scores where p is the number of descriptors and c is the number of classes.

Details

When extending the emil framework with your own method, the importance function should return a data frame where one column is called "feature" and the remaining columns are named after the classes.

See Also

emil

Examples

Run this code
# NOT RUN {
procedure <- modeling_procedure("pamr")
model <- fit("pamr", x=iris[-5], y=iris$Species)
get_importance(model)

cv <- resample("crossvalidation", iris$Species, nrepeat=2, nfold=3)
result <- evaluate("pamr", iris[-5], iris$Species, resample=cv,
                   .save=c(importance=TRUE))
get_importance(result)
# }

Run the code above in your browser using DataLab