Skip to content

GMM bic crashes on dtype object #4055

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

Closed
amueller opened this issue Jan 6, 2015 · 3 comments
Closed

GMM bic crashes on dtype object #4055

amueller opened this issue Jan 6, 2015 · 3 comments
Labels
Milestone

Comments

@amueller
Copy link
Member

amueller commented Jan 6, 2015

GMM is not happy with dtype=object in some cases.

I'm not sure if there is an open issue on handling dtype='object'.
I think we should try to convert to float in check_array if dtype=object.
Does anyone remember where the discussion about this was?

I think #4006 is related (we should collect dtype object issues somewhere).

to reproduce

from sklearn import mixture
from sklearn.datasets import make_blobs

X, _ = make_blobs()
X = X.astype(object)
g = mixture.GMM(covariance_type='full',n_components=4) #for some reason only full works
g.fit(X)
#works
print g.bic(X)
g = mixture.GMM(covariance_type='diag',n_components=4) #for some reason only full works
g.fit(X)
#fails:
print g.bic(X)
@GaelVaroquaux
Copy link
Member

I think we should try to convert to float in check_array if dtype=object.

+1

@amueller amueller added the Bug label Jan 6, 2015
@amueller
Copy link
Member Author

amueller commented Jan 6, 2015

See #4057.

@amueller
Copy link
Member Author

Closed by #4057.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants