hySAINT {hySAINT}R Documentation

Hybrid Genetic and Simulated Annealing Algorithm

Description

This is the main function of package hySAINT. It implements both genetic algorithm and simulated annealing. The simulated annealing technique is used within mutation operator.

Usage

hySAINT(
  X,
  y,
  heredity = "Strong",
  r1,
  r2,
  sigma,
  interaction.ind = NULL,
  varind = NULL,
  numElite = 40,
  max.iter = 500,
  initial.temp = 1000,
  cooling.rate = 0.95,
  lambda = 10
)

Arguments

X

Input data. An optional data frame, or numeric matrix of dimension n observations by p main effects.

y

Response variable. A n-dimensional vector.

heredity

Whether to enforce Strong, Weak, or No heredity. Default is "Strong".

r1

At most how many main effects do you want to include in your model?. For high-dimensional data, r1 cannot be larger than the number of screened main effects.

r2

At most how many interaction effects do you want to include in your model?

sigma

The standard deviation of the noise term. In practice, sigma is usually unknown. Users can estimate sigma from function selectiveInference::estimateSigma, then use the output as the sigma value.

interaction.ind

A two-column numeric matrix. Each row represents a unique interaction pair, with the columns indicating the index numbers of the variables involved in each interaction. Note that interaction.ind must be generated outside of this function using t(utils::combn(p,2)). See Example section for details.

varind

A numeric vector that specifies the indices of variables to be extracted from X.

numElite

Number of elite parents. Default is 40.

max.iter

Maximum number of iterations. Default is 500.

initial.temp

Initial temperature. Default is 1000.

cooling.rate

A numeric value represents the speed at which the temperature decreases. Default is 0.95.

lambda

A numeric value defined by users. The number needs to satisfy the condition: \lambda\geq 5.1/log(2). Default is 10.

Value

An object with S3 class "hySAINT".

Final.variable.names

Name of the selected effects.

Final.variable.idx

Index of the selected effects.

Final.model.score

Final Model ABC.

All.iter.score

Best ABC scores from initial parents and all iterations.

See Also

ABC, EVA, Initial, Crossover, Mutation

Examples

set.seed(0)
interaction.ind <- t(combn(10,2))
X <- matrix(rnorm(100*10,1,0.1), 100, 10)
epl <- rnorm(100,0,0.01)
y <- 1+X[,1]+X[,2]+X[,3]+X[,1]*X[,2]+X[,1]*X[,3]+epl
hySAINT(X, y, r1 = 5, r2 = 2, sigma = 0.01, interaction.ind = interaction.ind, max.iter = 5)

[Package hySAINT version 1.2.1 Index]