Repository navigation
BUG: support model-aware RLM scale callbacks - #9968
Closed
deepakganesh78 wants to merge 2 commits into
Closed
deepakganesh78 wants to merge 2 commits into
deepakganesh78 wants to merge 2 commits into
Conversation
Allow callable scale estimators to accept the fitted model and residuals while preserving existing single-argument callback behavior. Closes statsmodels#9171 Co-authored-by: Copilot <[email protected]>
Member
|
Could you add a real-world use case for this as part of the test? |
bashtage
requested changes
Jul 25, 2026
| parameters = inspect.signature(self.scale_est).parameters.values() | ||
| except (TypeError, ValueError): | ||
| parameters = () | ||
| n_args = sum( |
Member
There was a problem hiding this comment.
This is far too complicated. Why can a standard try, except work? Also, if the callable signature was (resid, model) then one could have model be optional so that existing methods can be simplified.
|
Thanks for the pull request! The AI Disclosure checklist item in the PR description hasn't been completed yet. Per the AI Policy, please edit the PR description and check the box that applies: either "No AI tools were used" or "AI tools were used" (naming the tool(s) and how they were used). |
6 of 7 tasks
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.
Summary
(model, resid)Validation
pytest statsmodels/robust/tests/test_rlm.py -q(137 passed, 14 skipped)pytest statsmodels/robust/tests/test_scale.py -k huber -q(10 passed)git diff --checkCloses #9171