Similarity of two plot to each other

49 Views Asked by At

I want get the similarity of two different plot by Percent ... I have many plots for comparison like below :

plot-1 y :

{555697, 557508, 562226, 561616, 556815, 551125, 551144}

plot-2 y:

{666278, 667190, 668101, 669440, 661562, 659761, 660728}

or

with :

can determine the similarity in percent for all type of two plot ?

1

There are 1 best solutions below

0
On BEST ANSWER

It depends what you mean by similarity. In mathematics similarity usually means the norm of the difference between them. This then begs the questions - what is a norm and what does difference mean.
One norm of a function f(t) between a and b is

${{\left\| f \right\|}^{2}} = \int\limits_{a}^{b}{f{{(t)}^{2}}dt}$

The size of the difference between two functions is then

${{\left\| f-g \right\|}^{2}}=\int\limits_{a}^{b}{{{\left( f(t)-g(t) \right)}^{2}}dt}$

This will be 0 if f and g are the same (more or less). This difference may be greater than the norm of either so it is difficult to express as a percentage of anything. If you have numerical data you will have to calculate this norm using the Trapezoid Rule or similar.
Another expression of the difference between f and g is

$\max \left| f(t)-g(t) \right|$

if f and g are bounded and the max is taken over all t values. This is easier to calculate but can give a large value if f and g differ widely at just one t value. The first norm is less likely to suffer from this problem for the sort of functions you are looking at.