Calculating number of operations during GA run
조회 수: 2 (최근 30일)
이전 댓글 표시
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
채택된 답변
Star Strider
2022년 11월 12일
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Genetic Algorithm에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!