How to Interpolate Data with Scipy
One- or multi-dimensional data interpolation made easy with Python Scipy package.
What are we trying to achieve?
Interpolation may sound like a fancy mathematical exercise, but in many ways, it is much like what machine learning does.
- Start with a limited set of data points relating multiple variables
- Interpolate (basically, create a model)
- Construct a new function that can be used to predict any future or new point from the interpolation
So, the idea is — ingest, interpolate, predict.
Concretely, suppose we have a limited number of data points for a pair of variables (x,y) that have an unknown (and nonlinear) relationship between them i.e. y = f(x). From this limited data, we want to construct a prediction function that can generate y values for any given x values (within the same range that was used for the interpolation).
There are a lot of mathematical theories and work on this subject. You can certainly write your own algorithm to implement those interpolation…