Re: [Scikit-learn-general] scikit learn classification issue

2014-09-04 Thread Olivier Grisel
Another possible strategy: Add a new class named "random garbage" to your training set with random text collected from wikipedia or social networks messages, or both. -- Olivier -- Slashdot TV. Video for Nerds. Stuff

Re: [Scikit-learn-general] scikit learn classification issue

2014-09-04 Thread Mohamed-Rafik Bouguelia
Karimkhan, Two possible naive methods that you can directly use with sklearn are: (1) use predict_proba and check if the probability of belonging to the most probable class (p1) is less than a threshold. Or you can use the entropy over the probability distribution instead of p1. However, an insta

Re: [Scikit-learn-general] scikit learn classification issue

2014-09-04 Thread Lars Buitinck
2014-09-04 15:45 GMT+02:00 Karimkhan Pathan : > Oh okay, well I tried with predict_proba. But if query is out of domain then > classifier uniformly divide probability to all learned domains. Like in case > of 4 domains (0.333123570669, 0.333073654046, 0.166936800591, > 0.166865974694) Naive Bayes

Re: [Scikit-learn-general] scikit learn classification issue

2014-09-04 Thread Karimkhan Pathan
Oh okay, well I tried with predict_proba. But if query is out of domain then classifier uniformly divide probability to all learned domains. Like in case of 4 domains (0.333123570669, 0.333073654046, 0.166936800591, 0.166865974694) On Thu, Sep 4, 2014 at 7:00 PM, Gael Varoquaux < gael.varoqu...@n

Re: [Scikit-learn-general] scikit learn classification issue

2014-09-04 Thread Gael Varoquaux
On Thu, Sep 04, 2014 at 05:22:02PM +0530, Karimkhan Pathan wrote: > Well could you please throw light on my classification issue? I guess > you might be knowing well whether something helpful class/method exists > in scikit which can solve this issue.  I don't know. I would naively try to do a pre

Re: [Scikit-learn-general] scikit learn classification issue

2014-09-04 Thread Karimkhan Pathan
Hey Gaël, Happy to see you on this thread. Actually today only I was listening to your scikit Ipython notebook tutorial. Well could you please throw light on my classification issue? I guess you might be knowing well whether something helpful class/method exists in scikit which can solve this iss

Re: [Scikit-learn-general] scikit learn classification issue

2014-09-04 Thread Gael Varoquaux
On Thu, Sep 04, 2014 at 11:01:44AM +0200, Mohamed-Rafik Bouguelia wrote: > An example of this is the paper that can be found here: http://www.loria.fr/ > ~mbouguel/papers/BougueliaICPR.pdf > Mohamed-Rafik Bouguelia, Yoland Belaid and Abdel Belaid. Efficient active > novel > class detection for dat

Re: [Scikit-learn-general] Dirichlet priors on multinomial Bayes?

2014-09-04 Thread Lars Buitinck
2014-09-04 12:30 GMT+02:00 Lars Buitinck : > This class prior is just the P(y) in P(y|x) = (P(x|y) × P(y)) / Z. > It's a simple multinomial. s/multinomial/categorical/ (I always confuse those two). -- Slashdot TV. Vide

Re: [Scikit-learn-general] Dirichlet priors on multinomial Bayes?

2014-09-04 Thread Lars Buitinck
2014-08-28 5:47 GMT+02:00 Josh Wasserstein : > What prior does scikit-learn use for MultinomialNB? The documentation says: > > class_prior : array-like, size (n_classes,) > Prior probabilities of the classes. If specified the priors are not adjusted > according to the data. > > For N classes, one

Re: [Scikit-learn-general] Print coordinate descent coefficients at each iteration

2014-09-04 Thread Alberto Torres
with gil: print("something with gil") That seems to work. What doesn't is to get the GIL for the whole algorithm (it compiles without errors but messes up the algorithm) Un saludo, Alberto On Mon, Sep 1, 2014 at 5:36 PM, Danny Sullivan wrote: > Hey Alberto, > > Try > > with gil: > p

Re: [Scikit-learn-general] scikit learn classification issue

2014-09-04 Thread Mohamed-Rafik Bouguelia
Hi Patrick, Juste for information, there is some existing techniques to detect test instances whose class is not provided for training. Instead of letting the classifier put those instances in the closest match it can (the most probable known class), we detect that they belongs to a novel class wh