In Genetic Algorithm optimization, what is the y-axis of distance plot?

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)

No, it is the average euclidean distance.

1 Comment

Thank you. Could you guide me towards some reference to this answer? I would like to know a bit more but could not find anything about the distance plot anywhere.

Sign in to comment.

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

Thank you. What would be the unit (if any) of the y-axis?
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
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.
I had one optimization run with minimizing time (units: secs)as objective function. I ran another with maximizing length (units : cms) as optimizing function, with a slight change in the code. The distance plots of both runs look very similar (start around same value on y axis, say 50 and then become zero around the same no of generations) while the values of time and length differ by an order of 10. that is what is confusing me. The unit on y-axis would still be sec for the first run and cms for the second run? Thank you for the help.
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.

Sign in to comment.

Asked:

on 4 Dec 2017

Commented:

on 5 Dec 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!