Re: [Scikit-learn-general] Storing and loading decision tree classifiers

2011-11-04 Thread Peter Prettenhofer
[..] Interesting. What is the order of magnitude of the decrease in speed at fit time? IMHO it's negligible here are some timings for:: rs = np.random.RandomState(13) X = rs.rand(5, 100) y = rs.randint(2, size=5) from sklearn.tree import tree clf =

Re: [Scikit-learn-general] Storing and loading decision tree classifiers

2011-11-04 Thread Olivier Grisel
2011/11/4 Peter Prettenhofer peter.prettenho...@gmail.com: [..] Interesting. What is the order of magnitude of the decrease in speed at fit time? IMHO it's negligible here are some timings for::    rs = np.random.RandomState(13)    X = rs.rand(5, 100)    y = rs.randint(2,

Re: [Scikit-learn-general] Storing and loading decision tree classifiers

2011-11-04 Thread Gilles Louppe
I have just submitted a PR to brian's branch :) On 4 November 2011 11:13, Peter Prettenhofer peter.prettenho...@gmail.com wrote: Gilles, I was not aware of your work in _tree.pyx. Looks great! Still, I didn't touch any line in `find_best_split` so the merging/rebase should be quite

Re: [Scikit-learn-general] Storing and loading decision tree classifiers

2011-11-04 Thread Gael Varoquaux
On Thu, Nov 03, 2011 at 11:40:30PM +0100, Peter Prettenhofer wrote: I created an experimental branch which uses numpy arrays (as Gael suggested) instead of the composite structure to represent the tree. Great work (as usual)! Thanks heaps. What I really like about this (in addition to the

Re: [Scikit-learn-general] Multi Layer Perceptron / Neural Network in Sklearn

2011-11-04 Thread Olivier Grisel
2011/11/4 Andreas Müller amuel...@ais.uni-bonn.de: Hi everybody. I was thinking about putting some work into making a multi layer perceptron implementation for sklearn. I think it would be a good addition to the other, mostly linear, classifiers in sklearn. Together with the decision trees /

Re: [Scikit-learn-general] Multi Layer Perceptron / Neural Network in Sklearn

2011-11-04 Thread Andreas Müller
On 11/04/2011 02:59 PM, Lars Buitinck wrote: 2011/11/4 Andreas Müller amuel...@ais.uni-bonn.de: My question is: has anyone started with a mlp implementation yet? I was just working on one :) I have the predict function for an arbitrary number of hidden layers (classifier case) and some

Re: [Scikit-learn-general] Multi Layer Perceptron / Neural Network in Sklearn

2011-11-04 Thread Vlad Niculae
On Fri, Nov 4, 2011 at 4:54 PM, Andreas Müller amuel...@ais.uni-bonn.de wrote: On 11/04/2011 03:49 PM, Andreas Müller wrote: On 11/04/2011 03:42 PM, Alexandre Passos wrote: On Fri, Nov 4, 2011 at 10:34, Lars Buitinck l.j.buiti...@uva.nl wrote: 2011/11/4 Alexandre Passos alexandre...@gmail.com:

Re: [Scikit-learn-general] SVM multi-class classification weights

2011-11-04 Thread Gilles Louppe
ranks = np.argsort(np.sum(estimator.coef_ ** 2, axis=0)) My question is: Why the summation of the squared weight matrix is used? What is the logic behind it? This is used for handling estimators that assign several weights to the same feature. Indeed, if several weights are assigned to a each

Re: [Scikit-learn-general] Multi Layer Perceptron / Neural Network in Sklearn

2011-11-04 Thread Frédéric Bastien
On Fri, Nov 4, 2011 at 10:49 AM, Andreas Müller amuel...@ais.uni-bonn.de wrote: On 11/04/2011 03:42 PM, Alexandre Passos wrote: On Fri, Nov 4, 2011 at 10:34, Lars Buitinck l.j.buiti...@uva.nl wrote: 2011/11/4 Alexandre Passos alexandre...@gmail.com: I have a question: why not just use Theano

Re: [Scikit-learn-general] Multi Layer Perceptron / Neural Network in Sklearn

2011-11-04 Thread Andreas Müller
Hey Frederic. I don't have a good understanding of scikit.learn, but I think that all the hyper-parameter selection is a hot research topic for now. How do you plan to include this in the current scikit.learn interface of the fit method? Depends on what you think of when you say hyper

Re: [Scikit-learn-general] Multi Layer Perceptron / Neural Network in Sklearn

2011-11-04 Thread Andreas Müller
For a simple mlp, I think theano will not beat a hand implemented version. I think you'd be in for a rather rude surprise, at least on your first attempt. :) It'll not be my first attempt but I must confess, I never benchmarked my labs GPU mlp against yours ;) Afaik, torch7 is faster than

Re: [Scikit-learn-general] Multi Layer Perceptron / Neural Network in Sklearn

2011-11-04 Thread Olivier Grisel
I think it make sense to have a pure cython implementation in scikit-learn without having runtime dependency on a compiler nor CUDA / OpenCL and have advanced, theano based neural networks (with more parameter auto-tuning and pluggable exotic objective functions) in pylearn. I think there is room

Re: [Scikit-learn-general] Multi Layer Perceptron / Neural Network in Sklearn

