typo argh

This commit is contained in:
Morten Hjorth-Jensen
2021-09-23 09:06:59 +02:00
parent ca96a8b4dd
commit c76f1d1e5a
7 changed files with 48 additions and 48 deletions
+8 -8
View File
@@ -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)")