pythonmachine-learningdata-analysisdata-sciencelinear-discriminant

difference between sklearn.lda.LDA() and sklearn.discriminant_analysis.LinearDiscriminantAnalysis()


In duration of reading about LinearDiscriminantAnalysis using python , I had got two different methods to implement it which are available here , http://scikit-learn.org/stable/modules/generated/sklearn.discriminant_analysis.LinearDiscriminantAnalysis.html#sklearn.discriminant_analysis.LinearDiscriminantAnalysis

In these method the signature is here ,

sklearn.discriminant_analysis.LinearDiscriminantAnalysis(solver=’svd’, shrinkage=None, priors=None, n_components=None, store_covariance=False, tol=0.0001)

Now again i found one more method with same kind of signature , which is available here ,

http://scikit-learn.org/0.16/modules/generated/sklearn.lda.LDA.html

sklearn.lda.LDA(solver='svd', shrinkage=None, priors=None, n_components=None, store_covariance=False, tol=0.0001)

I just wanted to know that what is difference between both . which method we should use in projects and why ?


Solution

  • According to documentation they are available here and as mentioned by @Atto

    http://scikit-learn.org/stable/modules/generated/sklearn.discriminant_analysis.LinearDiscriminantAnalysis.html
    

    and

    http://scikit-learn.org/0.16/modules/generated/sklearn.lda.LDA.html
    

    Now basically LDA is basically an older version and LinearDiscriminateAnalys is newly updated and is preferred