figure various cubic smoothing splines for smoothing parameter /( { for the natural spline through the data points is obtainedfor the simple linear regression line is found the following code first computes the matrices and qand then solves the linear system ( finallythe smoothing curve is determined via ( )for selected pointsand then plotted note that the code plots only single curve corresponding to the specified value of smoothspline py import matplotlib pyplot as plt import numpy as np np array ([[ ]] np array ([[ ]] shape [ ngamma ( - )/ lambda ( / np max (( , )np min (( , )* (( / np min (( , ))** np zeros (( , )for in range ( )for in range ( ) [ ,jk( [ ] [ ] np hstack (np ones (( , )) ) np hstack (( ngamma ) ) np hstack (( tq ) np vstack (( , ) np vstack ((kq ) ad np linalg solve ( ,