Calculating number of operations during GA run
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Sandi Homolak
le 12 Nov 2022
Réponse apportée : Star Strider
le 12 Nov 2022
I need to evaluate the performance of a genetic algorithm and one of the parameters I'm using for this evaluations is time that is needed for that algorithm to finish. However, I've realized that such an evaluation would then depend on the specs of the machine that is running the algorithm and I want to avouid that. What would be the optimal way to calculate the number of operations that happend during the algorithms run (cause that metric would be the same regardless of the machine taht is running the code right?)
Is there something like "tic" .... "toc" but not for time but rather number of operations or anything else that could be used?
0 commentaires
Réponse acceptée
Star Strider
le 12 Nov 2022
A lot depends on the 'InitialPopulationMatrix' and how it is defined, parameter constraints, and other considerations.
If approximate ranges for the known parameters are defined in it, the the convergence will be faster and likely more accurate. In a different Answer I posted:
‘For example is R is in , L in , and C in (I have no idea what G woiuld be), it could be something like this:’
format shortE
IPM = randi(1E+4, 5, 4) .* [1 1E-9 1E-3 1E-15]
format shortG
That provides an illustration of scaling the 'InitialPopulationMatrix'.
Probably the best metric would be in the output result, specifically ‘funccount’, the number of times the fitness function is evaluated.
.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Genetic Algorithm dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!