Created
November 28, 2022 09:29
-
-
Save naenumtou/2a3f4a23ca003285f4fa1022809ce235 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
# Compare | |
plt.figure(figsize = (10, 6)) | |
plt.scatter( | |
X, | |
y, | |
c = 'teal' | |
) | |
plt.plot( | |
X, | |
OLS.predict(X), | |
c = 'orange', | |
linewidth = 2, | |
label = 'OLS Regression' | |
) | |
plt.plot( | |
X, | |
TS.predict(X), | |
c = 'magenta', | |
linewidth = 2, | |
label = 'Theil-Sen Regression' | |
) | |
plt.title('Compare regression') | |
plt.legend(frameon = True, facecolor = 'white') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment