Is it possible to create a vector function through regression?

39 Views Asked by At

If i have some points of the form(x,y) i can easily make a regression model and get a function of the form y=f(x) on geogebra. But how would i get a vector function of the form f(t)=[x(t),y(t)]?

Doing this by hand is probably far too advanced for a hs student, but is there any way to do this on computer on e.g. geogebra?

Im creating a simple video game for cs class and i want an object to follow a path from some points i have.

1

There are 1 best solutions below

6
On

If you have a set $n$ of points $t_i$, $x_i$ and $y_i$, you can fit a curve to the set $(t_i,x_i)$ and another to $(t_i,y_i)$ separatelly, if you want a simple explanation.

Or you can fit both curves jointly, like what is done here. Basically you can solve the minimization problem $$\min \sum_{i=1}^{n} w_i \left[ (f_1(t_i) - x_i)^2 + (f_2(t_i) - y_i)^2\right],$$ where $$f_1(t)=\sum_{i=0}^{q} a_{i} t^i, \quad f_2(t)=\sum_{j=0}^{p} b_{j} t^j,$$ to some $w_i>0$, for instance.

You can find some related results by searching for "(\min |Au-b|^2) " On SearchOnMath.