cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
lala
Level VII

How to compare the similarity of different data curves using JSL?

Hello!
Hopefully that's what JMP is good at, too.
For example, using THE JMP example, we get 4 curves. How do we compare their similarity?
With "PNP1" as the standard, the other three groups of curves are compared with it and the one most similar to "PNP1" is obtained.
It is possible that different methods of comparison will lead to different results.
I think it's based on the similarity between the high and low points of the curve.
This may result in two curves that are more similar in shape even though their data are much different.

Thanks!

2022-07-04_17-52-10.png

dt=Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
dt << Select Where( Row() < 61 );
dt << Select Columns( "PNP1", "PNP2", "PNP3", "PNP4" );
d3 = dt << Subset( Output Table( "test" ), Selected Rows( 1 ), columns( PNP1, PNP2,  PNP3, PNP4 ) );
p=d3<<Graph Builder(
	Size( 534, 454 ),
	Show Control Panel( 0 ),
	Variables(
		X( Transform Column( "Row", Formula( Row() ) ) ),
		Y( :PNP1 ),
		Y( :PNP2, Position( 1 ) ),
		Y( :PNP3, Position( 1 ) ),
		Y( :PNP4, Position( 1 ) )
	),
	Elements( Line( X, Y( 1 ), Y( 2 ), Y( 3 ), Y( 4 ), Legend( 5 ) ) )
);
4 REPLIES 4

Re: How to compare the similarity of different data curves using JSL?

JMP Pro provides the Functional Data Explorer. This tool deals with your cases where the response is not a single value but an entire curve. This tool will estimate and save functional principle components, which can be used in the Y or X role of your analysis.

Re: How to compare the similarity of different data curves using JSL?

It will depend on what you mean by similarity.  Is it similarity in shape?  Is it that the points are correlated?  Or is it that the curves overlap?

 

  • If it is curve overlap, then want you would want to to do is calculate some kind of distance between the curves.  
  • If it is similarity in shape, then centering and scaling (standardizing) the two curves and plotting them together can reveal if they are that kind of similar.  You can create standardized version of a column in the data table by right-clicking the column and choosing New Formula Column > Distributional > Standardize
  • If it is correlation similarity, plotting the Y values against each other in a scatterplot can reveal that.  

I am curious about the real question that you want to answer.  Can you describe what the problem that you want to solve is?  

lala
Level VII

Re: How to compare the similarity of different data curves using JSL?

Thank SamGardner for providing so many solutions. Since there are so many such data sets, it should not be feasible to find them by drawing them. Because of this method I am also trying. Let's start with similar shapes.See how you can use JMP to batch find the best match through the formula or JSL. Thanks!
Georg
Level VII

Re: How to compare the similarity of different data curves using JSL?

In case of your example, you may want to look at correlations, it shows that it is highest between PNP1 and PNP4.

And the Standardized curves are almost identical. You can sum up the squares of point differences along all rows to find the best fitting combination. But as SamGardner pointed out already, the solution depends on your data, there is no one way for all problems. 

 

Georg_0-1657138852958.png

 

Georg