get_importance: Feature (variable) importance of a fitted model

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/reshape-result.r

Description

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

Usage

1

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.

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.

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.

Author(s)

Christofer Bäcklin

See Also

emil

Examples

1
2
3
4
5
6
7
8
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)

emil documentation built on Aug. 1, 2018, 1:03 a.m.