classPrediction: Function used to predict class evaluating a fitness function...

Description Usage Arguments Value Note Author(s) See Also

Description

Function used to predict class evaluating a fitness function in many train-test sets.

Usage

1
2
3
4
5
classPrediction(chr, 
	parent, 
	splits = 1:length(parent$data$splitTrain), 
	set = parent$data$testErrorWeights, 
	mode = c("sum", "probability", "class"))

Arguments

chr

Chromosome or vector object.

parent

Parent object, commonly BigBang object.

splits

Which sets of splits will be used to compute the fitness function. Default to all splits defined in parent$data$splitTrain.

set

Weigths used in training and test sets. Vector of two values. The first is the weight of train error. The second is the weight of test error. The default value is taken from parent$data$testErrorWeights whose default is c(0,1) (considering only test error).

mode

The type of value to return. "sum" returns a matrix with the number of times a sample (rows) has been predicted as any class (columns). The values are proportional to train and test weights. "probability" convertion of "sum" to probabilities dividing each row by its sum. "class" returns a vector of the predicted class given by majority vote.

Value

A matrix or vector depending on mode paramater.

Note

This function is designed to be used in forwardSelectionModels

Author(s)

Victor Trevino. Francesco Falciani Group. University of Birmingham, U.K.

See Also

forwardSelectionModels.BigBang, modelSelection , fitness , configBB.VarSel


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