Hi Michael and Kyle,
thanks to you both for the fast replies!
(and Kyle, nice to see you here too!)
To give this a bit of context, I implemented Barber’s algorithm in Julia and
used the scikit-learn implementation to check my results (and also to get hints
for fixing numerical instability issues). I think the main source of confusion
here was that both in standard stats notation and in Julia stats packages,
samples live in columns instead of rows. However, I was aware of this since I
was transposing the data matrix I am using to test the algorithm when calling
scikit-learn functions. Go figure :)
Thanks again!
João
> On Dec 5, 2014, at 10:30 AM, Michael Eickenberg
> <michael.eickenb...@gmail.com> wrote:
>
> I am not sure if this is the exact issue here, but note that data in sklearn
> is represented row-wise: One data point per row. This means that the feature
> names are indicated by the columns.
>
> Now, after SVD, U is a matrix that lives in sample space and VT is a matrix
> that lives in feature space. The only way to access "components" that live in
> feature space is to use V. You will find the same thing in the PCA objects.
>
> Hope I am helping more than I am adding to confusion :)
> Michael
>
> On Fri, Dec 5, 2014 at 4:24 PM, João Felipe Santos <joao....@gmail.com
> <mailto:joao....@gmail.com>> wrote:
> Hi,
>
> I have been working recently with the factor analysis implementation in
> scikit-learn and checked it against its main reference (algorithm 21 in David
> Barber’s book). I noticed there is a difference from the algorithm described
> in the book in the way the SVD results are used. In the book, SVD is
> performed for the scaled data matrix like this: X = USV’, and then the first
> N columns in U and first N elements in S are used to compute the factors in
> each iteration (N being the number of components in the model). However, in
> scikit-learn code, the first N rows in V’ (or first N columns in V) are used
> instead. Is there any specific reason for using V instead of U in this case?
>
> Best regards,
> João
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> <http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk>
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> <mailto:Scikit-learn-general@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
> <https://lists.sourceforge.net/lists/listinfo/scikit-learn-general>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk_______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general