[SciPy-Dev] scipy.sparse.csgraph.laplacian enhancement proposal (random-walk normalized Laplacian)

Amit Moscovich Eiger moscovich at gmail.com
Sat May 23 18:40:43 EDT 2015


Hi,
This is a proposal to add the functionality of computing the random-walk
normalized Laplacian matrix to the scipy.sparse.csgraph.laplacian function.

Currently this function receives the optional boolean parameter 'normed'.
If normed==False it computes the plain Laplacian matrix and if normed==True
it computes the symmetric normalized Laplacian matrix. However the
random-walk normalized Laplacian is sorely missing here (*) and may be the
best choice in some contexts (**). I propose to add the random-walk
normalized Laplacian functionality by changing the 'normed' boolean
parameter to a 'normalization' parameter, which can be one of the
following: None (default), 'symmetric' or 'randomwalk'.

The problem with this suggestion is that it breaks the interface of the
laplacian() function, though it's easy to make a backwards-compatible
interface (e.g. add the optional 'normalization' parameter in addition to
the 'normed' boolean parameter).

Two questions:
1) I'm new here. Do I just implement the feature (and relevant unit test)
and send a pull request?
2) Is it considered OK to break the interface in such cases, or should I
make it backwards-compatible?

Thanks,
Amit Moscovich Eiger.

References:
(*) For the definition of the Laplacian, symmetric normalized Laplacian and
the random-walk normalized Laplacian, see
https://en.wikipedia.org/wiki/Laplacian_matrix
(**) See section 8.5 of "A Tutorial on Spectral Clustering"
http://arxiv.org/abs/0711.0189,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20150524/977e6e71/attachment.html>


More information about the SciPy-Dev mailing list