classPredictionMatrix.BigBang: Predicts class for samples from chromosomes

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Predicts class for samples from chromosomes.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S3 method for class 'BigBang'
classPredictionMatrix(o,
	filter="none",
	subset=TRUE,
	classFunc=o$data$classFunc,
	classes=NULL,
	sampleNames=NULL,
	chromosomes=NULL,
	verbose=TRUE,
	use.cache=TRUE,
	...)

Arguments

filter

The BigBang object can save information about solutions that did not reach the goalFitness. filter=="solutions" ensures that only chromosomes that reach the goalFitness are considered. fitlter=="none" take all chromosomes. filter=="nosolutions" consider only no-solutions (for comparative purposes).

subset

Second level of filter. subset can be a vector specifying which filtered chromosomes are used. It can be a logical vector or a numeric vector (indexes in order given by $bestChromosomes in BigBang object variable). If it is a numeric vector length one, a positive value means take those top chromosomes sorted by fitness, a negative value take those at bottom.

classFunc

The function that provides the class prediction.

classes

The known classes if they are different than those in BigBang$classes (or BigBang$data$classes).

sampleNames

Sample names if they are different than those in BigBang$classes (or BigBang$data$classes).

chromosomes

Specific chromosome list. The default is use the solution from BigBang object filtered by filter and subset.

verbose

Display processing information.

use.cache

Save/Restore values from previous computations with same parameters.

Details

classFunc is called for each chromosome, therefore this routine can be time consuming depending on the behaviour of classFunc. The default classFunc from configBB.VarSel computes the class by majority of votes using all splits. Use ... for specifying splits, set or any other parameter for classFunc.

Value

A matrix whose rows are samples and columns are classes. Each value is the number of times the sample was predicted as that class.

Author(s)

Victor Trevino. Francesco Falciani Group. University of Birmingham, U.K. http://www.bip.bham.ac.uk/bioinf

References

Goldberg, David E. 1989 Genetic Algorithms in Search, Optimization and Machine Learning. Addison-Wesley Pub. Co. ISBN: 0201157675

See Also

For more information see BigBang. *confusionMatrix().

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
   #bb is a BigBang object
   cpm <- classPredictionMatrix(bb)
   cpm
   cm <- confusionMatrix(bb)
   cm
   #equivalent and quicker because classPredictionMatrix is provided
   cm <- confusionMatrix(bb, cpm)
   cm
 
   specificityClass(bb, cm)
   specificityClass(bb, cpm)
   specificityClass(bb)
   # all are equivalent
   sensitivityClass(bb, cpm)
   sensitivityClass(bb, cm)
   sensitivityClass(bb)
   # all are equivalent
   
## End(Not run)
 

galgo documentation built on May 2, 2019, 4:20 a.m.