Re: [Scikit-learn-general] Classifiers that do not require feature scaling

2015-06-06 Thread Sturla Molden
On 05/06/15 19:03, Andreas Mueller wrote: > The result of scaled an non-scaled data will be different because the > regularization will have a different effect. Oh, so you regularize with lambda*I instead of lambda*diag(Sigma)? Sturla ---

Re: [Scikit-learn-general] Classifiers that do not require feature scaling

2015-06-05 Thread Sebastian Raschka
> Considering the final score, e.g., accuracy, does this mean that with scaling > and without I will get different results for NB and KNN? Yes. I think it would really help you to read a little bit about how those algorithms work -- to develop an intuition how feature scaling affects the outco

Re: [Scikit-learn-general] Classifiers that do not require feature scaling

2015-06-05 Thread Yury Zhauniarovich
Yes, Andreas. Thank you, just wanted to clarify. Thank you all for your help and sorry for some silly questions! Best Regards, Yury Zhauniarovich On 5 June 2015 at 20:24, Andreas Mueller wrote: > Have you read my earlier email explaning just that? > > > Tree-based methods are the only ones t

Re: [Scikit-learn-general] Classifiers that do not require feature scaling

2015-06-05 Thread Andreas Mueller
Have you read my earlier email explaning just that? > Tree-based methods are the only ones that are invariant towards feature scaling, do DecisionTree*, RandomForest*, ExtraTrees*, Bagging* (with trees), GradientBoosting* (with trees). For all other algorithms, the outcome will be different w

Re: [Scikit-learn-general] Classifiers that do not require feature scaling

2015-06-05 Thread Yury Zhauniarovich
Thank you, Sebastian. This is what I want to understand. Considering the final score, e.g., accuracy, does this mean that with scaling and without I will get different results for NB and KNN? Or results will be the same like in case of decision trees? With gradient descent algorithms it is clear w

Re: [Scikit-learn-general] Classifiers that do not require feature scaling

2015-06-05 Thread Sebastian Raschka
"Need" to be scaled sounds a little bit strong ;) -- feature scaling is really context-dependend. If you are using stochastic gradient descent of gradient descent you surely want to standardize your data or at least center it for technical reasons and convergence. However, in naive Bayes, you ju

Re: [Scikit-learn-general] Classifiers that do not require feature scaling

2015-06-05 Thread Andreas Mueller
The result of scaled an non-scaled data will be different because the regularization will have a different effect. On 06/05/2015 03:10 AM, Yury Zhauniarovich wrote: Thank you all! However, what Sturla wrote is now out of my understanding. One more question. It seems also to me that Naive Bayes

Re: [Scikit-learn-general] Classifiers that do not require feature scaling

2015-06-05 Thread Yury Zhauniarovich
Thank you all! However, what Sturla wrote is now out of my understanding. One more question. It seems also to me that Naive Bayes classifiers also do not need data to be scaled. Am I correct? Best Regards, Yury Zhauniarovich On 4 June 2015 at 20:55, Sturla Molden wrote: > On 04/06/15 20:38, S

Re: [Scikit-learn-general] Classifiers that do not require feature scaling

2015-06-04 Thread Sturla Molden
On 04/06/15 20:38, Sturla Molden wrote: > Component-wise EM (aka CEM2) is a better way of avoiding the singularity > disease, though. The traditional EM for a GMM proceeds like this: while True: global_estep(clusters) for c in clusters: mstep(c) This is inherently unstable. Se

Re: [Scikit-learn-general] Classifiers that do not require feature scaling

2015-06-04 Thread Sebastian Raschka
Apropros Mahalanobis distance: To get back to the initial question about scale invariant classifiers ... As Andreas already pointed out: The tree-based methods are scale invariant. But under certain circumstances, you can also add Nearest Neighbor classifiers and kernel methods such as kernel SV

Re: [Scikit-learn-general] Classifiers that do not require feature scaling

2015-06-04 Thread Sturla Molden
On 04/06/15 20:18, Andreas Mueller wrote: > I'm not sure what you mean by that. The cluster-memberships? The means > and covariances will certainly be different. We were talking about classification. Yes, memberships. Not means and covariances, obviously. -

Re: [Scikit-learn-general] Classifiers that do not require feature scaling

2015-06-04 Thread Sturla Molden
On 04/06/15 20:18, Andreas Mueller wrote: > I'm not sure what you mean by that. The cluster-memberships? The means > and covariances will certainly be different. The Mahalanobis distance will undo any linear scaling operation. > They are actually somewhat regularized in scikit-learn, by having a

Re: [Scikit-learn-general] Classifiers that do not require feature scaling

2015-06-04 Thread Andreas Mueller
On 06/04/2015 02:04 PM, Sturla Molden wrote: > On 04/06/15 17:15, Andreas Mueller wrote: > >> Tree-based methods are the only ones that are invariant towards feature >> scaling, do DecisionTree*, RandomForest*, ExtraTrees*, Bagging* (with >> trees), GradientBoosting* (with trees). >> >> For all o

Re: [Scikit-learn-general] Classifiers that do not require feature scaling

2015-06-04 Thread Sturla Molden
On 04/06/15 17:15, Andreas Mueller wrote: > Tree-based methods are the only ones that are invariant towards feature > scaling, do DecisionTree*, RandomForest*, ExtraTrees*, Bagging* (with > trees), GradientBoosting* (with trees). > > For all other algorithms, the outcome will be different whether

Re: [Scikit-learn-general] Classifiers that do not require feature scaling

2015-06-04 Thread Andreas Mueller
Tree-based methods are the only ones that are invariant towards feature scaling, do DecisionTree*, RandomForest*, ExtraTrees*, Bagging* (with trees), GradientBoosting* (with trees). For all other algorithms, the outcome will be different whether you scale your data or not. For algorithms like

[Scikit-learn-general] Classifiers that do not require feature scaling

2015-06-04 Thread Yury Zhauniarovich
Hello everyone, I have the following question. In general, as a rule of thumb features need to be scaled using min-max scaling or z-score standardization before being used in ML algorithms. However, it is not always possible to perform this procedure (e.g., in cases when you do not have all the da

Re: [Scikit-learn-general] classifiers parameters from a dictionary

2014-07-14 Thread Sheila the angel
Thanks. I didn't thing about ** On 14 July 2014 17:10, Gael Varoquaux wrote: > > clf2 = svm.SVC(best_para_) #clf2 with best parameters > > But this does not work. > > You could try 'svm.SVC.(**best_params_)' > > See http://stackoverflow.com/questions/3394835/args-and-kwargs > > > > --

Re: [Scikit-learn-general] classifiers parameters from a dictionary

2014-07-14 Thread Gael Varoquaux
> clf2 = svm.SVC(best_para_)   #clf2 with best parameters  > But this does not work. You could try 'svm.SVC.(**best_params_)' See http://stackoverflow.com/questions/3394835/args-and-kwargs -- Want fast and easy access t

[Scikit-learn-general] classifiers parameters from a dictionary

2014-07-14 Thread Sheila the angel
How to define a classifiers parameters from a dictionary . using grid search I get the best parameters which is a dictionary. clf = svm.SVC() grid_search = GridSearchCV(clf, param_grid=param_grid) grid_search.fit(X, y) best_para_ = grid_search.best_params_ # best_para_ is a dictionary which conta

Re: [Scikit-learn-general] Classifiers that handle instance weighting in sklearn

2014-06-18 Thread Mohamed-Rafik Bouguelia
Is there papers that explain how sample weighting is used with each of those specific classifiers ? In other words, papers explaining how each of those classifiers is modified to support sample weighting. 2014-06-17 11:31 GMT+02:00 Arnaud Joly : > Hi, > > Without being exhaustive Random forest,

Re: [Scikit-learn-general] Classifiers that handle instance weighting in sklearn

2014-06-17 Thread Arnaud Joly
Hi, Without being exhaustive Random forest, extra trees, bagging, adaboost, naive bayes and several linear models support sample weight. Best regards, Arnaud On 17 Jun 2014, at 11:27, Mohamed-Rafik Bouguelia wrote: > Hello all, > > I've tried to associate weights to instances when trainin

Re: [Scikit-learn-general] Classifiers that handle instance weighting in sklearn

2014-06-17 Thread Michael Eickenberg
Take a look at the docstring of any classifier and look for `sample_weight`. If this keyword is provided, you can add sample weights. Try googling "sklearn sample_weight" or look here https://github.com/scikit-learn/scikit-learn/search?q=sample_weight for an overview. Michael On Tue, Jun 17, 20

[Scikit-learn-general] Classifiers that handle instance weighting in sklearn

2014-06-17 Thread Mohamed-Rafik Bouguelia
Hello all, I've tried to associate weights to instances when training an SVM in sklearn ( http://scikit-learn.org/stable/auto_examples/svm/plot_weighted_samples.html ). Is it possible to use instance weighting with other classifiers from sklearn (others than the SVM) ? Basically, I know that any

Re: [Scikit-learn-general] classifiers

2013-10-20 Thread Olivier Grisel
Stackoverflow is better suited for very specific programming questions rather than large subjective opinion polling (which is actually explicitly out of the scope of stackoverflow). So if you can reduce your problem to something reproducible (for instance in a 10 liner code snippet with expected v

Re: [Scikit-learn-general] classifiers

2013-10-18 Thread Andreas Mueller
Hi Don. I suggest you ask your question on stackoverflow with scikit-learn tag. I think that will get you more feedback. Also, be sure to include a list of things that you tried and how exactly you tried them, what the result was, and what the result is that you desire. Cheers, Andy On 09/23/201

[Scikit-learn-general] classifiers

2013-09-23 Thread MORGANDON G
Hello, Perhaps, someone on the list could help me determine which path to take in a project I am working on. Here is my problem: My company manufactures a device that produces two sinewaves in quadrature that are used to indicate position. The device is called an encoder and is used in mach