Open StefanoD opened 8 years ago
Yes that would be great! I'm currently cleaning up stuff in the develop branch which will lead to v0.3. Including your crate should be quite simple, I'll let you know how it worked.
Great! Maybe you can include performance tests; before and after.
It turns out to be a bit more difficult than expected: darwin-rs uses lower values for the fitness where as random choice uses higher values for better fitness. I could pass m - fitness
where m
is the fitness of the least fittest individual.
Or you could modify the calculation of the fitness? What is the upper bound of the biggest value? You could calculate it this way:
let fitness_high = MAX_VALUE - fitness_low;
Oh, sorry. You wrote the exact same thing.
No problem ;-) I'll try it and let you know.
Is there an interest to use the crate random choice in order to select samples by their fitness?
It should be with a runtime of O(n) faster than the existing solution which sorts the samples (O (n * log n))
https://github.com/StefanoD/Rust_Random_Choice