2013/7/17 Wifi Gi <[email protected]>: > I'm aware of how to use LabelEncoder to convert string classes to numeric > and back again. However, in my applications, I frequently save my models to > disk (by pickling them) and reload them when I want to use them. When I use > predict(), it of course returns only numerical classes, and if you don't > remember what the numbers stood for, it's useless. Is there a way to somehow > include a LabelEncoder in with the classifier object model when it is saved, > so I don't have to write the class encodings to a separate file somewhere > else?
Most classifiers will actually take string class labels, so you may not need a LabelEncoder. Which classifier are you using? (All classifiers should take string labels, but I'm not sure if were implemented it for all of them. This feature was added as a bit of an afterthought.) -- Lars Buitinck Scientific programmer, ILPS University of Amsterdam ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
