Last data update: 2014.03.03

R: Class "varImpStruct" - collect data on variable importance...
varImpStruct-classR 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 arguments plat and toktype which will use lookUp(...,plat,toktype) from the annotate package to translate probe names to, e.g., gene symbols.

show

signature(object = "varImpStruct"): simple abbreviated display

getVarImp

signature(object = "classifOutput", fixNames="logical"): extractor of variable importance structure; fixNames parameter is to remove leading X used to make variable names syntactic by randomForest (ca 1/2008). You can set fixNames to false if using hu6800 platform, because all featureNames are syntactic as given.

report

signature(object = "classifOutput", fixNames="logical"): extractor of variable importance data, with annotation; fixNames parameter is to remove leading X used to make variable names syntactic by randomForest (ca 1/2008). You can set fixNames to false if using hu6800 platform, because all featureNames are syntactic as given.

Examples

library(golubEsets)
data(Golub_Merge)
library(hu6800.db)
smallG <- Golub_Merge[1001:1060,]
set.seed(1234)
opar=par(no.readonly=TRUE)
par(las=2, mar=c(10,11,5,5))
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, FALSE ), n=10, plat="hu6800", toktype="SYMBOL")
par(opar)
report( getVarImp( rf2, FALSE ), n=10, plat="hu6800", toktype="SYMBOL")

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(MLInterfaces)
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: annotate
Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: IRanges
Loading required package: S4Vectors

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: XML
Loading required package: cluster
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/MLInterfaces/varImpStruct-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: varImpStruct-class
> ### Title: Class "varImpStruct" - collect data on variable importance from
> ###   various machine learning methods
> ### Aliases: varImpStruct-class plot plot,varImpStruct-method
> ###   plot,varImpStruct,ANY-method show,varImpStruct-method
> ###   report,varImpStruct-method report getVarImp
> ###   getVarImp,classifOutput,logical-method
> ###   getVarImp,classifierOutput,logical-method
> ###   getVarImp,classifierOutput,missing-method
> ### Keywords: classes
> 
> ### ** Examples
> 
> library(golubEsets)
> data(Golub_Merge)
> library(hu6800.db)
Loading required package: org.Hs.eg.db


> smallG <- Golub_Merge[1001:1060,]
> set.seed(1234)
> opar=par(no.readonly=TRUE)
> par(las=2, mar=c(10,11,5,5))
> 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, FALSE ), n=10, plat="hu6800", toktype="SYMBOL")
> par(opar)
> report( getVarImp( rf2, FALSE ), n=10, plat="hu6800", toktype="SYMBOL")
                   MnDecrAcc            names
HG4740.HT5187_at 0.021650604 HG4740.HT5187_at
J02874_at        0.017182494            FABP4
HG960.HT960_at   0.006373695   HG960.HT960_at
J00301_at        0.006015279              PTH
J00073_at        0.005748520            ACTC1
HG987.HT987_at   0.004924434   HG987.HT987_at
HG4433.HT4703_at 0.004286754 HG4433.HT4703_at
J02611_at        0.003989544             APOD
HG511.HT511_at   0.003887520   HG511.HT511_at
HG64.HT64_at     0.003088376     HG64.HT64_at
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>