Thanks for the heads up. However, the proposed code by @ksemb doesn't seem to 
solve my problem. As far as I understood it, this issue is about the 
normalization step that doesn't seem to work in an underdetermined case. In 
@ksemb's proposed code, he still uses SVD to implement LDA (in contrast to the 
MATLAB implementation he used as a template). This means that regularization of 
the covariance matrix is only possible in the original MATLAB code, but not in 
@ksemb's Python version.

Following the discussion of 
https://github.com/scikit-learn/scikit-learn/issues/1649, I think that with 
ksemb's last comment he makes it clear that there are still problems even with 
his revised version. I suggest to use the classical straightforward formulation 
by e.g. Duda and Hart, pp. 117-121, where you simply compute the scatter 
matrices and get the weights via

w = S_W^{-1} * (m_1 - m_2)

This is exactly what happens in the MATLAB template that @ksemb is referring 
to. 
In this case, the calculation of the within-class scatter matrix S_W can be 
shrunk when computing S_1 and S_2 (and potentially of course for more than two 
classes).

I've been using such an implementation (at least in MATLAB) for a long time and 
never experienced any problems.

I will also post the gist of this message to the comments of issue 1649 to 
discuss the next steps.

Clemens



On 02/18/2014 06:20 PM, Alexandre Gramfort wrote:
> https://github.com/scikit-learn/scikit-learn/issues/1649
>
> have a look at the implemention from @ksemb
>
> https://gist.github.com/ksemb/4c3c86c6b62e7a99989b
>
> and the discussion on the issue
>
> HTH
> A
>
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>


------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to