Hello,
I have a JMP script that matches a pair of cartesian coordinate data sets using K Means Cluster. The script works well for data sets that have an equal number of coordinates. I am trying to expand the script to handle scenarios where one of the data sets has missing coordinates or less coordinates than the other. I can do this manually through the K Means Cluster dialog window by first using 'Declutter' then selecting the outliers and excluding them. I would like to automate this process through the JMP script. My plan is to run the 'Declutter' function and limit number of nearest neighbors to 1 then 'Save NN Distances' to a column and exclude the rows that are outside 3 sigma of the mean. Then run the cluster analysis on the remaining coordinates.
I am not sure how to do this through JMP scripting. The action of identifying and excluding the outliers by nearest neighbors must happen before the cluster function begins. This is where I am stuck.
Would it be easier to leave the K Means Cluster dialog up with the Declutter plot and allow the user to highlight the outliers, exclude them, then run the clustering algorithm? If so, is it possible for the script to pause while the user performs these actions then continue after the cluster function is complete? I have additional actions that are performed on the cluster result.
Below is a snippet of the K Means Cluster function as I have now. The nClusters variable is defined by the number of rows from the data set with the least number of coordinates.
obj = K Means Cluster(
Y( :X, :Y),
Number of Clusters( nClusters ),
Columns Scaled Individually(0)
);
obj << Declutter(1,1);
obj << Go;
Any help would be greatly appreciated.
-Ry