Hi list,
I have a X (np.array) with some columns containing ids. I also have a list
of column names. Then I want to transform the relevant columns to be used
by a logistic regression model using OneHotEncoder:
>>> X = np.loadtxt(...) # from a CSV
>>> col_names = ... # from CSV header
>>> e = OneHotEncoder(categorical_features=id_columns)
>>> Xprime = e.fit_transform(X)
But then I don't know how to deduce the names of the columns in the new
matrix :(
Ideally I would want the same as DictVectorizer which has a feature_names_
member.
Anyone already had this problem ?
Eustache
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general