Thursday, May 3, 2012

NIST Tests - Part 1

As this is my first commit after getting selected for GSoC 2012, I would summarise the status of the project so far followed by progress made this week.

Project Status
  • Module declaring Nonlinear Model class using scipy.leastsq() was provided by my mentor, which implements nonlinear least squares method for data fitting. It also included tests against linear regression results.
  • During GSoC prelims, I added a mechanism to provide an external jacobian calculating function, both analytically and numerically, which helped to save the parameter values at each iteration of minimizaion algorithm.
  • The module was also updated, including a test for the above feature.
  • Now, we are testing the NonlinearLS class derived models against NIST models.
Progress This Week
At present, I am writing tests using NIST data for a corresponding model and comparing the results obtained against the certified values.
A module is used for reading NIST data files and create a corresponding test file. The test_generator module reads the model name, its function expression and analytical jacobian expression from a configuration file model_list.cfg and then creates a test class for the corresponding model.
The objective is to first check the resulting parameter values, which are calculated using the LM algorithm, followed by other result statistics.

Models labeled as of lower difficulty are implemented at present. Most of them them give satisfactory matches for parameter results upto 6-7 decimal places. The code can be viewed here. Also, the tests can be run using nosetests. As I have not uploaded the NIST data files, the module will not be able to give the output test files.

I will continue to develop test code for all the models. NIST results give us only parameter values and standard deviations. After we compare both of them, I will add more result statistics for nonlinear models.

No comments:

Post a Comment