Mutation {hySAINT} | R Documentation |
Performing mutation
Description
This function gives mutant from parents.
Usage
Mutation(
myParent,
EVAoutput,
r1,
r2,
initial.temp = 1000,
cooling.rate = 0.95,
X,
y,
heredity = "Strong",
sigma,
varind = NULL,
interaction.ind = NULL,
lambda = 10
)
Arguments
myParent |
A numeric matrix with dimension |
EVAoutput |
The output from function |
r1 |
At most how many main effects do you want to include in your model?.
For high-dimensional data, |
r2 |
At most how many interaction effects do you want to include in your model? |
initial.temp |
Initial temperature. Default is 1000. |
cooling.rate |
A numeric value represents the speed at which the temperature decreases. Default is 0.95. |
X |
Input data. An optional data frame, or numeric matrix of dimension
|
y |
Response variable. A |
heredity |
Whether to enforce Strong, Weak, or No heredity. Default is "Strong". |
sigma |
The standard deviation of the noise term. In practice, sigma is usually
unknown. Users can estimate sigma from function |
varind |
A numeric vector that specifies the indices of variables to be extracted from |
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 |
lambda |
A numeric value defined by users. The number needs to satisfy the condition:
|
Value
Mutant. A numeric matrix with dimensions numElite
by r1+r2
.
See Also
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
EVAoutput <- EVA(X, y, r1 = 5, sigma = 0.01,
interaction.ind = interaction.ind)
myParent <- Initial(X = X, y = y, EVAoutput, r1 = 5, r2 = 2)
Mutation(myParent, EVAoutput, r1 = 5, r2 = 2, X = X, y = y,
sigma = 0.1, interaction.ind = interaction.ind)