Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add note on how to estimate appropriate values for alpha #2583

Merged
merged 1 commit into from Aug 12, 2017

Conversation

jarrodmillman
Copy link
Member

@jarrodmillman jarrodmillman commented Aug 4, 2017

Fixes #2307.

I made parallel changes to both katz_centrality and katz_centrality_numpy. In particular, I added the sentence

    You can use ``max(nx.adjacency_spectrum(G))`` to get $\lambda_{\max}$ the largest
    eigenvalue of the adjacency matrix.

after the sentence (in katz_centrality)

    The parameter ``alpha`` should be strictly less than the inverse of largest
    eigenvalue of the adjacency matrix for the algorithm to converge.

and the sentence (in katz_centrality_numpy)

    The parameter ``alpha`` should be strictly less than the inverse of largest
    eigenvalue of the adjacency matrix for there to be a solution.

You will also notice that I changed the inline math markup (e.g., :math:`\beta` became $\beta$). This uses the texext Sphinx extension, which I added in PR #2588. I find the dollar_math much more readable and familiar when I am working with source files and it renders the same in HTML.

@jarrodmillman jarrodmillman added this to the networkx-2.0 milestone Aug 4, 2017
@jarrodmillman jarrodmillman self-assigned this Aug 4, 2017
@jarrodmillman jarrodmillman force-pushed the improve-katz-centrality-doc branch 4 times, most recently from 07f6be4 to 252a42c Compare August 6, 2017 18:57
@hagberg hagberg merged commit d72aca7 into networkx:master Aug 12, 2017
@jarrodmillman jarrodmillman deleted the improve-katz-centrality-doc branch August 12, 2017 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants