On 04/05/2013 12:19 PM, Bill Power wrote:
> I think you misunderstood me. I meant something (more efficiently
> written) along the lines of below.
>
> import numpy as np
>
> X0 = [[-1, 0], [0,-1]]
> X1 = [[ 1, 0], [0, 1]]
>
> trData = { 0: X0, 1: X1 }
>
> X = np.array( [v for v in trData.values()] ).reshape( -1, 2 )
> Y = np.array( [np.ones( len(v) ) * k for k, v in trData.iteritems()]
> ).ravel()
>
I also misunderstood that. Still Lars's points remain and we won't do that.
It is very easy to build an estimator and a Pipeline to do the conversion.
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general