[MRG] FIX for exception thrown when y does not have all classes

This is a fix for #3581
Perhaps I don't quite understand class weights properly, but what's the scenario of passing in labels for classes that you aren't trying to classify? Wouldn't you just filter these out from the data?