typo argh
This commit is contained in:
@@ -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)")
|
||||
|
||||
Reference in New Issue
Block a user