varImpStruct-class {MLInterfaces} | R Documentation

## Class "varImpStruct" – collect data on variable importance from various machine learning methods

### Description

collects data on variable importance

### Objects from the Class

Objects can be created by calls of the form `new("varImpStruct", ...)`. These are matrices of importance measures with separate slots identifying algorithm generating the measures and variable names.

### Slots

`.Data`:
  Object of class `"matrix"` actual importance measures
`method`:
  Object of class `"character"` tag
`varnames`:
  Object of class `"character"` conformant vector of names of variables

### Extends

Class `"matrix"`, from data part. Class `"structure"`, by class `"matrix"`. Class `"array"`, by class `"matrix"`. Class `"vector"`, by class "matrix", with explicit coerce. Class `"vector"`, by class "matrix", with explicit coerce.

### Methods

plot
  `signature(x = "varImpStruct")`: make a bar plot, you can supply an argument resolveenv which will look up variable names in a translation environment
show
  `signature(object = "varImpStruct")`: simple abbreviated display
getVarImp
  `signature(object = "classifOutput")`: extractor of variable importance structure

### Examples

    library(golubEsets)
    data(Golub_Merge)
    library(hu6800)
    smallG <- Golub_Merge[1:60,]
    set.seed(1234)
    opar=par(no.readonly=TRUE)
    par(las=2, mar=c(10,11,5,5))
    rf <- randomForestB( smallG, "ALL.AML", 1:40, importance=TRUE )
    plot( getVarImp( rf ), n=10, resolveenv=hu6800SYMBOL )
    gb <- gbmB( smallG, "ALL.AML", 1:40 , n.minobsinnode=3 , n.trees=6000)
    plot( getVarImp( gb ), n=10, resolveenv=hu6800SYMBOL )
    set.seed(1234)
    rf2 <- MLearn(ALL.AML~., smallG, randomForestI, 1:40, importance=TRUE,
     sampsize=table(smallG$ALL.AML[1:40]), mtry=sqrt(ncol(exprs(smallG))))
    plot( getVarImp( rf2 ), n=10, resolveenv=hu6800SYMBOL ) # translation?
    par(opar)

[Package MLInterfaces version 1.12.0 Index]