Code Comments
Programming Forum and web based access to our favorite programming groups.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.
Post Follow-up to this messagemjram 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
Post Follow-up to this messageRune Allnor wrote: > > > > mjram wrote: to and > Exp. to > be minimum > 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.
Post Follow-up to this messagemjram 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
Post Follow-up to this messageRune Allnor wrote: > > > > mjram wrote: 6 > varable wanted bettween teh. function the of this GA somehow stumbled randomly of result. hope decide troublesome > mine. function > some is > > 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)
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.