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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.