In Genetic Algorithm optimization, what is the y-axis of distance plot?
Show older comments
I use optimization toolbox ton plot the distance-plot. I am confused what the y-axis of the plot shows. Is it percentage?
Answers (2)
Walter Roberson
on 4 Dec 2017
0 votes
No, it is the average euclidean distance.
1 Comment
Rishav Aryal
on 4 Dec 2017
Alan Weiss
on 4 Dec 2017
Examine the distance plot function:
edit gaplotdistance
You see that the plot is of the average Euclidean distance between a random sample of 20 pairs of individuals.
Alan Weiss
MATLAB mathematical toolbox documentation
5 Comments
Rishav Aryal
on 5 Dec 2017
Alan Weiss
on 5 Dec 2017
Whatever units you have for the coordinate axes, assuming that all are the same coordinates. Otherwise, it is just the Euclidean distance in whatever coordinates you have for your control variables.
Alan Weiss
MATLAB mathematical toolbox documentation
Walter Roberson
on 5 Dec 2017
The unit would be the same unit as used by the objective function. If your objective function is programmed in furlongs per fortnight then the unit will be furlongs per fortnight; if your objective function is programmed in microfarads then the unit would be in microfarads.
If one of your parameters in your objective function is in ergs and another of your parameters is in degrees kelvin, then the distance will be in units of sqrt(ergs^2+kelvin^2), whatever that means.
Rishav Aryal
on 5 Dec 2017
Walter Roberson
on 5 Dec 2017
Yes. ga() will just treat the entries as numeric vectors, calculating the euclidean distance between the vectors as-if that is meaningful to do so. If all of the entries are the same unit, then the euclidean distance will work out to be in that unit as well. ga() does not put any interpretation on the meaning of the distance.
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!