2012/11/12  <[email protected]>:
> Actually I would like to name the features. Sorry for the confusion!

What do you want to use it for? If you have a sample x (a row from X)
and a list of n_features names for your features, then

    zip(names_of_features, x)

will give you a list of (name, value) pairs for the features of x.

> But since you mentioned it: Naming the targets would also be very helpful!

Some classifiers allow that, e.g. SGDClassifier.fit can take a list of
strings as its y argument. Not sure about RFs; you could use a
LabelEncoder (from sklearn.preprocessing).


-- 
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_nov
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to