On Thu, Mar 15, 2012 at 5:46 PM, Lars Buitinck <[email protected]> wrote:
> Op 15 maart 2012 22:37 heeft Olivier Grisel <[email protected]>
> het volgende geschreven:
> > Sorry, my bad, I replied too fast without reading the doc I was
> > pointing to... I was actually thinking about this one which is not
> > document in the preprocessing documentation narrative:
> >
> >
> http://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.LabelBinarizer.html
>
> The problem with LabelBinarizer is that it doesn't handle 2-d feature
> arrays. I submitted a PR some time ago for an implementation of the
> "one-hot" transformation:
> https://github.com/scikit-learn/scikit-learn/pull/242
>
>
I just added a snippet that works with structured arrays to
http://scipy-central.org/:
http://scipy-central.org/item/35/1/convert-categorical-data-in-a-structure-numpy-array-to-boolean-fields
Warren
> --
> Lars Buitinck
> Scientific programmer, ILPS
> University of Amsterdam
>
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general