Calculating number of operations during GA run
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sandi Homolak
am 12 Nov. 2022
Beantwortet: Star Strider
am 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 Kommentare
Akzeptierte Antwort
Star Strider
am 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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Genetic Algorithm finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!