Using SciPy for interpolation

So, let's take a look at how we can perform spline interpolation using SciPy. Again, we have a function, f that is unknown, and we want to infer its values. We have its exact values for a collection of data points, and our objective is to estimate the values of f at values other than these pointsalthough, whatever function we end up using, its values should exactly equal the values of the function that we observed. We can use interp1d() for univariate interpolation, as seen in the following steps:

  1. So, we are going to import this function, along with all the other required functions:

  1. We will then load in a ...

Get Training Systems Using Python Statistical Modeling now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.