1. Singular Value Decomposition in SciPy

    SciPy contains two methods to compute the singular value decomposition (SVD) of a matrix: scipy.linalg.svd and scipy.sparse.linalg.svds. In this post I'll compare both methods for the task of computing the full SVD of a large dense matrix.

    The first method, scipy.linalg.svd, is ...

    read more

    There are comments.

  2. line-by-line memory usage of a Python program

    My newest project is a Python library for monitoring memory consumption of arbitrary process, and one of its most useful features is the line-by-line analysis of memory usage for Python code. I wrote a basic prototype six months ago after being surprised by the lack of related tools. I wanted ...

    read more

    There are comments.

  3. Low rank approximation

    A little experiment to see what low rank approximation looks like. These are the best rank-k approximations (in the Frobenius norm) to the a natural image for increasing values of k and an original image of rank 512.

    Python code can be found here. GIF animation made using ImageMagic's ...

    read more

    There are comments.

  4. qr_multiply function in scipy.linalg

    In scipy's development version there's a new function closely related to the QR-decomposition of a matrix and to the least-squares solution of a linear system. What this function does is to compute the QR-decomposition of a matrix and then multiply the resulting orthogonal factor by another arbitrary matrix ...

    read more

    There are comments.

  5. scikit-learn 0.9

    Sun 02 October 2011

    Last week we released a new version of scikit-learn. The Changelog is particularly impressive, yet personally this release is important for other reasons. This will probably be my last release as a paid engineer. I'm starting a PhD next month, and although I plan to continue contributing to the ...

    read more

    There are comments.

  6. Ridge regression path

    Ridge coefficients for multiple values of the regularization parameter can be elegantly computed by updating the thin SVD decomposition of the design matrix:

    import numpy as np
    from scipy import linalg
    def ridge(A, b, alphas):
        """
        Return coefficients for regularized least squares
    
             min ||A x - b||^2 + alpha ||x||^2 ...
    read more

    There are comments.

  7. « Page 2 / 17 »

blogroll

social