On Sat, Apr 06, 2013 at 04:07:47PM +0900, Vlad Niculae wrote:
> Now I'll hijack this to talk about the snippet page:
> https://github.com/scikit-learn/scikit-learn/wiki/Useful-Snippets
> It's small, estimator-heavy, unstructured, and I wonder about its
> visibility (the wiki feels a tad internal t
Such a preprocessor would be nice to have in a gist linked from a very
visible list of helpful snippets, but in my opinion it certainly
doesn't belong in the codebase. It breaks TOOWTDY and therefore
chances for bugs to be spotted decrese a lot.
Now I'll hijack this to talk about the snippet page
On 04/05/2013 01:23 PM, Rafael Calsaverini wrote:
> If you have data in the form of a list of dictionaries like this:
>
> data = [{'target': 0 , 'featureVector' : [...]}, {'target': 1,
> 'featureVector': [...]}, ... ]
>
> You can use pandas to easily convert them into something that
> scikit-lear
On 04/05/2013 01:05 PM, Bill Power wrote:
> Lars: must have missed your response earlier. i guess i was hoping for
> convenient instead of good :-)
>
> i don't concede to some of your points though. that validation is
> significantly complicated is not true as presumably you just need to
> check
If you have data in the form of a list of dictionaries like this:
data = [{'target': 0 , 'featureVector' : [...]}, {'target': 1,
'featureVector': [...]}, ... ]
You can use pandas to easily convert them into something that scikit-learn
would accept:
In [18]: import pandas
In [19]: from sklearn im
Lars: must have missed your response earlier. i guess i was hoping for
convenient instead of good :-)
i don't concede to some of your points though. that validation is
significantly complicated is not true as presumably you just need to check
for the feature dimension of each class. what's that? a
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()]
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
2013/4/5 Bill Power :
> i know this is going to sound a little silly, but I was thinking there that
> it might be nice to be able to do this with scikit learn
>
> clf = sklearn.anyClassifier()
> clf.fit( { 0: dataWithLabel0,
>1: dataWithLabel1 } )
>
> instead of having to separate the d
Dictionaries do not have duplicate keys (labels). You could only make a
list of datawithLabelX for each key label. But what is the benefit of this?
Philipp
Am 05.04.2013 11:37, schrieb Bill Power:
> i know this is going to sound a little silly, but I was thinking there
> that it might be nice to
10 matches
Mail list logo