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
Added trials parameter to leiden #790
Conversation
…ogic-native 1.0.0 or higher to use it
Deploy Preview for graspologic failed. Built with commit 0f6a1a9 https://app.netlify.com/sites/graspologic/deploys/60a43eb4aeb92300078cea94 |
if not isinstance(trials, int): | ||
raise TypeError("trials must be a positive integer") | ||
if trials < 1: | ||
raise ValueError("trials must be a positive integer") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know we've talked about input checking at various times - I've always thought it could be helpful to use things like https://scikit-learn.org/stable/modules/generated/sklearn.utils.check_scalar.html going forward, just to be more concise and consistent. I don't care for the purposes of this PR but thought I'd bring it up.
@@ -277,6 +278,13 @@ def leiden( | |||
if it is found to be a directed graph. If you know it is undirected and wish to | |||
avoid this scan, you can set this value to ``False`` and only the lower triangle | |||
of the adjacency matrix will be used to generate the weighted edge list. | |||
trials : int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also don't want to let this hold up the PR, but this seems like something we should add to the stack of #755 and consider how we name parameters like this in the future. This exact thing happens in match
and cluster
at a minimum and there we call it n_init
.
for some reason netlify build failed with
|
Added trials parameter to leiden and set a new requirement of graspologic-native 1.0.0 or higher to use it.