11-12-2013 12:05 PM
Hi all!
I am trying to write a code to quantitatively compare an unknown data set to multiple reference data sets, and then show which data set my unknown most closely resembles. It has been suggested that I use the interpolate 1D function but I have no idea how it works. Thanks for the help!
11-12-2013 12:17 PM - edited 11-12-2013 02:18 PM
You only need "interpolate array" if the x-values don't coincide between the datasets. Do they?
Interpolation does not compare anything. You could use it to resample and align, followed by e.g. taking e.g. a norm of the difference.
Do you have some typical sample data?
11-12-2013 12:21 PM
What kind of comparison are you trying to do? I'm not seeing how Interpolate 1D Array will help with this kind of problem.
Seems to me that you should probably just subtract you unknown from each of your reference data sets and then perform an RMS on the resulting array. This will give you an idea of the error. Which ever reference gives you the smallest error is the one that your unknown most closely resembles.
11-12-2013 02:46 PM
Attached is a sample of my data. The x values for each reference set are different.
11-12-2013 03:56 PM
@Morpselynt wrote:
Attached is a sample of my data. The x values for each reference set are different.
Doesn't tell me anything about how you want to compare them.
11-12-2013 03:57 PM
@Morpselynt wrote:
Attached is a sample of my data. The x values for each reference set are different.
Maybe you should also attach a few reference data sets.
11-12-2013 05:12 PM
It's similar in idea to a regulation system, you have a "Should" and a "Is"-value (techincally you have several "shoulds" to compare to). So the error between them should be the sum of the squared errors, and the least is your winner. Sum((Should(x)-Is(x))^2) where X goes through your series.
Something like that should work. 🙂
/Y