Closed maxrodkin closed 5 years ago
memoise may help if your fitness function is expensive and/or your search is binary. But you don't provide the fitness function so I don't know.
fitness_share = function(x , fitness_data) { x1 <- x sharpe_val <- sharpe(x1, fitness_data$CMatrix, fitness_data$UsingInstr) constraint_val <- constraint(x1) x2 <-0 finess_val <- sharpe_val*20*constraint_val*multiconstr(x1,x2,fitness_data$UsingInstr,fitness_data$RestList) return (finess_val) }
and
"ga_param_type" = "real-valued",
yes, i understood, ga_param_type isn`t binary
Hello, Luca i tryed to use memoise(fitness) and got unsuccessfull result - GA became slower. How is it possible? Here is result: test replications elapsed relative average 1 ga_res 1 42.75 1.000 42.75 2 ga_res_memoised 1 49.08 1.148 49.08 2 rows My GA has calculating optimised portfolio. The piece of cofe: `