Closed kchaitanyabandi closed 5 years ago
It seems that when applying the (non linear) selection operator the computed probability of selection is either non-finite or negative. This could be due to my code or to your fitness function. But without a minimal reproducible example is impossible to exactly figure out the problem. You may want to try a different selection operator.
Hi Luca, I am to new to GA but I could run it well. however when i try to optimize parameters it gives also an error after few itérations. For example,I would like to limits the nBits to a fix number, let's say 10 (instead ot total nb of vars, >100). can I do this or there are conflicts ?
grazie mille & best regards Manuela
Can you provide a a minimal reproducible example of the error you got? For the second question, I understood that you want to optimise a fitness function where your decision variables are binary and only a subset of them should be set a 1 and 0 the remaining. If this is your problem, I would encode the set of solutions using random-key GAs.
hi, yes, thanks, my decision var is indeed binary. here the msg: Error in { : task 45 failed - "NA in a call to an external function (argument 6)"
I am not sure I will be able to do it with random-key GAs, but I will try. Many thanks anyway
This is not a minimal reproducible example (data+code https://en.wikipedia.org/wiki/Minimal_Working_Example), it is simply the error message, which likely is issued by the fitness function you defined.
Hi,
I'm trying to run GA with a custom fitness function. I'm working with a company and hence cannot give you a reproducible example but I wanted to know when and why does the following error occur ?
Error in ga_nlrSelection_Rcpp(object, q) : Probabilities must be finite and non-negative!
Thanks and Regards Krishna Chaitanya Bandi