diff --git a/doc/pub/week36/html/week36-reveal.html b/doc/pub/week36/html/week36-reveal.html index c330b6cec..b85742573 100644 --- a/doc/pub/week36/html/week36-reveal.html +++ b/doc/pub/week36/html/week36-reveal.html @@ -1023,7 +1023,7 @@ lambdas = np.logspace(-4, # print(MSEPredict[i]) # Now plot the results plt.figure() -plt.plot(np.log10(lambdas), MSEPredict, 'r--', label = 'MSE Ridge Test') +plt.plot(np.log10(lambdas), MSEPredict, 'r--', label = 'MSE Ridge Train') plt.xlabel('log10(lambda)') plt.ylabel('MSE') plt.legend() @@ -1086,7 +1086,7 @@ lambdas = np.logspace(-4, print(RegLasso_coef_) + print(RegLasso.coef_) MSELassoPredict[i] = MSE(y,ypredictLasso) # Now plot the results plt.figure() diff --git a/doc/pub/week36/html/week36-solarized.html b/doc/pub/week36/html/week36-solarized.html index 8ea13d897..0786fd9e2 100644 --- a/doc/pub/week36/html/week36-solarized.html +++ b/doc/pub/week36/html/week36-solarized.html @@ -1046,7 +1046,7 @@ lambdas = np.logspace(-4, # print(MSEPredict[i]) # Now plot the results plt.figure() -plt.plot(np.log10(lambdas), MSEPredict, 'r--', label = 'MSE Ridge Test') +plt.plot(np.log10(lambdas), MSEPredict, 'r--', label = 'MSE Ridge Train') plt.xlabel('log10(lambda)') plt.ylabel('MSE') plt.legend() @@ -1109,7 +1109,7 @@ lambdas = np.logspace(-4, print(RegLasso_coef_) + print(RegLasso.coef_) MSELassoPredict[i] = MSE(y,ypredictLasso) # Now plot the results plt.figure() diff --git a/doc/pub/week36/html/week36.html b/doc/pub/week36/html/week36.html index 4a73d1fc6..99b7d962f 100644 --- a/doc/pub/week36/html/week36.html +++ b/doc/pub/week36/html/week36.html @@ -1051,7 +1051,7 @@ lambdas = np.# print(MSEPredict[i]) # Now plot the results plt.figure() -plt.plot(np.log10(lambdas), MSEPredict, 'r--', label = 'MSE Ridge Test') +plt.plot(np.log10(lambdas), MSEPredict, 'r--', label = 'MSE Ridge Train') plt.xlabel('log10(lambda)') plt.ylabel('MSE') plt.legend() @@ -1114,7 +1114,7 @@ lambdas = np.= linear_model.Lasso(lmb) RegLasso.fit(X,y) ypredictLasso = RegLasso.predict(X) - print(RegLasso_coef_) + print(RegLasso.coef_) MSELassoPredict[i] = MSE(y,ypredictLasso) # Now plot the results plt.figure() diff --git a/doc/pub/week36/ipynb/ipynb-week36-src.tar.gz b/doc/pub/week36/ipynb/ipynb-week36-src.tar.gz index 3c840b2d5..8217dc872 100644 Binary files a/doc/pub/week36/ipynb/ipynb-week36-src.tar.gz and b/doc/pub/week36/ipynb/ipynb-week36-src.tar.gz differ diff --git a/doc/pub/week36/ipynb/week36.ipynb b/doc/pub/week36/ipynb/week36.ipynb index 32d4e9909..18d3f16c3 100644 --- a/doc/pub/week36/ipynb/week36.ipynb +++ b/doc/pub/week36/ipynb/week36.ipynb @@ -1296,7 +1296,7 @@ "# print(MSEPredict[i])\n", " # Now plot the results\n", "plt.figure()\n", - "plt.plot(np.log10(lambdas), MSEPredict, 'r--', label = 'MSE Ridge Test')\n", + "plt.plot(np.log10(lambdas), MSEPredict, 'r--', label = 'MSE Ridge Train')\n", "plt.xlabel('log10(lambda)')\n", "plt.ylabel('MSE')\n", "plt.legend()\n", @@ -1368,7 +1368,7 @@ " RegLasso = linear_model.Lasso(lmb)\n", " RegLasso.fit(X,y)\n", " ypredictLasso = RegLasso.predict(X)\n", - " print(RegLasso_coef_)\n", + " print(RegLasso.coef_)\n", " MSELassoPredict[i] = MSE(y,ypredictLasso)\n", "# Now plot the results\n", "plt.figure()\n", diff --git a/doc/src/week36/week36.do.txt b/doc/src/week36/week36.do.txt index 99196f716..ac81f980b 100644 --- a/doc/src/week36/week36.do.txt +++ b/doc/src/week36/week36.do.txt @@ -737,7 +737,7 @@ for i in range(nlambdas): # print(MSEPredict[i]) # Now plot the results plt.figure() -plt.plot(np.log10(lambdas), MSEPredict, 'r--', label = 'MSE Ridge Test') +plt.plot(np.log10(lambdas), MSEPredict, 'r--', label = 'MSE Ridge Train') plt.xlabel('log10(lambda)') plt.ylabel('MSE') plt.legend() @@ -798,7 +798,7 @@ for i in range(nlambdas): RegLasso = linear_model.Lasso(lmb) RegLasso.fit(X,y) ypredictLasso = RegLasso.predict(X) - print(RegLasso_coef_) + print(RegLasso.coef_) MSELassoPredict[i] = MSE(y,ypredictLasso) # Now plot the results plt.figure()