Optimisation of difference between two real arrays by stretching.

23 Views Asked by At

I have a two set of experimental data and need to fit them to each other by the best way.

Formally saying. Given two constant real numbers arrays of $n$: {${x_1, x_2, ... , x_n}$}, $x_i\in\mathbb{R}$ and {${y_1, y_2, ... , y_n}$}, $y_i\in\mathbb{R}$

There is need to find such real numbers $a\in\mathbb{R}$ and $b\in\mathbb{R}$ to minimize a sum

$$\arg\min_{a,b} \sum_{i=1}^n \left( x_i - \left(ay_i + b \right)\right)^2$$

1

There are 1 best solutions below

0
On BEST ANSWER

Really. This is just a simple linear regression. Earlier I thought that it helps to find a slope and intercept on Graph1, but actually you could use it to fit one graph to other by stretching as on Graph2 and Graph3.

Graph1, Graph2 and Graph3

Graph2 - two sets of data before stretching and on Graph3 - after.