Find Best Fit Equation From 4 Data Points

300 Views Asked by At

I have thousands of rows which each contain 4 different data values.

Data example:

A = 799, B = 190.68, C = 131.74, Y = 48.65

A = 1209, B = 9.67, C = 9.67, Y = 311.36

A = 932, B = 212.23, C = 144.39, Y = 136.22

I am looking for a method to find an equation that will best fit all of the data. So, then, when new A, B ,C values are given, I can use this equation to calculate the corresponding Y value.

1

There are 1 best solutions below

0
On BEST ANSWER

Let’s call your given data points $P_i = (A_i, B_i, C_i)$ and let $Y_i$ denote the known function value at the point $P_i$.

You want to find a function $f: \mathbb{R}^3 \to \mathbb{R}$ such that $f(P_i) = Y_i$ for all $i$.

The easiest algorithm is the “closest point” one. Given a point $P$, you find the closest known point $P_k$ and then you just set $f(P) = Y_k$.

This function $f$ is not continuous, but you didn’t say that was necessary.

If you want a continuous (smooth) function, you’ll have to learn about multi-dimensional interpolation/approximation. You can start with the Alfeld paper I cited in the comment above.