Re: [Scikit-learn-general] Handle sparse data on Instance Reduction

2014-07-03 Thread Dayvid Victor
Hi Olivier, I solved this issue, but talking to some people in the maillist, they adviced me to start a new project (already referenced in the wiki) and latter think about include instance reduction in the sklearn. https://github.com/dvro/scikit-protopy (name is not definite yet); If you could t

Re: [Scikit-learn-general] Concatenating scikit.sparse matrix and numpy arrays

2014-07-03 Thread ZORAIDA HIDALGO SANCHEZ
Your right Joel, I want to stack the Xs horizontally. But before, I need to apply the transformers. However, there is a 1 to 1 relation between Xs and Transfomers. For instance, for tweets, I have 2 sources(X). One is the set of documents(text of the tweets), other would be metadata as for insta

Re: [Scikit-learn-general] Regarding partial_fit in naive_bayes

2014-07-03 Thread Lars Buitinck
2014-07-03 12:23 GMT+02:00 Kartik Kumar Perisetla : > I am trying to use naive_bayes agorithm for training the model using > partial_fit in scikit-learn. > > I tried with 16011( # of features) , 100 training instances and 1018664( > total # of classes), I get an error when I invoke partial_fit meth

Re: [Scikit-learn-general] Concatenating scikit.sparse matrix and numpy arrays

2014-07-03 Thread Joel Nothman
FeatureUnion is for the same X, but X is defined very loosely: each sample could just be an ID. Have I misunderstood what you are doing? Are you not horizontally stacking the Xs? On 3 July 2014 05:50, ZORAIDA HIDALGO SANCHEZ < [email protected]> wrote: > Thanks for your resp

[Scikit-learn-general] Regarding partial_fit in naive_bayes

2014-07-03 Thread Kartik Kumar Perisetla
Hi, I am trying to use naive_bayes agorithm for training the model using partial_fit in scikit-learn. I tried with 16011( # of features) , 100 training instances and 1018664( total # of classes), I get an error when I invoke partial_fit method. I think there is a upper limit on ma I see that par

[Scikit-learn-general] Implement Graph-regularized NMF

2014-07-03 Thread Taylor Zhang
Dear all, I want to add the implementation of Graph-regularized NMF into the project. The paper is here. http://www.cad.zju.edu.cn/home/dengcai/Publication/Journal/TPAMI-GNMF.pdf I haven't found any implementation of it in the master branch. If anyone intends to do the same thing please

Re: [Scikit-learn-general] Concatenating scikit.sparse matrix and numpy arrays

2014-07-03 Thread ZORAIDA HIDALGO SANCHEZ
Thanks for your response Joel, I may be wrong but FeatureUnion is for the same X and I have several X(one for each source), isn’t it? Thanks. De: Joel Nothman mailto:[email protected]>> Responder a: "[email protected]

Re: [Scikit-learn-general] encoding label using custom target

2014-07-03 Thread Kyle Kastner
The easiest way is to just map them yourself with some Python code after LabelEncoder - this type of mapping is generally application specific. Something like: a[a == 0] = 100 a[a == 1] = 150 a[a == 2] = 155 will do the trick. For many labels, you could loop through a dictionary you make and set

[Scikit-learn-general] encoding label using custom target

2014-07-03 Thread Sheila the angel
Is there any way to specify the label encoding in preprocessing.LabelEncoder() ? My targets are in string and I want to convert them into numeric values. preprocessing.LabelEncoder() encodes always as 0,1,2 while I would like specify the numeric code. target_str = ['setosa', 'versicolor', 'virgi

Re: [Scikit-learn-general] sparse matrix input support for GradientBoostingClassifiers or AdaBoostClassifier

2014-07-03 Thread Awhan Patnaik
Many thanks Arnaud :) On Wed, Jul 2, 2014 at 8:49 PM, Arnaud Joly wrote: > Hi, > > > There is sparse input support with adaboost for weak learners that supports > sparse input (such as sgd). > > For adaboost with decision tree as weak learner, this is in progress > see the pull request https://g