Repository navigation
HistogramRepresentation: give bin_edges a parameter entry - #11
Merged
Merged
Conversation
bin_edges had no name line in the Parameters section at all. Its description sat at the end of the nested "Example" block of partition_blocks, so numpydoc read it as part of that parameter and bin_edges came out undocumented. The description was also wrong about the options. It offered "fixed" and "quantile"; the code accepts "fixed" and "auto" and raises on anything else, so the documented option did not exist and the real one was not mentioned. That matters now that HDx depends on "auto". Every __init__ parameter is now documented, in signature order. Also puts a blank line before the mode option list, which an RST bullet list needs. Docstring only; no behaviour changes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
luizfernandolj
added a commit
that referenced
this pull request
Nov 9, 2026
The Unreleased section still said "Nothing yet. Add user-visible changes here as they land", while six PRs had landed: #7, #10, #6, #8, #9 and #11. Two of them change output and say so in bold, because someone holding results from v0.5.1 is affected: HDx estimates differ now that raw features are binned on their own scale, and the one-vs-rest path returns a uniform vector instead of all-zeros where every class used to clip to zero. The MLPE change is cost only and the entry says the estimate is unchanged. The Tests entry says ten of the thirteen new tests fail on v0.5.1, not all thirteen: the three parametrized cv cases already passed and guard against regression rather than capturing the bug. Markdown only; no code and no behaviour change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
What is wrong
bin_edgeshas no name line inHistogramRepresentation's Parameters section. Its description sits at the end of the nestedExampleblock belonging topartition_blocks:So numpydoc reads those three lines as part of
partition_blocks, andbin_edgesis undocumented.The description is also wrong about the options. It offers
"fixed"and"quantile". The code accepts"fixed"and"auto", and raises on anything else:The documented option does not exist, and the real one is not mentioned. That matters now that
HDxdepends on"auto".What this does
bin_edgesits own entry, in signature order, betweenpartition_blocksandlaplace_smoothing."auto"does: per-feature edges fitted infit, with the outer bins left unbounded so values beyond the fitted range land in the end bins instead of being dropped.modeoption list, which an RST bullet list needs.Checks
Every
__init__parameter is now documented, in signature order, verified againstinspect.signature:Docstring only, no behaviour change. 277 tests pass and the representations module's 16 doctests pass.
🤖 Generated with Claude Code