2013/2/26 Tadej Janež <[email protected]>: > I'm writing an auxiliary function that needs to access classifier's > "classes_" property. All worked fine until I needed to use a Pipeline > (to first perform some preprocessing and then use the desired > estimator), then it broke immediately: > AttributeError: 'Pipeline' object has no attribute 'classes_' > > So, should Pipeline expose the "classes_" property if the final > estimator is a classifier? Or should I write some additional code that > checks if the given classifier is in fact a Pipeline and handle this > case separately?
Good question. I say don't export classes_, because (a) then there's no reason to not do this for any other attribute. If you know the classifier's identifier within the pipeline, you should be able to work around this without too much trouble. -- Lars Buitinck Scientific programmer, ILPS University of Amsterdam ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
