-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
feat: Support fit_power_law(implementation = "plfit.p")
to compute the P-value
#1386
Conversation
Current Aviator status
This PR was merged using Aviator.
See the real-time status of this PR on the
Aviator webapp.
Use the Aviator Chrome Extension
to see the status of your PR within GitHub.
|
This pull request failed to merge: this PR is in draft state. Once the issues are resolved, remove the Additional debug info: PR was marked as draft after queueing |
I see I was tasked with refining the interface as needed, but I'd need some more pointers/context. |
@krlmlr I have added I have created I assume there is no tests for this function right now? I think we might need to add it using snapshot? |
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.
Thanks, looks good!
IGRAPH_R_CHECK_BOOL(pvalue); | ||
c_compute_pvalue = LOGICAL(pvalue)[0]; | ||
|
||
IGRAPH_R_CHECK(igraph_power_law_fit(&c_data, &c_res, c_xmin, c_force_continuous)); |
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.
We could also call the generated function and use lengthgets()
to add an element to the returned list. This is better because we then would still rely on autogeneration for the better part of the code here.
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.
we can't use generated function. To compute p-value
we need return value from igraph_power_law_fit
C function, but we lose this data if use generated function. I think using generated function give to much overhead.
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.
Thanks @Antonov548!
@krlmlr do you have further thoughts on this?
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.
Thanks, makes sense to me.
Thanks! |
This pull request failed to merge: PR cannot be automatically rebased, please rebase manually to continue. Once the issues are resolved, remove the Additional debug info: Failed to rebase this PR onto the latest changes from the base branch. You will probably need to rebase this PR manually and resolve conflicts). |
Co-authored-by: Kirill Müller <krlmlr@users.noreply.github.com>
@Antonov548 I resolved the conflict in |
Thanks. Seems everything is fine. |
thank you @Antonov548! |
Closes #1158.