Re: [Scikit-learn-general] Matlab linear classify vs SKlearn LDA

2013-02-18 Thread David Reed
Someone on Cross-validated was able to give me an answer, and it is something I should have seen. classify uses a uniform prior, while ClassificationDisciminant uses an empirical prior. Problem solved. On Mon, Feb 18, 2013 at 3:31 PM, David Reed wrote: > Ahh, I have used Gist, but am absent m

Re: [Scikit-learn-general] Matlab linear classify vs SKlearn LDA

2013-02-18 Thread David Reed
Ahh, I have used Gist, but am absent minded today it seems. https://gist.github.com/dvreed77/4980426 On Mon, Feb 18, 2013 at 3:23 PM, Andreas Mueller wrote: > On 02/18/2013 09:07 PM, David Reed wrote: > > So I came up with this small test script to show the difference > > between Matlab's class

Re: [Scikit-learn-general] Matlab linear classify vs SKlearn LDA

2013-02-18 Thread Andreas Mueller
On 02/18/2013 09:07 PM, David Reed wrote: > So I came up with this small test script to show the difference > between Matlab's classify function and Matlab's > ClassificationDiscriminant function. It appears that for balanced > classes, they perform identically, but when you unbalance them you

Re: [Scikit-learn-general] Matlab linear classify vs SKlearn LDA

2013-02-18 Thread David Reed
So I came up with this small test script to show the difference between Matlab's classify function and Matlab's ClassificationDiscriminant function. It appears that for balanced classes, they perform identically, but when you unbalance them you get radically different answers. This problem become

Re: [Scikit-learn-general] Matlab linear classify vs SKlearn LDA

2013-02-15 Thread David Reed
Yes that is the method I was using, and its not giving the same results. I'm going to keep working on getting some sim data. On Fri, Feb 15, 2013 at 5:01 AM, Andreas Mueller wrote: > On 02/15/2013 02:10 AM, David Reed wrote: > > Could you link that? > > > http://www.mathworks.de/products/stati

Re: [Scikit-learn-general] Matlab linear classify vs SKlearn LDA

2013-02-15 Thread Andreas Mueller
On 02/15/2013 02:10 AM, David Reed wrote: Could you link that? http://www.mathworks.de/products/statistics/examples.html?file=/products/demos/shipping/stats/classdemo.html#3 "The classify function can perform classification using different types of discriminant analysis. First classify the da

Re: [Scikit-learn-general] Matlab linear classify vs SKlearn LDA

2013-02-14 Thread David Reed
Could you link that? I found a function in Matlab, ClassificationDiscriminant, that performs exactly the same as Python and R. So what is the real difference between calling the classify algorithm in Matlab and this ClassificationDiscriminant function? On Thu, Feb 14, 2013 at 4:14 PM, wrote: >

Re: [Scikit-learn-general] Matlab linear classify vs SKlearn LDA

2013-02-14 Thread amueller
matlab doc online says linear classifier is lda by default. Andrew Winterman schrieb: >Logistic regression can be used as a linear classifier. Maybe that's >matlab's linear classifier? > >On Thursday, February 14, 2013, David Reed wrote: > >> I was mistaken, R is providing the exact same resu

Re: [Scikit-learn-general] Matlab linear classify vs SKlearn LDA

2013-02-14 Thread Andrew Winterman
Logistic regression can be used as a linear classifier. Maybe that's matlab's linear classifier? On Thursday, February 14, 2013, David Reed wrote: > I was mistaken, R is providing the exact same results as Python. Is > there a difference between a linear classifer and LDA? Matlab never uses >

Re: [Scikit-learn-general] Matlab linear classify vs SKlearn LDA

2013-02-14 Thread David Reed
I was mistaken, R is providing the exact same results as Python. Is there a difference between a linear classifer and LDA? Matlab never uses the words Linear Discriminant Analysis, its just says linear classifier, but is giving different results than these other two software packages. On Thu,

Re: [Scikit-learn-general] Matlab linear classify vs SKlearn LDA

2013-02-14 Thread David Reed
I don't think I can provide the data, but I'm trying to create some simulated data that produces a similar difference. I was just messing with R, and for LDA got a different result from the other 2. I wonder if its just something I am doing wrong. On Thu, Feb 14, 2013 at 10:07 AM, Andreas Muel

Re: [Scikit-learn-general] Matlab linear classify vs SKlearn LDA

2013-02-14 Thread Andreas Mueller
On 02/14/2013 04:04 PM, Andreas Mueller wrote: > On 02/14/2013 03:59 PM, David Reed wrote: >> I dont think this is the problem. My data is definetly oversampled, I >> have 5000 samples for the 1 feature. >> >> I also should say that the problem that led be to LDA was seeing there >> was a large bi

Re: [Scikit-learn-general] Matlab linear classify vs SKlearn LDA

2013-02-14 Thread Andreas Mueller
On 02/14/2013 03:59 PM, David Reed wrote: > I dont think this is the problem. My data is definetly oversampled, I > have 5000 samples for the 1 feature. > > I also should say that the problem that led be to LDA was seeing there > was a large bias between SVM classification accuracy in sklearn an

Re: [Scikit-learn-general] Matlab linear classify vs SKlearn LDA

2013-02-14 Thread David Reed
I dont think this is the problem. My data is definetly oversampled, I have 5000 samples for the 1 feature. I also should say that the problem that led be to LDA was seeing there was a large bias between SVM classification accuracy in sklearn and matlab. I am using the same parameters on both, an

Re: [Scikit-learn-general] Matlab linear classify vs SKlearn LDA

2013-02-14 Thread Andreas Mueller
Hi Dave. It could be related to this bug: https://github.com/scikit-learn/scikit-learn/issues/1649 But I'm just guessing. If you could provide some toy data and the resulting models to reproduce, we could try to hunt down the problem. Any help there would be much appreciated. Cheers, Andy On

[Scikit-learn-general] Matlab linear classify vs SKlearn LDA

2013-02-14 Thread David Reed
I was hoping I might be able to get some assistance here. I'm working on a classification problem and have started to see some pretty large discrepancies between results from Matlab and Sklearn. The problem arises when doing univariate LDA. My set is fairly large with an N of 5000, but he class