Skip to content

Conversation

@dajmcdon
Copy link
Owner

No description provided.

@dajmcdon dajmcdon requested a review from Copilot June 10, 2025 19:21
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}.

@dajmcdon dajmcdon merged commit f0bb735 into main Jun 10, 2025
5 checks passed
@dajmcdon dajmcdon deleted the weight-normalization branch June 10, 2025 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants