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

- JMP User Community
- :
- Discussions
- :
- Re: Col>modelling utilities> explore outlier scripting

- 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

Mar 12, 2016 9:29 PM
(16502 views)

HI All,

I have a question. Is it possible to have jsl script for" Col>modelling utilities> explore outlier" ?

Thanks

Ram

2 ACCEPTED SOLUTIONS

Accepted Solutions

Highlighted

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

Hello,

Current releases of JMP offer limited JSL support for Explore Outliers. See the options listed below. Further JSL support is planned for a future release of JMP.

dt = Open( "$SAMPLE_DATA/Probe.jmp" );

//Columns must be selected in order for any Explore Outliers options to launch

:VDP_PCOLL << Set Selected( 1 );

:VDP_PINNBASE << Set Selected( 1 );

:VDP_PINPBASE << Set Selected( 1 );

//Bring up specific Explore Outliers commands

obj = dt << Explore Outliers( Quantile Range Outliers( 1 ) );

obj = dt << Explore Outliers( Robust Fit Outliers( 1 ) );

obj = dt << Explore Outliers( Multivariate Robust Outliers( 1 ) );

obj = dt << Explore Outliers( Name( "Multivariate k-Nearest Neighbor Outliers" ) ); //Prompts interactively for k

Kind regards,

Wendy

Wendy

Highlighted

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

Hi, Reshmi.

In JMP 12, the only JSL methods specifically for Explore Outliers are what I provided earlier. After looking into your example, I found that I could navigate the window to change the value in the NumberEditBox and then click the Rescan button.

obj = dt << **Explore Outliers(** Robust Fit Outliers**(** **1** **)** **)**;

Report**(** obj **)[**Number Edit Box**(** **1** **)]** << **Set(** **3** **)**;

Report**(** obj **)[**Button Box**(** **5** **)]** << **Click**;

The Col statistics functions are pre-evaluated statistics. In short, they are calculated once over the columns, without regard to the excluded rowstate, and are then used as constants so they do not need to be calculated again. This is explained in the "Pre-Evaluated Statistics" section of the Data Table chapter in the Scripting Guide.

The following formula will calculate the mean for only un-excluded rows:

Col Mean**(** If**(** Excluded**()**, **.**, :Viscosity **)** **)**;

Wendy

Wendy

15 REPLIES 15

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

Re: Col>modelling utilities> explore outlier scripting

The Explore Outliers window can be displayed with the following script:

Names Default To Here**(** **1** **)**;

Main Menu**(** "Explore Outliers" **)**;

Jim

Highlighted

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

Hello,

Current releases of JMP offer limited JSL support for Explore Outliers. See the options listed below. Further JSL support is planned for a future release of JMP.

dt = Open( "$SAMPLE_DATA/Probe.jmp" );

//Columns must be selected in order for any Explore Outliers options to launch

:VDP_PCOLL << Set Selected( 1 );

:VDP_PINNBASE << Set Selected( 1 );

:VDP_PINPBASE << Set Selected( 1 );

//Bring up specific Explore Outliers commands

obj = dt << Explore Outliers( Quantile Range Outliers( 1 ) );

obj = dt << Explore Outliers( Robust Fit Outliers( 1 ) );

obj = dt << Explore Outliers( Multivariate Robust Outliers( 1 ) );

obj = dt << Explore Outliers( Name( "Multivariate k-Nearest Neighbor Outliers" ) ); //Prompts interactively for k

Kind regards,

Wendy

Wendy

Highlighted
##

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

Re: Col>modelling utilities> explore outlier scripting

Wendy,

Where are these options documented? I don't see any reference in the Scripting Index, for either JMP 12 or JMP 13

Jim

Highlighted
##

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

Re: Col>modelling utilities> explore outlier scripting

Hi, Jim.

For JMP 13, you should find the new syntax available in the Scripting Index under the Explore Outliers category. Documentation has not yet been completed for JMP 13. Previous versions did not have this functionality documented.

Wendy

Wendy

- Tags:
- jmp_13

Highlighted
##

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

Re: Col>modelling utilities> explore outlier scripting

I looked and there it is, in JMP 13. Apparently I had only looked in JMP 12. Thank you

Jim

Highlighted
##

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

Re: Col>modelling utilities> explore outlier scripting

Wendy,

I am using your example and able to get the Huber distance window up.

I am looking for outliers in column name = num_clk

dt << Distribution( ContinuousDistribution( Column( :num_clk ) ) ),

my_original_median = colquantile( :num_clk, .5 ),

my_original_mean = col mean ( :num_clk ),

:num_clk << Set Selected( 1 ),

obj = dt << Explore Outliers( Robust Fit Outliers ( ) ) << Huber K ( 1 ),

I have two questions after this:

- How can I modify the K values here? It is going by default K=4 for my example. And, I want to explore this with multiple values of K.
- How do I recalculate the mean and median of num_clk (column) after excluding the data points marked as outlier (by Huber above)? I have tried using the following, but I do not how many rows I will be excluding each time:

obj << Automatic Recalc( 1 );

dt << Select Rows( 5 ) << Exclude( 1 );

Any help will be highly appreciated.

Thanks,

Reshmi

Highlighted

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

Hi, Reshmi.

In JMP 12, the only JSL methods specifically for Explore Outliers are what I provided earlier. After looking into your example, I found that I could navigate the window to change the value in the NumberEditBox and then click the Rescan button.

obj = dt << **Explore Outliers(** Robust Fit Outliers**(** **1** **)** **)**;

Report**(** obj **)[**Number Edit Box**(** **1** **)]** << **Set(** **3** **)**;

Report**(** obj **)[**Button Box**(** **5** **)]** << **Click**;

The Col statistics functions are pre-evaluated statistics. In short, they are calculated once over the columns, without regard to the excluded rowstate, and are then used as constants so they do not need to be calculated again. This is explained in the "Pre-Evaluated Statistics" section of the Data Table chapter in the Scripting Guide.

The following formula will calculate the mean for only un-excluded rows:

Col Mean**(** If**(** Excluded**()**, **.**, :Viscosity **)** **)**;

Wendy

Wendy

Highlighted
##

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

Re: Col>modelling utilities> explore outlier scripting

Hi Wendy,

This was very helpful. Thank you!

I can now edit the value of K and see after the rescan.

My next action-item is to recalculate the mean and median after excluding the elements marked as outliers.

So, keeping that in mind, how can I script the following after the Rescan step:

1) Click the num_clk in Robust Estimates and Outliers (so that it highlights in the original table)

2) Click the "Exclude rows"

I am going to re_run this to get the new mean and median.

modified_median = colquantile( If( Excluded(), ., :Viscosity ), 0.5 );

modified_mean = Col Mean( If( Excluded(), ., :Viscosity ) );

Highlighted
##

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

Re: Col>modelling utilities> explore outlier scripting

Hi, Reshmi.

How to click a button using JSL was demonstrated in my previous reply. To determine which ButtonBoxes to click, you will need to review the Display Tree to see the DisplayBoxes that make up the report. To access the Display Tree, right-click on the upper-most gray disclosure icon and select Edit > Show Tree Structure.

Good luck with your scripting project!

Wendy

Wendy

Article Labels

There are no labels assigned to this post.