help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] GSL - Simulated Annealing Question - Multiple Variables


From: Coyle, Jesse A
Subject: [Help-gsl] GSL - Simulated Annealing Question - Multiple Variables
Date: Thu, 3 Jun 2010 12:27:00 -0400 (EDT)

Hello all,

I had a question about the gsl simulated annealing code and I was hoping that 
maybe someone here might have a solution. I have been using the simulated 
annealing functions from the gsl library in an attempt to perform basic linear 
regressions. I have successfully utilized it for a simple one-variable case, 
however I am now in the process of trying to fit more variables. (i.e) y = b0 + 
b1x1 + b2x2. I am confused on how to pass multiple variables to the 
gsl_siman_solve function. I have tried a simple array, and also tried to use 
the gsl_vector structure. I am either having problems retrieving the current 
condition in the energy, step, and metric evaluations, or am passing condition 
to the gsl_siman_solve function improperly.Ultimately I would like to pass in 2 
variables (B0 and B1, or perhaps even more, and minimize them using 
experimental data. I have tried to alter the step function and metric function 
for multiple variables to no success. I have attached a sample code I thought 
might have worked, but every time I try to run it, I get a segmentation fault. 
If you have the time, maybe you could take a peek and see what I am doing wrong.

Thanks,

Jesse Coyle

Nuclear & Radiological Engineering
Georgia Institute of Technology

Attachment: vectortest.c
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]