<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 10, 2014 at 2:49 PM, Matthew Brett <span dir="ltr"><<a href="mailto:matthew.brett@gmail.com" target="_blank" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=matthew.brett@gmail.com&cc=&bcc=&su=&body=','_blank');return false;">matthew.brett@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<div class=""><br>
On Mon, Feb 10, 2014 at 11:44 AM,  <<a href="mailto:josef.pktd@gmail.com" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=josef.pktd@gmail.com&cc=&bcc=&su=&body=','_blank');return false;">josef.pktd@gmail.com</a>> wrote:<br>


><br>
><br>
> On Mon, Feb 10, 2014 at 2:12 PM, eat <<a href="mailto:e.antero.tammi@gmail.com" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=e.antero.tammi@gmail.com&cc=&bcc=&su=&body=','_blank');return false;">e.antero.tammi@gmail.com</a>> wrote:<br>


>><br>
>><br>
>><br>
>><br>
>> On Mon, Feb 10, 2014 at 9:08 PM, alex <<a href="mailto:argriffi@ncsu.edu" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=argriffi@ncsu.edu&cc=&bcc=&su=&body=','_blank');return false;">argriffi@ncsu.edu</a>> wrote:<br>


>>><br>
>>> On Mon, Feb 10, 2014 at 2:03 PM, eat <<a href="mailto:e.antero.tammi@gmail.com" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=e.antero.tammi@gmail.com&cc=&bcc=&su=&body=','_blank');return false;">e.antero.tammi@gmail.com</a>> wrote:<br>


>>> > Rhetorical or not, but FWIW I'll prefer to take singular value<br>
>>> > decomposition<br>
>>> > (u, s, vt= svd(x)) and then based on the singular values s I'll<br>
>>> > estimate a<br>
>>> > "numerically feasible rank" r. Thus the diagonal of such hat matrix<br>
>>> > would be<br>
>>> > (u[:, :r]** 2).sum(1).<br>
>>><br>
>>> It's a small detail but you probably want svd(x, full_matrices=False)<br>
>>> to avoid anything NxN.<br>
>><br>
>> Indeed.<br>
><br>
><br>
> I meant the entire diagonal not the trace of the projection matrix.<br>
><br>
> My (not articulated) thought was that I use element wise multiplication<br>
> together with dot products instead of the three dot products, however<br>
> elementwise algebra is not very common in linear algebra based textbooks.<br>
><br>
> The question is whether students and new user coming from `matrix` languages<br>
> can translate formulas into code, or just copy formulas to code.<br>
> (It took me a while to get used to numpy and take advantage of it's features<br>
> coming from GAUSS and Matlab.)<br>
><br>
> OT since the precense or absence of matrix in numpy doesn't affect me.<br>
<br>
</div>Josef - as a data point - does statsmodels use np.matrix?<br>
<br></blockquote><div><br></div><div>No.</div><div><br></div><div>Skipper</div></div></div></div>