See the error and workaround here: http://stackoverflow.com/questions/24808821/sgdclassifier-with-class-weight-auto-fails-on-scikit-learn-0-15-but-not-0-14