geneBackwardElimination: Searches for shorter or better models using backward...

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

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

1
2
3
4
5
6
7
geneBackwardElimination(chr, 
  bigbang, 
  result=c("highest","shortest", "selected", "visited"), 
  minChromosomeSize=2, 
  fitnessFunc=bigbang$galgo$fitnessFunc, 
  fitnessAid=-0.01, 
  verbose=FALSE, ...)

Arguments

chr

Original chromosome object (or numeric vector).

bigbang

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

result

The type of result needed. "highest" returns the visited chromosome whose fitness was highest. Ties are resolved using the shortest chromosome and finally by random. "shortest" returns the visited chromosome whose length was minimum and fitness greather than or equal to the original. Ties are resolved by highest fitness and finally by random. "visited" returns a list of all visited chromosomes. "selected" only the chromosomes with fitness greather than or equal to original fitness.

minChromosomeSize

The minimum possible size of a chromosome. The default is 2.

fitnessFunc

The fitness function used to evaluate the chromosomes. The default is the usage of bigbang$galgo$fitnessFunc.

fitnessAid

To avoid local minima, fitnessAid is an amount to be reduced to original fitness in order to try search for better fitness. When it is negative, it is interpreted as percentage value to reduce from the original fitness. If fitnessAid is positive, it is substracted from original fitness.

verbose

Display internal steps for debugging purposes.

...

Additional arguments to fitnessFunc.

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.

Value

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

Author(s)

Victor Trevino

See Also

BigBang, robustGeneBackwardElimination.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
	rchr <- lapply(bb$bestChromosomes[1:100],geneBackwardElimination, 
    bb, result="shortest")
	barplot(table(unlist(lapply(rchr,length))),
    main="Length of Shortened Chromosomes (evaluated in training)")

	rchr <- lapply(bb$bestChromosomes[1:100],robustGeneBackwardElimination, 
    bb, result="shortest")
	barplot(table(unlist(lapply(rchr,length))),main="Length of Shortened Chromosomes")
  
## End(Not run)

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