-
Notifications
You must be signed in to change notification settings - Fork 2.9k
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with lowess() smoother in statsmodels #946
Comments
BUG, my mistake for not having a test case with nans. argsort on line 161 should use x not exog
exog is the original full length, x, y have fewer rows if there are missing values |
thanks very much for your prompt reply and fix! |
Fix will land in master within a day, with test case. Thanks for reporting it. |
Quick followup: if I pass |
maybe you want That's the intended behavior, the unit tests might not include a case with nans given the previous error. (not all option combinations are unit tested.) |
Ah I see, on closer look, it does put |
I just tried with your data If you want to speed up the calculations with a large dataset, then you could use the |
Did you change anything in the code? I don't see updates to |
no, I just made the change I was mainly looking at plots, and trying to figure out how to write additional unit tests for these options. You could change it in your installed statsmodels, then you can run it right away. |
BUG fix lowess sort when nans closes #946
fix and more unit tests are in master |
BUG fix lowess sort when nans closes statsmodels#946
Following Josef's suggestion (https://groups.google.com/forum/#!topic/pystatsmodels/A5KMexQA1D8), I am using
lowess()
from statsmodels.nonparametric.smoothers_lowess to do Lowess smoothing. When I try it on this data set of X and Y values "test_data.txt", available here: https://gist.github.com/yarden/5929702then I get the error:
My code just calls
lowess
on the x, y values in the file:where
NaN
values in thetest_data.txt
file just represent missing values. What is going wrong here?Also, if I do:
Then it seems to work, but I thought NaN values are by default dropped (based on the
missing
argument tolowess()
), so I am not sure what caused the problem in this case.Thanks very much for your help.
The text was updated successfully, but these errors were encountered: