Displaying 2 results from an estimated 2 matches for "pmutation".
Did you mean:
mutation
2025 May 07
1
How to get the same result for GA optimization?
...(rnorm(1000 * 30), nc = 30))
Fitness_Fn = function(x) {
return(cor(Dat[, 1], as.matrix(Dat[, -1]) %*% matrix(x, nc = 1))[1,1])
}
ga(type = 'real-valued', fitness = Fitness_Fn, seed = 1, lower =
rep(0, 30), upper = rep(1, 30), elitism = 10, popSize = 200, maxiter =
1, pcrossover = 0.9, pmutation = 0.9, run = 1)
However now I alter the columns of my data and rerun the GA
Dat = Dat[, c(1, 1 + sample(1:30, 30, replace = F))]
Fitness_Fn = function(x) {
return(cor(Dat[, 1], as.matrix(Dat[, -1]) %*% matrix(x, nc = 1))[1,1])
}
ga(type = 'real-valued', fitness = Fitness_Fn, seed = 1...
2025 May 07
1
How to get the same result for GA optimization?
...itness_Fn = function(x) {
> return(cor(Dat[, 1], as.matrix(Dat[, -1]) %*% matrix(x, nc = 1))[1,1])
> }
>
> ga(type = 'real-valued', fitness = Fitness_Fn, seed = 1, lower =
> rep(0, 30), upper = rep(1, 30), elitism = 10, popSize = 200, maxiter =
> 1, pcrossover = 0.9, pmutation = 0.9, run = 1)
>
> However now I alter the columns of my data and rerun the GA
>
> Dat = Dat[, c(1, 1 + sample(1:30, 30, replace = F))]
> Fitness_Fn = function(x) {
> return(cor(Dat[, 1], as.matrix(Dat[, -1]) %*% matrix(x, nc = 1))[1,1])
> }
>
> ga(type = 're...