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
- :
- Re: JMP Automatic Surrogate creation

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

Highlighted

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

May 27, 2019 6:55 AM
(376 views)

Hello all,

I am coding in an app using jsl (and yes, I know I can create a dashboard to do that :) ) and I am using surrogates. So far, the way it works is that I manually try out different types of surrogates (e.g. stepwise, NN, polynomials etc.) and according to my R2 and other available metrics, I decide which one to choose for each dependent variable of my analysis. My question is: is there a less manual way for JMP to automatically create surrogates, try different types out and keep the ones with the most accurate fit instead of me going ahead and creating the different types manually and choosing?

Thanks,

Eva

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

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

Hello Eva,

Please take a look at the following example:

```
dt = Open( "$SAMPLE_DATA/Boston Housing.jmp" );
neural_fits = Neural(
Y( :chas ),
X( :crim, :indus, :nox, :rooms, :age, :distance, :radial ),
);
// =========== You need to modify the above for your specific problem
min_neurons = 5;
max_neurons = 10;
r2_list = {};
For( i=min_neurons, i<=max_neurons, i++,
neural_fits << Fit( NTanH( i ) )
);
For( i=1, i<=(max_neurons-min_neurons+1), i++,
r2_list = Insert( r2_list, ( neural_fits << ( Fit[i] << Get RSquare Validation ) )[1] )
);
best_r2_fit = Loc Max( Matrix( r2_list ) );
For( i=(max_neurons-min_neurons+1), i>=1, i--, // must be backwards because the fit numbers shift as you remove them
If( i != best_r2_fit,
neural_fits << ( Fit[i] << Remove Fit )
)
);
```

This script creates 6 different Neural models and makes a decision based on validation R2 to pick one. Insert some "show" statements here and there to see what's going on.

When you extend this to other methods, you'll have to find their specific commands to extract R2 information (or whatever metric you'd like to work with). This is specific to the neural platform. You can put together a more complicated logic if you want to vary the number of other types of activation functions or go into boosting etc.

Hope this helps and let me know if you have further questions.

What we see of the real world is not the unvarnished real world but a model of the real world, constructed so it is useful for dealing with the real world. —Richard Dawkins

1 REPLY 1

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

Hello Eva,

Please take a look at the following example:

```
dt = Open( "$SAMPLE_DATA/Boston Housing.jmp" );
neural_fits = Neural(
Y( :chas ),
X( :crim, :indus, :nox, :rooms, :age, :distance, :radial ),
);
// =========== You need to modify the above for your specific problem
min_neurons = 5;
max_neurons = 10;
r2_list = {};
For( i=min_neurons, i<=max_neurons, i++,
neural_fits << Fit( NTanH( i ) )
);
For( i=1, i<=(max_neurons-min_neurons+1), i++,
r2_list = Insert( r2_list, ( neural_fits << ( Fit[i] << Get RSquare Validation ) )[1] )
);
best_r2_fit = Loc Max( Matrix( r2_list ) );
For( i=(max_neurons-min_neurons+1), i>=1, i--, // must be backwards because the fit numbers shift as you remove them
If( i != best_r2_fit,
neural_fits << ( Fit[i] << Remove Fit )
)
);
```

This script creates 6 different Neural models and makes a decision based on validation R2 to pick one. Insert some "show" statements here and there to see what's going on.

When you extend this to other methods, you'll have to find their specific commands to extract R2 information (or whatever metric you'd like to work with). This is specific to the neural platform. You can put together a more complicated logic if you want to vary the number of other types of activation functions or go into boosting etc.

Hope this helps and let me know if you have further questions.

What we see of the real world is not the unvarnished real world but a model of the real world, constructed so it is useful for dealing with the real world. —Richard Dawkins

Article Labels

There are no labels assigned to this post.