[Numpy-discussion] SParse feature vector generation
Dhruvkaran Mehta
dhruvkaran@gmail....
Wed Jan 4 00:25:10 CST 2012
Hi numpy users,
*Is there a convenient way in numpy to go from "string" features like:*
"uc_berkeley", "google", 1
"stanford", "intel", 1
.
.
.
"uiuc", "texas_instruments", 0
*to a numpy matrix like:*
"uc_berkeley", "stanford", ..., "uiuc", "google", "intel",
"texas_instruments", "bool"
1 0 ... 0 1 0
0 1
0 1 ... 0 0 1
0 1
:
0 0 ... 1 0 0
1 0
I really appreciate you taking the time to help!
Thanks!
--Dhruv
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120103/2a07fd74/attachment.html
More information about the NumPy-Discussion
mailing list