Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/cran/GenAlgo
15 April 2025, 02:00:42 UTC
  • Code
  • Branches (6)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    • refs/tags/2.1.3
    • refs/tags/2.1.4
    • refs/tags/2.1.5
    • refs/tags/2.2.0
    • refs/tags/2.2.1
    No releases to show
  • 463915a
  • /
  • man
  • /
  • genalg-class.Rd
Raw File Download Save again
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge
swh:1:cnt:30b787b9a4410dda1cd365e7ec5730a4aba17a49
origin badgedirectory badge
swh:1:dir:a4809d9ae796fb30d7003f8292540bcf7bcc8fa1
origin badgerevision badge
swh:1:rev:65e538b83ff79745d9c1a7081559cbc899cc364a
origin badgesnapshot badge
swh:1:snp:ff3e10314980801143895c1e6e8c5b7090024906

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
Tip revision: 65e538b83ff79745d9c1a7081559cbc899cc364a authored by Kevin R. Coombes on 07 April 2025, 21:00:02 UTC
version 2.2.1
Tip revision: 65e538b
genalg-class.Rd
\name{GenAlg-class}
\alias{GenAlg-class}
\alias{as.data.frame,GenAlg-method}
\alias{as.matrix,GenAlg-method}
\alias{summary,GenAlg-method}
\docType{class}
\title{Class "GenAlg"}
\description{
  Objects of the \code{GenAlg} class represent one step (population) in the
  evolution of a genetic algorithm. This algorithm has been customized to
  perform feature selection for the class prediction problem.
}
\usage{
\S4method{as.data.frame}{GenAlg}(x, row.names=NULL, optional=FALSE, \dots)
\S4method{as.matrix}{GenAlg}(x, \dots)
\S4method{summary}{GenAlg}(object, \dots)
}
\arguments{
  \item{object}{object of class \code{GenAlg}}
  \item{x}{object of class \code{GenAlg}}
  \item{row.names}{character vector giving the row names for the data frame,
    or \code{NULL}}
  \item{optional}{logical scalar. If \code{TRUE}, setting row names and
    converting column names to syntactic names is optional.}
  \item{\dots}{extra arguments for generic routines}
} 
\section{Objects from the Class}{
  Objects should be created by calls to the \code{\link{GenAlg}} generator;
  they will also be created automatically as a result of applying the function
  \code{\link{newGeneration}} to an existing \code{GenAlg} object.
}
\section{Slots}{
  \describe{
    \item{\code{data}:}{The initial population of potential solutions,
      in the form of a data matrix with one individual per row.}
    \item{\code{fitfun}:}{A function to compute the fitness of an
      individual solution. Must take two input arguments: a vector of
      indices into the rows of the population matrix, and a \code{context}
      list within which any other items required by the function can be
      resolved. Must return a real number; higher values indicate better
      fitness, with the maximum fitness occurring at the optimal solution
      to the underlying numerical problem.} 
    \item{\code{mutfun}:}{A function to mutate individual alleles in the
      population. Must take two arguments: the starting allele and a
      \code{context} list as in the fitness function.}
    \item{\code{p.mutation}:}{numeric scalar between \code{0} and \code{1},
      representing the probability that an individual allele will be mutated.}
    \item{\code{p.crossover}:}{numeric scalar between \code{0} and \code{1},
      representing the probability that crossover will occur during
      reproduction.}
    \item{\code{generation}:}{integer scalar identifying the current
      generation.}
    \item{\code{fitness}:}{numeric vector containing the fitness of
      all individuals in the population.}
    \item{\code{best.fit}:}{A numeric value; the maximum fitness.}
     \item{\code{best.individual}:}{A matrix (often with one row)
       containing the individual(s) achieving the maximum fitness. }
    \item{\code{context}:}{A list of additional data required to perform
      mutation or to compute fitness. This list is passed along as the
      second argument when \code{fitfun} and \code{mutfun} are called.}
  }
}
\section{Methods}{
  \describe{
    \item{as.data.frame}{\code{signature(x = "GenAlg")}: Converts the
      \code{GenAlg} object into a data frame.  The first column contains
      the fitness ; remaining columns contain three selected features,
      given as integer indices into the rows of the original data matrix. }
    \item{as.matrix}{\code{signature(x = "GenAlg")}: Converts the GenAlg
      object into a matrix, following the conventions of \code{as.data.frame}.}
    \item{summary}{\code{signature(object = "GenAlg")}: Print a summary
      of the GenAlg object.}
  }
}
\author{
  Kevin R. Coombes \email{krc@silicovore.com},
  P. Roebuck \email{proebuck@mdanderson.org}
}
\references{
  David Goldberg.\cr
  "Genetic Algorithms in Search, Optimization and Machine Learning."\cr
  Addison-Wesley, 1989.
}
\seealso{
  \code{\link{GenAlg}},
  \code{\link{GenAlg-tools}},
  \code{\link{maha}}.
}
\examples{
showClass("GenAlg")
}
\keyword{classes}
\keyword{optimize}
\keyword{classif}

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API