Created
November 28, 2022 09:27
-
-
Save naenumtou/6d8b46414e5b4ede1819a62cc832181d 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
# Theil-Sen | |
TS = TheilSenRegressor() | |
TS.fit(X, y.ravel()) | |
# Plot | |
plt.figure(figsize = (10, 6)) | |
plt.scatter( | |
X, | |
y, | |
c = 'teal' | |
) | |
plt.plot( | |
X, | |
TS.predict(X), | |
c = 'magenta', | |
linewidth = 2, | |
) | |
plt.title('Theil-Sen Regression') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment