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

DOC : Updated docs for panther_similarity #7175

Merged
merged 4 commits into from
Jan 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions networkx/algorithms/similarity.py
Original file line number Diff line number Diff line change
Expand Up @@ -1532,7 +1532,7 @@ def panther_similarity(
source : node
Source node for which to find the top `k` similar other nodes
k : int (default = 5)
The number of most similar nodes to return
The number of most similar nodes to return.
path_length : int (default = 5)
How long the randomly generated paths should be (``T`` in [1]_)
c : float (default = 0.5)
Expand All @@ -1554,7 +1554,8 @@ def panther_similarity(
similarity : dictionary
Dictionary of nodes to similarity scores (as floats). Note:
the self-similarity (i.e., ``v``) will not be included in
the returned dictionary.
the returned dictionary. So, for ``k = 5``, a dictionary of
top 4 nodes and their similarity scores will be returned.

Raises
-------
Expand Down