Repository navigation
Give chung_lu() objects class undirected_chung_lu - #69
Draft
alexpghayes wants to merge 1 commit into
Draft
alexpghayes wants to merge 1 commit into
alexpghayes wants to merge 1 commit into
Conversation
chung_lu() documented that it returns an `undirected_chung_lu` object, but never set that class, so it printed as a one-block DC-SBM and print.undirected_chung_lu() was unreachable. Pass the subclass through dcsbm(), as planted_partition() does, and tidy the print method's spacing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
chung_lu()'s@returnsays it returns anundirected_chung_luobject, but the class was never set. Chung-Lu models printed as a one-block "Undirected Degree-Corrected Stochastic Blockmodel", andprint.undirected_chung_lu()was unreachable.Fix
subclass = "undirected_chung_lu"throughdcsbm(), asplanted_partition()does. The class is nowc("undirected_chung_lu", "undirected_dcsbm", "undirected_factor_model").print.undirected_chung_lu(): the underline matches the title, and blank lines separate the sections like the other print methods. The wording of each line is unchanged.@returndoc now says it is a one-blockundirected_dcsbmsubclass.Tests
New
tests/testthat/test-chung-lu.R: checks the class and thatprint()uses the Chung-Lu method. Fails onmain(3 failures), passes here. Full suite passes. Docs regenerated with roxygen2 7.3.2.Note for #60
#60's
test-print-methods.Rcallsprint.undirected_chung_lu(m)directly, with a comment thatchung_lu()objects dispatch to the DC-SBM method. Once this is merged, that test can use plainprint(m)and drop the comment. Its assertions should still pass, since the line text is unchanged.NEWS
Left out to avoid conflicting with #59. Suggested bullet under Bug fixes:
🤖 Generated with Claude Code