Morale Function and Model Error

Learn about the true (morale) function and the total (model) error.

We'll cover the following

Let’s use the interp1d module to create an interpolation function to fill in the week and morale points. We are using the kind='cubic' parameter that indicates the smoothing for our interpolation.

True function

In the code example below, week_points and morale_points have values, which interp1d uses to approximate the morale_func function that gives the true values in morale_true.

Get hands-on with 1200+ tech skills courses.