-
Notifications
You must be signed in to change notification settings - Fork 579
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
GMM estimation ValueError #2
Comments
You're probably passing a 1D array to a function expecting a 2D array. |
Strange. But I was exactly following this notebook (i.e., by copy-paste). Sorry I'm a newbie and this question must be silly. |
Hi Jake. There was a change in scikit learn, and now one dimensional data is no longer allowed (as in The reason was that it was not clear if one dimensional data was supposed to mean many samples of one feature or one sample of many features. The error mentioned by @hongxuchen is easily corrected by passing I am still waiting an answer from the awesome scikit learn team, but do you know what changes could be done (initialization parameters, maybe) in order to get the same plot in your notebook? Thanks! :) |
I've fixed this is the updated tutorial: http://github.com/jakevdp/sklearn_tutorial Sorry about this: with the amount of material I have out there, it's impossible to keep everything up-to-date with ever-changing APIs. The only sustainable fix would be to delete old repositories, but I'd rather not do that. |
Thanks Jake. I was following this set of notebooks because it is from the last pycon. Not a bullet proof solution but maybe adding a small warning and a reference to your actively maintained tutorial could work. Thanks again for the fast answer |
Done, in the README |
In
04.3-Density-GMM.ipynb
ofIn [3]
, it complains atclf = GMM(4, n_iter=500, random_state=3).fit(x)
that:Can you please tell what's going on? Thanks!
The text was updated successfully, but these errors were encountered: