Learn R Programming

gaselect R package

This R package implements a genetic algorithm (GA) for variable selection as described in Kepplinger, D., Filzmoser, P., and Varmuza, K. (2017). Variable selection with genetic algorithms using repeated cross-validation of PLS regression models as fitness measure. https://arxiv.org/abs/1711.06695.

Installation

To install the latest release from CRAN, run the following R code in the R console:

install.packages('gaselect')

The most recent stable version as well as the developing version might not yet be available on CRAN. These can be directly installed from github using the devtools package:

# Install the most recent stable version:
install_github('dakep/gaselect')
# Install the (unstable) develop version:
install_github('dakep/gaselect', ref = 'develop')

Copy Link

Version

Install

install.packages('gaselect')

Monthly Downloads

174

Version

1.0.24

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

David Kepplinger

Last Published

December 16th, 2025

Functions in gaselect (1.0.24)

evaluate

Evaluate the fitness of variable subsets
fitnessEvolution

Get the evolution of the fitness
evaluatorUserFunction

User Defined Evaluator
fitness

Get the fitness of a variable subset
formatSegmentation

Format the raw segmentation list returned from the C++ code into a usable list
subsets

Get the found variable subset(s)
trueFitnessVal

Get the transformed fitness values
GenAlgUserEvaluator-class

User Function Evaluator
validData

Check if the data is valid for the evaluator
GenAlg-class

Result of a genetic algorithm run
GenAlgEvaluator-class

Evaluator Base Class
genAlg

Genetic algorithm for variable subset selection
GenAlgFitEvaluator-class

Fit Evaluator
evaluatorPLS

PLS Evaluator
evaluatorLM

LM Evaluator
GenAlgPLSEvaluator-class

PLS Evaluator
GenAlgControl-class

Control class for the genetic algorithm
genAlgControl

Set control arguments for the genetic algorithm
GenAlgLMEvaluator-class

LM Evaluator
toCControlList

Transform the object to a list
evaluatorFit

Fit Evaluator
getEvalFun

Get the evaluation function from a GenAlgUserEvaluator