Skip to content

Instantly share code, notes, and snippets.

@naenumtou
Created November 28, 2022 09:29
Show Gist options
  • Save naenumtou/2a3f4a23ca003285f4fa1022809ce235 to your computer and use it in GitHub Desktop.
Save naenumtou/2a3f4a23ca003285f4fa1022809ce235 to your computer and use it in GitHub Desktop.
# 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