For Programmers: Free Programming Magazines  


Home > Archive > Matlab > April 2005 > about GA









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author about GA
mjram

2005-04-25, 9:00 am

Dear Sir or madam,

Hi.I used the GA in command line form to fit a linear 6 varable
function to a set of experimental datas.the function I wanted to
minimize was the sum of abs.value of deviation bettween teh. and Exp.
values in each point.When I wanted the value of this function to be
showen I found the final output X vector wont result the minimum
value for that!!!.Actualy, for some of gens the value of this test
function is so much less than of what the fval shows.
So,would you please help me about this problem please?

best regards,

mjram.
Rune Allnor

2005-04-25, 9:00 am


mjram wrote:
> Dear Sir or madam,
>
> Hi.I used the GA in command line form to fit a linear 6 varable
> function to a set of experimental datas.the function I wanted to
> minimize was the sum of abs.value of deviation bettween teh. and Exp.
> values in each point.When I wanted the value of this function to be
> showen I found the final output X vector wont result the minimum
> value for that!!!.Actualy, for some of gens the value of this test
> function is so much less than of what the fval shows.
> So,would you please help me about this problem please?


I'm not sure if I have understood the problem: You use the GA
to fit 6 variables to minimize some function. You can somehow
find the minimum by other means, and when you compare the
minima, the result provided by the GA does not match what
you know from other methods?

Provided I understand the problem correctly, you have stumbled
upon one of the fundamental problems of the GA. The GA randomly
samples the objective function, and does not use any sort of
gradients or other sequential methods to improve on the result.
You just have to let the GA run for long enough time, and hope
it is "sufficiently close" to the true answer when you decide
to abort it.

The obvious question is how one knows when an answer is
"sufficiently close" to the true answer, and when the
GA can be aborted. Well, that's one of the really troublesome
questions what GAs are concerned. Your guess is as good as mine.

Rune

mjram

2005-04-27, 4:00 am

Rune Allnor wrote:
>
>
>
> mjram wrote:
to[color=darkred]
and[color=darkred]
> Exp.
to[color=darkred]
> be
minimum[color=darkred]
> test
>
> I'm not sure if I have understood the problem: You use the GA
> to fit 6 variables to minimize some function. You can somehow
> find the minimum by other means, and when you compare the
> minima, the result provided by the GA does not match what
> you know from other methods?
>
> Provided I understand the problem correctly, you have stumbled
> upon one of the fundamental problems of the GA. The GA randomly
> samples the objective function, and does not use any sort of
> gradients or other sequential methods to improve on the result.
> You just have to let the GA run for long enough time, and hope
> it is "sufficiently close" to the true answer when you decide
> to abort it.
>
> The obvious question is how one knows when an answer is
> "sufficiently close" to the true answer, and when the
> GA can be aborted. Well, that's one of the really troublesome
> questions what GAs are concerned. Your guess is as good as mine.
>
> Rune
>
>

Dear Rune,
Hi and thank for reply.you are right I defined the test function
seperately and let it value be printed in output page and saw some
times the value of it is so smaller than the final resul(which is
shown as fval).But I thought we use GA for getting the extrimum
condition in a shorter time if not why we use it?after all how much
generation did you use if you did it?(the defult generation is 100).

best regards,

mjram.
Rune Allnor

2005-04-27, 9:01 am


mjram wrote:
> Rune Allnor wrote:
> to
> and
> to
> minimum
> Dear Rune,
> Hi and thank for reply.you are right I defined the test function
> seperately and let it value be printed in output page and saw some
> times the value of it is so smaller than the final resul(which is
> shown as fval).But I thought we use GA for getting the extrimum
> condition in a shorter time if not why we use it?


No. The GA is the absolutely last resort that one turns to
only after everything else has failed miserably. There is no
guarantee that a GA will ever find a good solution; but it just
might. It can take days and ws to run, and you never know
if the solution is at all relevant.

> after all how much
> generation did you use if you did it?(the defult generation is 100).


I was involved with GAs as supervisor for a student back in 1995,
when the GA hype was at its peak. We (well, my student...)
implemented a GA scheme for some inversion problem and set the
computer to work on it. He let the thing run for 1 w.

The results? We had ussed synthetic data as input, and wanted to
regenerate the input parameters. After 1 w of computations,
the GA had found three out of four parameters.

Hardly impressive, if you ask me. I haven't had the best
confidence in GAs since then, I know how they work and what
the can do, but I wouldn't use them if there are alternative
algorithms that work.

Rune

majid aram

2005-04-28, 4:06 am

Rune Allnor wrote:
>
>
>
> mjram wrote:
6[color=darkred]
> varable
wanted[color=darkred]
bettween teh.[color=darkred]
function[color=darkred]
the[color=darkred]
of this[color=darkred]
GA[color=darkred]
somehow[color=darkred]
stumbled[color=darkred]
randomly[color=darkred]
of[color=darkred]
result.[color=darkred]
hope[color=darkred]
decide[color=darkred]
troublesome[color=darkred]
> mine.
function[color=darkred]
> some
is[color=darkred]
>
> No. The GA is the absolutely last resort that one turns to
> only after everything else has failed miserably. There is no
> guarantee that a GA will ever find a good solution; but it just
> might. It can take days and ws to run, and you never know
> if the solution is at all relevant.
>
> 100).
>
> I was involved with GAs as supervisor for a student back in 1995,
> when the GA hype was at its peak. We (well, my student...)
> implemented a GA scheme for some inversion problem and set the
> computer to work on it. He let the thing run for 1 w.
>
> The results? We had ussed synthetic data as input, and wanted to
> regenerate the input parameters. After 1 w of computations,
> the GA had found three out of four parameters.
>
> Hardly impressive, if you ask me. I haven't had the best
> confidence in GAs since then, I know how they work and what
> the can do, but I wouldn't use them if there are alternative
> algorithms that work.
>
> Rune
>
>

Dear Rune,

Hi and thank you again.I am sorry to say that it was my fault and GA
was O.K
The function definition I use was additive in it's nature so the
small values that I saw were related to the first step not to the
finall result.I correct the place of reading the value of function
and saw that the fval is realy good and nearly the minimum value of
the test function.

best regards,
majid aram(MS of laser Physics&Technology)
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com