Last data update: 2014.03.03

R: Parameters for Classifier Training
TrainParamsR Documentation

Parameters for Classifier Training

Description

Collects and checks necessary parameters required for classifier training. The empty constructor is provided for convenience.

Constructor

TrainParams() Creates a default TrainParams object. The classifier function is DLDA. Users should create an appropriate TrainParams object for the characteristics of their data, once they are familiar with this software.

TrainParams(classifier, transposeExpression, doesTests, ...) Creates a TrainParams object which stores the function which will do the classifier building and parameters that the function will use.

classifier

A function which will construct a classifier, and also possibly make the predictions. The first argument must be a matrix object. The second argument must be a vector of classes. The third argument must be verbose. If doesTests is TRUE, the third argument must be a matrix of test data and the fourth argument is verbose. The function's return value can be either a trained classifier when doesTests is FALSE or a vector of class predictions if doesTests is TRUE.

transposeExpression

Set to TRUE if classifier expects features as columns.

doesTests

Set to TRUE if classifier also performs and returns predictions.

intermediate

Character vector. Names of any variables created in prior stages by runTest that need to be passed to classifier.

...

Other named parameters which will be used by the classifier.

Author(s)

Dario Strbenac

Examples

if(require(sparsediscrim))
  trainParams <- TrainParams(dlda, transposeExpression = TRUE, doesTests = FALSE)
# sparsediscrim has a separate predict method for trained DLDA objects.
# dlda expects features in columns, and samples in rows.

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(ClassifyR)
Loading required package: Biobase
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

Welcome to Bioconductor

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

Loading required package: BiocParallel
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/ClassifyR/TrainParams-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: TrainParams
> ### Title: Parameters for Classifier Training
> ### Aliases: TrainParams TrainParams-class TrainParams,ANY-method
> ###   TrainParams,function-method
> 
> ### ** Examples
> 
> if(require(sparsediscrim))
+   trainParams <- TrainParams(dlda, transposeExpression = TRUE, doesTests = FALSE)
Loading required package: sparsediscrim
> # sparsediscrim has a separate predict method for trained DLDA objects.
> # dlda expects features in columns, and samples in rows.
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>