Description Usage Arguments Details Value Author(s) See Also Examples
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.
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, ...)
|
chr |
Original chromosome object (or numeric vector). |
bigbang |
The |
result |
The type of result needed. |
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 |
fitnessAid |
To avoid local minima, |
verbose |
Display internal steps for debugging purposes. |
... |
Additional arguments to fitnessFunc. |
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.
A chromosome when result=="highest" or result=="smallest"
and a data frame otherwise.
Victor Trevino
BigBang
, robustGeneBackwardElimination
.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.