diff --git a/doc/pub/week38/html/._week38-bs014.html b/doc/pub/week38/html/._week38-bs014.html index 28b47f286..8290e2bb1 100644 --- a/doc/pub/week38/html/._week38-bs014.html +++ b/doc/pub/week38/html/._week38-bs014.html @@ -467,10 +467,10 @@ clf = LinearRegression(fit_interceptprint(f"Sklearn fitted beta: {clf.coef_}") ypredictOwn = X @ beta ypredictSKL = skl.predict(X) -print(f"MSE with intercept column: {intercept}") -print(MSE(y,ypredictOwn) -print(f"MSE with intercept column from SKL: {intercept}") -print(MSE(y,ypredictSKL) +print(f"MSE with intercept column") +print(MSE(y,ypredictOwn)) +print(f"MSE with intercept column from SKL") +print(MSE(y,ypredictSKL)) plt.figure() @@ -501,10 +501,10 @@ intercept = np. print(f"Sklearn fitted beta (without intercept): {clf.coef_}") ypredictOwn = X @ beta ypredictSKL = skl.predict(X) -print(f"MSE with Manual intercept: {intercept}") -print(MSE(y,ypredictOwn) -print(f"MSE with Sklearn intercept: {clf.intercept_}") -print(MSE(y,ypredictSKL) +print(f"MSE with Manual intercept") +print(MSE(y,ypredictOwn)) +print(f"MSE with Sklearn intercept") +print(MSE(y,ypredictSKL)) plt.plot(x, X @ beta + intercept, "--", label="Fit (manual intercept)") plt.plot(x, clf.predict(X), "--", label="Sklearn (fit_intercept=True)") diff --git a/doc/pub/week38/html/week38-reveal.html b/doc/pub/week38/html/week38-reveal.html index 604d56d16..22973f249 100644 --- a/doc/pub/week38/html/week38-reveal.html +++ b/doc/pub/week38/html/week38-reveal.html @@ -720,10 +720,10 @@ clf = LinearRegression(fit_intercept=print(f"Sklearn fitted beta: {clf.coef_}") ypredictOwn = X @ beta ypredictSKL = skl.predict(X) -print(f"MSE with intercept column: {intercept}") -print(MSE(y,ypredictOwn) -print(f"MSE with intercept column from SKL: {intercept}") -print(MSE(y,ypredictSKL) +print(f"MSE with intercept column") +print(MSE(y,ypredictOwn)) +print(f"MSE with intercept column from SKL") +print(MSE(y,ypredictSKL)) plt.figure() @@ -754,10 +754,10 @@ intercept = np.mean(y_offset - X_offset @ beta) print(f"Sklearn fitted beta (without intercept): {clf.coef_}") ypredictOwn = X @ beta ypredictSKL = skl.predict(X) -print(f"MSE with Manual intercept: {intercept}") -print(MSE(y,ypredictOwn) -print(f"MSE with Sklearn intercept: {clf.intercept_}") -print(MSE(y,ypredictSKL) +print(f"MSE with Manual intercept") +print(MSE(y,ypredictOwn)) +print(f"MSE with Sklearn intercept") +print(MSE(y,ypredictSKL)) plt.plot(x, X @ beta + intercept, "--", label="Fit (manual intercept)") plt.plot(x, clf.predict(X), "--", label="Sklearn (fit_intercept=True)") diff --git a/doc/pub/week38/html/week38-solarized.html b/doc/pub/week38/html/week38-solarized.html index 375cbd323..da89caf98 100644 --- a/doc/pub/week38/html/week38-solarized.html +++ b/doc/pub/week38/html/week38-solarized.html @@ -854,10 +854,10 @@ clf = LinearRegression(fit_intercept=print(f"Sklearn fitted beta: {clf.coef_}") ypredictOwn = X @ beta ypredictSKL = skl.predict(X) -print(f"MSE with intercept column: {intercept}") -print(MSE(y,ypredictOwn) -print(f"MSE with intercept column from SKL: {intercept}") -print(MSE(y,ypredictSKL) +print(f"MSE with intercept column") +print(MSE(y,ypredictOwn)) +print(f"MSE with intercept column from SKL") +print(MSE(y,ypredictSKL)) plt.figure() @@ -888,10 +888,10 @@ intercept = np.mean(y_offset - X_offset @ beta) print(f"Sklearn fitted beta (without intercept): {clf.coef_}") ypredictOwn = X @ beta ypredictSKL = skl.predict(X) -print(f"MSE with Manual intercept: {intercept}") -print(MSE(y,ypredictOwn) -print(f"MSE with Sklearn intercept: {clf.intercept_}") -print(MSE(y,ypredictSKL) +print(f"MSE with Manual intercept") +print(MSE(y,ypredictOwn)) +print(f"MSE with Sklearn intercept") +print(MSE(y,ypredictSKL)) plt.plot(x, X @ beta + intercept, "--", label="Fit (manual intercept)") plt.plot(x, clf.predict(X), "--", label="Sklearn (fit_intercept=True)") diff --git a/doc/pub/week38/html/week38.html b/doc/pub/week38/html/week38.html index 14e83eaf7..d467ae5e5 100644 --- a/doc/pub/week38/html/week38.html +++ b/doc/pub/week38/html/week38.html @@ -859,10 +859,10 @@ clf = LinearRegression(fit_interceptprint(f"Sklearn fitted beta: {clf.coef_}") ypredictOwn = X @ beta ypredictSKL = skl.predict(X) -print(f"MSE with intercept column: {intercept}") -print(MSE(y,ypredictOwn) -print(f"MSE with intercept column from SKL: {intercept}") -print(MSE(y,ypredictSKL) +print(f"MSE with intercept column") +print(MSE(y,ypredictOwn)) +print(f"MSE with intercept column from SKL") +print(MSE(y,ypredictSKL)) plt.figure() @@ -893,10 +893,10 @@ intercept = np. print(f"Sklearn fitted beta (without intercept): {clf.coef_}") ypredictOwn = X @ beta ypredictSKL = skl.predict(X) -print(f"MSE with Manual intercept: {intercept}") -print(MSE(y,ypredictOwn) -print(f"MSE with Sklearn intercept: {clf.intercept_}") -print(MSE(y,ypredictSKL) +print(f"MSE with Manual intercept") +print(MSE(y,ypredictOwn)) +print(f"MSE with Sklearn intercept") +print(MSE(y,ypredictSKL)) plt.plot(x, X @ beta + intercept, "--", label="Fit (manual intercept)") plt.plot(x, clf.predict(X), "--", label="Sklearn (fit_intercept=True)") diff --git a/doc/pub/week38/ipynb/ipynb-week38-src.tar.gz b/doc/pub/week38/ipynb/ipynb-week38-src.tar.gz index f5c873c35..1deffa1e8 100644 Binary files a/doc/pub/week38/ipynb/ipynb-week38-src.tar.gz and b/doc/pub/week38/ipynb/ipynb-week38-src.tar.gz differ diff --git a/doc/pub/week38/ipynb/week38.ipynb b/doc/pub/week38/ipynb/week38.ipynb index bd24bc15f..e70fc369c 100644 --- a/doc/pub/week38/ipynb/week38.ipynb +++ b/doc/pub/week38/ipynb/week38.ipynb @@ -783,10 +783,10 @@ "print(f\"Sklearn fitted beta: {clf.coef_}\")\n", "ypredictOwn = X @ beta\n", "ypredictSKL = skl.predict(X)\n", - "print(f\"MSE with intercept column: {intercept}\")\n", - "print(MSE(y,ypredictOwn)\n", - "print(f\"MSE with intercept column from SKL: {intercept}\")\n", - "print(MSE(y,ypredictSKL)\n", + "print(f\"MSE with intercept column\")\n", + "print(MSE(y,ypredictOwn))\n", + "print(f\"MSE with intercept column from SKL\")\n", + "print(MSE(y,ypredictSKL))\n", "\n", "\n", "plt.figure()\n", @@ -817,10 +817,10 @@ "print(f\"Sklearn fitted beta (without intercept): {clf.coef_}\")\n", "ypredictOwn = X @ beta\n", "ypredictSKL = skl.predict(X)\n", - "print(f\"MSE with Manual intercept: {intercept}\")\n", - "print(MSE(y,ypredictOwn)\n", - "print(f\"MSE with Sklearn intercept: {clf.intercept_}\")\n", - "print(MSE(y,ypredictSKL)\n", + "print(f\"MSE with Manual intercept\")\n", + "print(MSE(y,ypredictOwn))\n", + "print(f\"MSE with Sklearn intercept\")\n", + "print(MSE(y,ypredictSKL))\n", "\n", "plt.plot(x, X @ beta + intercept, \"--\", label=\"Fit (manual intercept)\")\n", "plt.plot(x, clf.predict(X), \"--\", label=\"Sklearn (fit_intercept=True)\")\n", diff --git a/doc/src/week38/week38.do.txt b/doc/src/week38/week38.do.txt index 6bd895d5d..658aea36a 100644 --- a/doc/src/week38/week38.do.txt +++ b/doc/src/week38/week38.do.txt @@ -499,10 +499,10 @@ print(f"Fitted beta: {beta}") print(f"Sklearn fitted beta: {clf.coef_}") ypredictOwn = X @ beta ypredictSKL = skl.predict(X) -print(f"MSE with intercept column: {intercept}") -print(MSE(y,ypredictOwn) -print(f"MSE with intercept column from SKL: {intercept}") -print(MSE(y,ypredictSKL) +print(f"MSE with intercept column") +print(MSE(y,ypredictOwn)) +print(f"MSE with intercept column from SKL") +print(MSE(y,ypredictSKL)) plt.figure() @@ -533,10 +533,10 @@ print(f"Sklearn intercept: {clf.intercept_}") print(f"Sklearn fitted beta (without intercept): {clf.coef_}") ypredictOwn = X @ beta ypredictSKL = skl.predict(X) -print(f"MSE with Manual intercept: {intercept}") -print(MSE(y,ypredictOwn) -print(f"MSE with Sklearn intercept: {clf.intercept_}") -print(MSE(y,ypredictSKL) +print(f"MSE with Manual intercept") +print(MSE(y,ypredictOwn)) +print(f"MSE with Sklearn intercept") +print(MSE(y,ypredictSKL)) plt.plot(x, X @ beta + intercept, "--", label="Fit (manual intercept)") plt.plot(x, clf.predict(X), "--", label="Sklearn (fit_intercept=True)")