Created
November 28, 2022 09:25
-
-
Save naenumtou/43e3eb13b7572ec5377dd3e22c4c77c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# OLS | |
OLS = LinearRegression() | |
OLS.fit(X, y.ravel()) | |
# Plot | |
plt.figure(figsize = (10, 6)) | |
plt.scatter( | |
X, | |
y, | |
c = 'teal' | |
) | |
plt.plot( | |
X, | |
OLS.predict(X), | |
c = 'orange', | |
linewidth = 2, | |
) | |
plt.title('OLS Regression') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment