Closed
Description
When performing grid search using GridSearchCV using ootb scoring method 'roc_auc' and ootb GMM classifier from sklearn.mixture.GMM I get an index error.
Code to reproduce:
from sklearn import datasets
from sklearn.grid_search import GridSearchCV
from sklearn.mixture import GMM
X,y = datasets.make_classification(n_samples = 10000, n_features=10,n_classes=2)
# Vanilla GMM_model
gmm_model = GMM()
# Standard param grid
param_grid = {'n_components' : [1,2,3,4],
'covariance_type': ['tied','full','spherical']}
grid_search = GridSearchCV(gmm_model, param_grid, scoring='roc_auc')
# Fit GS with this data
grid_search.fit(X, y)
Sorry if the format is incorrect. First time I am posting.
ERROR:
File "*/python2.7/site-packages/sklearn/metrics/scorer.py", line 175, in call
y_pred = y_pred[:, 1]
IndexError: index 1 is out of bounds for axis 1 with size 1