turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Nonlinear Fit SSE Grid

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Feb 4, 2015 12:34 PM
(724 views)

I want to program a grid search prior to a nonlinear fit.

SSE grid gives me what I want, but it doesn't look like it is scriptable? (i.e. I want to automate it fully).

Any ideas?

Dave

-Dave

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Solution

Not sure I understand what you want, but if the goal is to use the SSE Grid for improving the initial parameter settings, the approach below may be useful and quite fast.

dt = Open**(** "$SAMPLE_DATA/Nonlinear Examples/US Population.jmp" **)**;

h = **{**"Min", "Max", "Number?"**}**; // colbox headers

m = **[****12** **17** **10**,

**0.005** **0.03** **10****]**; // Input ranges for the grid

nl = dt << **Nonlinear****(** Y**(** :pop **)**, X**(** :Name**(** "X-formula" **)** **)**, SSE grid **)**;

// Specify the grid and make table

grid_ob = Report**(** nl **)[**Outline Box**(** "specify?" **)]**;

For**(** i = **1**, i <= **3**, i++,

grid_ob**[**Number Col Box**(** h**[**i**]** **)]** << **set values****(** m**[****0**, i**]** **)**

**)**;

grid_ob**[****2****]** << **click**;

dt_grid = Current Data Table**()**;

//Find min SSE and make matrix of parameters

min_SSE=Loc Min**(** Column**(** dt_grid, "SSE" **)** << **get as matrix****)**;

init_params = Matrix**(**

Repeat**(**

i = **0**;

**{**i++ ; Column**(** dt_grid, i **)[**min_SSE**]}**;,

N Row**(** m **)**

**)**

**)**;

// Set initial parameters and finish

Report**(** nl **)[**Number Col Edit Box**(** "Current Value" **)]** << **set values****(** init_params **)**;

nl << **finish**;

5 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Feb 4, 2015 12:39 PM
(593 views)

My question was specifically whether the SSE Grid message could be fully programmed.

I have another way which I think will work:

- set iteration limit to zero

- perform the fit

- extract the SSE value

do all this in a grid search loop.

I think that will work, so I don't need an answer unless someone knows some hidden parameters for the SSE Grid message

-Dave

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Feb 4, 2015 1:03 PM
(593 views)

The approach I described worked but is much slower than I would like.

So still looking to code up SSE Grid - or figure out how it does it so fast that I can code it up myself

-Dave

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Not sure I understand what you want, but if the goal is to use the SSE Grid for improving the initial parameter settings, the approach below may be useful and quite fast.

dt = Open**(** "$SAMPLE_DATA/Nonlinear Examples/US Population.jmp" **)**;

h = **{**"Min", "Max", "Number?"**}**; // colbox headers

m = **[****12** **17** **10**,

**0.005** **0.03** **10****]**; // Input ranges for the grid

nl = dt << **Nonlinear****(** Y**(** :pop **)**, X**(** :Name**(** "X-formula" **)** **)**, SSE grid **)**;

// Specify the grid and make table

grid_ob = Report**(** nl **)[**Outline Box**(** "specify?" **)]**;

For**(** i = **1**, i <= **3**, i++,

grid_ob**[**Number Col Box**(** h**[**i**]** **)]** << **set values****(** m**[****0**, i**]** **)**

**)**;

grid_ob**[****2****]** << **click**;

dt_grid = Current Data Table**()**;

//Find min SSE and make matrix of parameters

min_SSE=Loc Min**(** Column**(** dt_grid, "SSE" **)** << **get as matrix****)**;

init_params = Matrix**(**

Repeat**(**

i = **0**;

**{**i++ ; Column**(** dt_grid, i **)[**min_SSE**]}**;,

N Row**(** m **)**

**)**

**)**;

// Set initial parameters and finish

Report**(** nl **)[**Number Col Edit Box**(** "Current Value" **)]** << **set values****(** init_params **)**;

nl << **finish**;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Feb 4, 2015 6:07 PM
(593 views)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Feb 4, 2015 1:38 PM
(593 views)

I will code up the SSE calculation myself without using the platform. This should be as fast as the SSE Grid unless it is doing something really clever.

Consider this closed.

-Dave