Selection of Genes and Gene Representation Independent Functions

This collection of gene representation-independent mechanisms for evolutionary and genetic algorithms for the R-package xega < https://CRAN.R-project.org/package=xega> contains four groups of functions: First, functions for selecting a gene in a population of genes according to its fitness value and for adaptive scaling of the fitness values as well as for performance optimization and measurement offer several variants for implementing the survival of the fittest. Second, evaluation functions for deterministic functions avoid recomputation. Evaluation of stochastic functions incrementally improve the estimation of the mean and variance of fitness values at almost no additional cost. Evaluation functions for gene repair handle error-correcting decoders. Third, timing and counting functions for profiling the algorithm pipeline are provided to assess bottlenecks in the algorithms. Fourth, a small collection of problem environments for function optimization, combinatorial optimization, and grammar-based genetic programming and grammatical evolution is provided for tutorial examples. For xega's architecture, see Geyer-Schulz, A. (2025) . The methods in the package are described by the following references: Baker, James E. (1987, ISBN:978-08058-0158-8), De Jong, Kenneth A. (1975) < https://deepblue.lib.umich.edu/handle/2027.42/4507>, Geyer-Schulz, Andreas (1997, ISBN:978-3-7908-0830-X), Grefenstette, John J. (1987, ISBN:978-08058-0158-8), Grefenstette, John J. and Baker, James E. (1989, ISBN:1-55860-066-3), Holland, John (1975, ISBN:0-472-08460-7), Lau, H. T. (1986) , Price, Kenneth V., Storn, Rainer M. and Lampinen, Jouni A. (2005) , Reynolds, J. C. (1993) , Schaffer, J. David (1989, ISBN:1-55860-066-3), Wenstop, Fred (1980) , Whitley, Darrell (1989, ISBN:1-55860-066-3), Wickham, Hadley (2019, ISBN:978-815384571).


# The R script xegaSelectGene.R

The directory selectGene contains the implementation 
of a set of selection and evaluation functions for 
a genetic algorithm. 


The easiest installation is by using install.packages from R.

1. Linux:
Start R in the directory where you have stored xegaSelectGene_0.0.0.1.tar.gz

> install.packages("xegaSelectGene_0.0.0.1.tar.gz")

1. Windows:
Start R in the directory where you have stored xegaSelectGene_0.0.0.1.zip

> install.packages("xegaSelectGene_0.0.0.1.zip")

The R script xegaSelectGene.R generates

1. the man pages of the package.
2. the pdf documentation of the package.
3. the compilation and installation of the package.
   (You  must adapt the variables path and pName
    in the script selectGene.R:

    path<-"~/dev/iaa/genetic/xega/"
    pName<-"xegaSelectGene"

    to the directory where you copy the package.

You need to install the R-package devtools for this R script.

There are two ways to use the code:

1. Change into the R directory which contains the code, start R and load all code files:

source("xegaSelectGene.R")

Note that the package selectGene provides selection and evaluation functions
to all genetic algorithms of the family sgX:
sga, sgp, sgPerm, (and  sge, sgde).

Use the pdf-Manual! 

2. Adapt the path in selectGene.R and install the library selectGene:

Rscript xegaSelectGene.R

Restart R and

library(xegaSelectGene)

You get all elements of the package by

xegaSelectGene::

and pressing the tabulator.

You get the man page by e.g 

SelectLinearRank?

or 

help(SelectLinearRank)

All examples given on a man page can be executed by

example(SelectLinearRank)

Note that man pages and examples are only available, if you install 
the package as a library.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("xegaSelectGene")

1.0.0.4 by Andreas Geyer-Schulz, 8 months ago


https://github.com/ageyerschulz/xegaSelectGene


Browse source code at https://github.com/cran/xegaSelectGene


Authors: Andreas Geyer-Schulz [aut, cre] (ORCID:


Documentation:   PDF Manual  


MIT + file LICENSE license


Suggests testthat


Imported by xega, xegaDfGene, xegaGaGene, xegaGeGene, xegaGpGene, xegaMigration, xegaPermGene, xegaPopulation.


See at CRAN