* Re: Simulated Annealing Print function
@ 2004-10-01 8:00 Anatoliy Belaygorod
0 siblings, 0 replies; 2+ messages in thread
From: Anatoliy Belaygorod @ 2004-10-01 8:00 UTC (permalink / raw)
To: gsl-discuss
Hello, again.
Unfortunately, nobody had any comments regarding my 2 questions I posted 10 days ago: one regarding Simulated annealing print function, another one regarding Multivariate Hessian.
I really need to get answers to these questions.
1. My co-author sent me code for one-dimensional first derivative function:
double my_dfridr(const gsl_function *f, double x, double h, double *err). The code he sent me is presumably state-of-the-art for one-dim argument (based on some cited Numerical Analysis books)
It has MUCH better numerical properties than gsl_diff_central both theoretically and in practice (he tested it and compared to GSL routines) and it is also using gsl_function type as an argument.
I attempted to generalize it to a high-dimensional argument by writing a GENERAL function of type
void my_dfridr_MV(const gsl_function *f, gsl_vector x, gsl_vector gradient, double h, double *err)
However, my humble programming skills are unfortunately, not that advanced, so after 3 days of futile attempts I was forced to take a shortcut and use problem-specific
structure of f.params, instead of void*.
My next target is doing the same thing with Hessian, i.e. going from a function of a scalar (he also sent me code for one-dim Hessian) to a function of a vector.
If anyone has any thoughts/opinions/suggestions, please speak up! Because I feel like I am re-inventing the wheel here:)... This is a standard stuff! Gradient, Hessian!
2. As far as simulated annealing, my question still stands:
I can run it, get the results, and print them using the print function, but I can't come up with a way of actually keeping these values and using them in the code following the simulated annealing steps.
Please, don't tell me that I have to re-write and recompile "gsl_siman_solve" in order to achieve that. You must have thought of some way - but it is not documented and just don't see it.
Please, reply to both questions, or at least one!
Thanks in advance,
Anatoliy
>Hello,
I am having a problem using the result of Simulated Annealing routine. The documentation, in my opinion, is not very adequate for this routine, so I am having some problems.
I gathered that the "gsl_siman_print_t" function is supposed to print out the results.
Instead of printing the ARGMIN on the screen, I want to store it in another variable for future usage in the program.
Unfortunately, just as the other 3 functions (Metric, Step, and Energy) used in "gsl_siman_solve", the print function must be written not to take any arguments (except void). So I can't think of a way to bring the ARGMIN values 'outside' the scope of the print function into the main function.
Also, because the function I am trying to maximize is a likelihood, the energy function must be a function of the data, however, for the same reason, because Energy function (just like the print function) doesn't take any arguments from outside, I have to re-load my data inside the energy function every time it evaluates it.
Please, help.
Regards,
Anatoliy
^ permalink raw reply [flat|nested] 2+ messages in thread
* Simulated Annealing Print function
@ 2004-09-21 9:06 Anatoliy Belaygorod
0 siblings, 0 replies; 2+ messages in thread
From: Anatoliy Belaygorod @ 2004-09-21 9:06 UTC (permalink / raw)
To: gsl-discuss
Hello,
I am having a problem using the result of Simulated Annealing routine. The documentation, in my opinion, is not very adequate for this routine, so I am having some problems.
I gathered that the "gsl_siman_print_t" function is supposed to print out the results.
Instead of printing the ARGMIN on the screen, I want to store it in another variable for future usage in the program.
Unfortunately, just as the other 3 functions (Metric, Step, and Energy) used in "gsl_siman_solve", the print function must be written not to take any arguments (except void). So I can't think of a way to bring the ARGMIN values 'outside' the scope of the print function into the main function.
Also, because the function I am trying to maximize is a likelihood, the energy function must be a function of the data, however, for the same reason, because Energy function (just like the print function) doesn't take any arguments from outside, I have to re-load my data inside the energy function every time it evaluates it.
Please, help.
Regards,
Anatoliy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-10-01 8:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-01 8:00 Simulated Annealing Print function Anatoliy Belaygorod
-- strict thread matches above, loose matches on Subject: below --
2004-09-21 9:06 Anatoliy Belaygorod
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).