Implementing the Nelder-Mead method on the TI Nspire

Implementing the Nelder-Mead method on the Nspire is pretty straight forward. This is after nothing turns up in the search for such library on the Internet. A sample below using the Rosenbrog function as a test target: f(x,y) = (a-x)^2 + b(y-x^2)^2, using a=1 and b=100.

nedler-mead-nspire

p is the initial parameter set with {10,10}.

nm(“nmfunc”, “p”, p) invoke the Nelder-Mead program, and specify “nmfunc” as the name of the objective function (which defined earlier); “p” as the name of the parameter set; and p the actual parameter.

Results are stored in the resultsmatrix set. 1st element is the function value, 2nd and 3rd are the x,y results respectively.

Took 22 seconds on real Nspire for this test set.

This program also helped determine the parameters for a logistic regression problem on another occasion, where it was not possible using the built-in Nspire logistic regression function since it supports only x-list and y-list but the problem involved 3 variables.

Advertisements

4 thoughts on “Implementing the Nelder-Mead method on the TI Nspire

  1. Pingback: Usage of the Nelder-Mead program for Logistic Regression in Nspire | gmgolem

  2. Pingback: Comparing bug prediction methods by logistic growth and Gompertz curve in Nspire | gmgolem

  3. Pingback: Nelder-Mead algorithm on the TI-84 Plus SE | gmgolem

  4. Pingback: Maximum likelihood for determining Weibull distribution parameters in TI Nspire CX CAS | gmgolem

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s