[Numpy-discussion] deprecate numpy.matrix
alex
argriffi at ncsu.edu
Mon Feb 10 12:00:27 EST 2014
On Mon, Feb 10, 2014 at 11:27 AM, <josef.pktd at gmail.com> wrote:
> How do we calculate the diagonal of the hat matrix without using N by N
> matrices?
Not sure if this was a rhetorical question or what, but this seems to work
leverages = np.square(scipy.linalg.qr(X, mode='economic')[0]).sum(axis=1)
http://www4.ncsu.edu/~ipsen/ps/slides_CSE2013.pdf
Sorry for off-topic...
More information about the NumPy-Discussion
mailing list