Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request updates the weight normalization behavior and associated documentation across the package. The changes include:
- Updating the documentation in RD files to clarify that supplied weights are internally coerced to sum to the number of observations.
- Adjusting the weight normalization in the IRWLS routine to scale weights by nobs.
- Modifying citation references in documentation and package description.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| man/sparsegl.Rd | Updated documentation to explain internal weight coercion. |
| man/sparsegl-package.Rd | Revised citation reference for clarity and consistency. |
| man/cv.sparsegl.Rd | Updated documentation similar to sparsegl.Rd for consistent weight coercion messaging. |
| R/sparsegl.R | Adjusted function docs to reflect the updated behavior in weight normalization. |
| R/sgl_irwls.R | Changed weight normalization to enforce that weights sum to nobs; logic now scales weights. |
| NEWS.md | Added release note for the new weight normalization behavior in IRWLS cases. |
| DESCRIPTION | Updated reference citation to match changes in documentation. |
Comments suppressed due to low confidence (3)
R/sgl_irwls.R:55
- [nitpick] Consider adding an inline comment explaining why the weights are scaled by nobs to improve maintainability and clarity.
weights <- weights / sum(weights) * nobs
man/sparsegl.Rd:116
- [nitpick] Enhance the documentation by specifying that the weights are normalized to sum to the number of observations, so users understand the transformation performed.
only be used with a \code{\link[stats:family]{stats::family()}} object. Internally coerced to sum
man/sparsegl-package.Rd:10
- [nitpick] Ensure that the citation format for Liang et al. (2024) is consistent with the project's referencing guidelines.
Efficient implementation of sparse group lasso with optional bound constraints on the coefficients; see Liang, et al., (2024) \doi{10.18637/jss.v110.i06}.
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.
No description provided.