cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Choose Language Hide Translation Bar
FN
FN
Level VI

Script to obtain a global anomaly score ( screening outliers )

JMP has several methods to explore outliers (Analyze>Screening>Explore outliers).

 

For a first data exploration, I am looking for a solution so the users can interactively filter all anomalous rows.

 

One simple approach is to conduct a KNN outlier analysis (unchecking the option of imputations and being able to change the default number) 

FN_0-1679518219072.png

 

And save the distances to each NN, so a global score can be obtained (e.g., by adding all distances into one column).

 

FN_1-1679518708197.png

 

How can automate these steps that have GUI actions in JMP 16?

 

Names Default To Here( 1 );
Clear Log();

dt = Open( "$SAMPLE_DATA/Bands Data.JMP" );

// Launch platform: Explore Outliers
Explore Outliers(
	Y(
		:proof cut, :viscosity, :caliper, :ink temperature, :humidity, :roughness,
		:blade pressure, :varnish pct, :press speed, :ink pct, :solvent pct,
		:ESA Voltage, :ESA Amperage, :wax, :hardener, :roller durometer,
		:current density, :anode space ratio, :chrome content
	)
);

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Script to obtain a global anomaly score ( screening outliers )

I usually start my looking for same names from Scripting Index (and in this case it might work)

jthi_0-1679519425252.png

Only thing I'm not sure about is Impute Missing part

jthi_1-1679519529906.png

 

Names Default To Here( 1 );
Clear Log();

dt = Open( "$SAMPLE_DATA/Bands Data.JMP" );

obj = dt << Explore Outliers(
	Y(
		:proof cut, :viscosity, :caliper, :ink temperature, :humidity, :roughness,
		:blade pressure, :varnish pct, :press speed, :ink pct, :solvent pct,
		:ESA Voltage, :ESA Amperage, :wax, :hardener, :roller durometer,
		:current density, :anode space ratio, :chrome content
	)
);
obj << k Nearest Neighbor Outliers(K(4));
obj << Impute Missing(0);
obj << Save NN Distances;
//obj << Close Window;
-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: Script to obtain a global anomaly score ( screening outliers )

I usually start my looking for same names from Scripting Index (and in this case it might work)

jthi_0-1679519425252.png

Only thing I'm not sure about is Impute Missing part

jthi_1-1679519529906.png

 

Names Default To Here( 1 );
Clear Log();

dt = Open( "$SAMPLE_DATA/Bands Data.JMP" );

obj = dt << Explore Outliers(
	Y(
		:proof cut, :viscosity, :caliper, :ink temperature, :humidity, :roughness,
		:blade pressure, :varnish pct, :press speed, :ink pct, :solvent pct,
		:ESA Voltage, :ESA Amperage, :wax, :hardener, :roller durometer,
		:current density, :anode space ratio, :chrome content
	)
);
obj << k Nearest Neighbor Outliers(K(4));
obj << Impute Missing(0);
obj << Save NN Distances;
//obj << Close Window;
-Jarmo