Created
November 2, 2013 05:09
-
-
Save austinogilvie/7275770 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import numpy as np | |
| import pandas as pd | |
| import matplotlib.pyplot as plt | |
| from ggplot import meat | |
| from statsmodels.nonparametric.smoothers_lowess import lowess | |
| df = meat[['beef','veal']] | |
| df = df.sort_index(by=['beef']) | |
| x = meat.beef.values | |
| y = meat.veal.values | |
| x_loess, y_loess = lowess(y, x).T | |
| plt.scatter(x, y) | |
| plt.plot(x_loess, y_loess) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment