Learn R Programming

galgo (version 1.4)

robustGeneBackwardElimination: Searches for shorter or better models using backward elimination strategy

Description

Searches for shorter or better models using backward elimination strategy. Recursively eliminates variables/genes from a chromosome one by one computing the fitness function. This function is specially designed to be used in the BigBang object and for variable selection problems.

Usage

robustGeneBackwardElimination(chr,
 bigbang, 
 fitnessFunc=bigbang$data$modelSelectionFunc, ...)

Arguments

chr

Original chromosome object (or numeric vector).

bigbang

The BigBang object to be used to call the fitness function.

fitnessFunc

The fitness function used to evaluate the chromosomes. The default is the usage of bigbang$data$modelSelectionFunc.

...

Additional Arguments passed to geneBackwardElimination.

Value

A chromosome when result=="highest" or result=="smallest" and a data frame otherwise.

Details

Removes one gene/variable at the time and compute the fitness. If the fitness is greather than or equal to original ``reduced'' fitness, another attempt to remove other variable will be performed. The result might be a reduced chromosome with same or better fitness.

See Also

BigBang, geneBackwardElimination.

Examples

Run this code
# NOT RUN {
	rchr <- lapply(bb$bestChromosomes[1:100],robustGeneBackwardElimination, 
		bb, result="shortest")
	barplot(table(unlist(lapply(rchr,length))),main="Length of Shortened Chromosomes")
	
# }

Run the code above in your browser using DataLab