kofnGA-package {kofnGA}R Documentation

kofnGA: A genetic algorithm for selection of fixed-size subsets.

Description

A genetic algorithm (GA) to do subset selection: search for a subset of a fixed size, k, from the integers 1:n, such that user-supplied function is minimized at that subset.

Details

This package provides the function kofnGA, which implements a GA to perform subset selection; that is, choosing the best k elements from among n possibilities. We label the set of possibilities from which we are choosing by the integers 1:n, and a solution is represented by an index vector, i.e., a vector of integers in the range [1, n] (with no duplicates) indicating which members of the set to choose. The objective function (defining which solution is “best”) is arbitrary and user-supplied; the only restriction on this function is that its first argument must be an index vector encoding the solution.

The search results output by kofnGA are a list object assigned to the S3 class GAsearch. The package includes summary, print, and plot methods for this class to make it easier to inspect the results.


[Package kofnGA version 1.3 Index]