I have a 4-dimentionnal vector like this:
[[0.337, 0.021, 0.482, 0.352], [0.342, 0.035, 0.481, 0.334], [0.337, 0.023, 0.479, 0.338], [0.349, 0.042, 0.475, 0.310], [0.342, 0.019, 0.437, 0.361], [0.346, 0.017, 0.491, 0.343]]
and a point, let's say:
[0.337938850308642, 0.04, 0.4749251700680273, 0.3229812077012536]
What's the most efficient way to
- find the polynomial curve which fit these points (least square?), and
- find the minimum distance between the point and the curve fitting the vector?
I need to implement this in a recursive optimization algorithm, so time of execution is important.
Thanks!