2011-11-04 Thread Mathieu Blondel
On Sat, Nov 5, 2011 at 12:44 AM, Olivier Grisel olivier.gri...@ensta.org wrote: I think it make sense to have a pure cython implementation in scikit-learn without having runtime dependency on a compiler nor CUDA / OpenCL and have advanced, theano based neural networks (with more parameter

Re: [Scikit-learn-general] Multi Layer Perceptron / Neural Network in Sklearn

2011-11-04 Thread Olivier Grisel
2011/11/4 Andreas Müller amuel...@ais.uni-bonn.de: For a simple mlp, I think theano will not beat a hand implemented version. I think you'd be in for a rather rude surprise, at least on your first attempt. :) It'll not be my first attempt but I must confess, I never benchmarked my labs GPU

Re: [Scikit-learn-general] Multi Layer Perceptron / Neural Network in Sklearn

2011-11-04 Thread Andreas Müller
In my case I don't use RPROP (I don't know what it is and I just use a simple backprop) and I use Leon Bottou's trick to perform a burn-in on the first 10k samples with a grid search of learning rate parameters and then select the most effective learning rate and multiply it by 2 (it brings

Re: [Scikit-learn-general] Multi Layer Perceptron / Neural Network in Sklearn

2011-11-04 Thread Olivier Grisel
2011/11/4 Andreas Müller amuel...@ais.uni-bonn.de: On 11/04/2011 02:49 PM, Olivier Grisel wrote: 2011/11/4 Andreas Müller amuel...@ais.uni-bonn.de: Hi everybody. I was thinking about putting some work into making a multi layer perceptron implementation for sklearn. I think it would be a good

Re: [Scikit-learn-general] Multi Layer Perceptron / Neural Network in Sklearn

2011-11-04 Thread Olivier Grisel
2011/11/4 Andreas Müller amuel...@ais.uni-bonn.de: In my case I don't use RPROP (I don't know what it is and I just use a simple backprop) and I use Leon Bottou's trick to perform a burn-in on the first 10k samples with a grid search of learning rate parameters and then select the most

Re: [Scikit-learn-general] Multi Layer Perceptron / Neural Network in Sklearn

2011-11-04 Thread David Warde-Farley
On Fri, Nov 04, 2011 at 04:33:39PM +0100, Andreas Müller wrote: Hey Frederic. I don't have a good understanding of scikit.learn, but I think that all the hyper-parameter selection is a hot research topic for now. How do you plan to include this in the current scikit.learn interface of the

Re: [Scikit-learn-general] Multi Layer Perceptron / Neural Network in Sklearn

2011-11-04 Thread Andreas Müller
On 11/04/2011 06:33 PM, David Warde-Farley wrote: On Fri, Nov 04, 2011 at 06:12:48PM +0100, Andreas Müller wrote: In my case I don't use RPROP (I don't know what it is and I just use a simple backprop) and I use Leon Bottou's trick to perform a burn-in on the first 10k samples with a grid

Re: [Scikit-learn-general] Multi Layer Perceptron / Neural Network in Sklearn

2011-11-04 Thread Olivier Grisel
2011/11/4 Andreas Müller amuel...@ais.uni-bonn.de: On 11/04/2011 06:33 PM, David Warde-Farley wrote: On Fri, Nov 04, 2011 at 06:12:48PM +0100, Andreas Müller wrote: In my case I don't use RPROP (I don't know what it is and I just use a simple backprop) and I use Leon Bottou's trick to perform

Re: [Scikit-learn-general] Multi Layer Perceptron / Neural Network in Sklearn

2011-11-04 Thread David Warde-Farley
On 2011-11-04, at 13:44, Andreas Müller amuel...@ais.uni-bonn.de wrote: On 11/04/2011 06:33 PM, David Warde-Farley wrote: On Fri, Nov 04, 2011 at 06:12:48PM +0100, Andreas Müller wrote: In my case I don't use RPROP (I don't know what it is and I just use a simple backprop) and I use Leon

Re: [Scikit-learn-general] Multi Layer Perceptron / Neural Network in Sklearn

2011-11-04 Thread Frédéric Bastien
Hi, Just to be sure, I agree that there is space for both an MLP in scikit.learn and Theano/Pylearn or similar. I was curious on how you planned to solve the hyper-parameter selection problem. That is not an easy problem. The answer was interesting. I didn't know about the Leon Bottou trick. I

Re: [Scikit-learn-general] Multi Layer Perceptron / Neural Network in Sklearn

2011-11-04 Thread Gael Varoquaux
On Fri, Nov 04, 2011 at 07:22:15PM +0100, Andreas Müller wrote: One of the reasons I want an MLP in sklearn is so it is easier to compare with other learning algorithms on a wide range of tasks. I guess that this is one of the most compeling reasons to have them in. I tend to believe the MLPs

Re: [Scikit-learn-general] Multi Layer Perceptron / Neural Network in Sklearn

2011-11-04 Thread Kenneth C. Arnold
On Fri, Nov 4, 2011 at 12:25 PM, Mathieu Blondel math...@mblondel.org wrote: Another possibility is to host a Theanos-based implementation as a side project on github and make the API scikit-learn compatible. # In general, I don't really buy the why implement X if it already exists in Y

Re: [Scikit-learn-general] Multi Layer Perceptron / Neural Network in Sklearn

2011-11-04 Thread David Warde-Farley
On Fri, Nov 04, 2011 at 07:22:15PM +0100, Andreas Müller wrote: Of course there are many other possibilities like pretraining, deeper networks, different learning rate schedules etc.. You are right, this is somewhat of an active research field Though I have not seen conclusive evidence