Learn R Programming

mvs (version 2.1.0)

importance.MVS: Calculate feature importance from an "MVS" object.

Description

Calculate feature importance at each level from an "MVS" object based on random forests.

Usage

# S3 method for MVS
importance(x, ...)

Value

An object of S3 class "MVSimportance".

Arguments

x

An object of class "MVS".

...

Further arguments to be passed to importance.

Author

Wouter van Loon <w.s.van.loon@fsw.leidenuniv.nl>

Examples

Run this code
# \donttest{ 
set.seed(012)
n <- 1000
X <- matrix(rnorm(8500), nrow=n, ncol=85)
views <- c(rep(1,45), rep(2,20), rep(3,20))
beta <- c(rep(10, 55), rep(0, 30)) * ((rbinom(85, 1, 0.5)*2)-1)
eta <- X %*% beta
p <- 1 /(1 + exp(-eta))
y <- rbinom(n, 1, p)

## 2-level MVS with random forest
fit <- MVS(x=X, y=y, views=views, type = "RF")
importance(fit)# }

Run the code above in your browser using DataLab