def fit_optimize_gcv(self, y, x=None, weights=None, tol=1.0e-03,
                         brack=(-100,20)):

        def _gcv(pen, y, x):
            self.fit(y, x=x, pen=np.exp(pen))
            a = self.gcv()
            return a

        a = golden(_gcv, args=(y,x), brack=bracket, tol=tol)
Fit smoothing spline trying to optimize GCV.
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/sandbox/bspline.py/SmoothingSpline.fit_optimize_gcv