Last data update: 2014.03.03

R: Parameters for Classifier Prediction
PredictParamsR Documentation

Parameters for Classifier Prediction

Description

Collects the function to be used for making predictions and any associated parameters.

Constructor

PredictParams() Creates a default PredictParams object. This assumes that the object returned by the classifier has a list element named "class".

PredictParams(predictor, transposeExpression, intermediate = character(0), getClasses, ...) Creates a PredictParams object which stores the function which will do the class prediction and parameters that the function will use.

predictor

A function to make predictions with. The first argument must accept the classifier made in the training step. The second argument must accept a matrix of new data.

transposeExpression

Set to TRUE if classifier expects features as columns.

intermediate

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

getClasses

A function to extract the vector of class predictions from the result object created by predictor.

...

Other arguments that predictor may use.

Author(s)

Dario Strbenac

Examples

predictParams <- PredictParams(predictor = predict, TRUE, getClasses = function(result) result)
# For prediction by trained object created by dlda function.
PredictParams(predictor = function(){}, TRUE, getClasses = function(result) result)
# For when the training function also does prediction and directly returns vector of predictions.

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/PredictParams-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: PredictParams
> ### Title: Parameters for Classifier Prediction
> ### Aliases: PredictParams PredictParams-class PredictParams,ANY-method
> ###   PredictParams,function-method
> 
> ### ** Examples
> 
> predictParams <- PredictParams(predictor = predict, TRUE, getClasses = function(result) result)
> # For prediction by trained object created by dlda function.
> PredictParams(predictor = function(){}, TRUE, getClasses = function(result) result)
An object of class "PredictParams"
Slot "predictor":
function () 
{
}

Slot "transposeExpression":
[1] TRUE

Slot "intermediate":
character(0)

Slot "getClasses":
function (result) 
result

Slot "otherParams":
list()

> # For when the training function also does prediction and directly returns vector of predictions.
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>