Skip to content

Conversation

heimengqi
Copy link
Contributor

@heimengqi heimengqi commented Mar 23, 2021

  • Make StatsmodelsLinearRegresssion allow fractional weight for each individual sample, which is sample_weight. Rename the weights used as the count of observations for corresponding sample_var as freq_weight.
  • For all the child classes inherit from _OrthoLearner, only expose freq_weight and sample_weight when the final stage is StatsmodelsLinearRegression or its parent class.
  • Fix a few places to make sure it works consistently with un-summarized data when both weights exist.

@heimengqi heimengqi changed the title change StatsmodelsLinearRegression to allow fractional weight create both sample_weight and freq_weight for fit Mar 27, 2021
Copy link
Collaborator

@kbattocchi kbattocchi left a comment

Choose a reason for hiding this comment

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

Looks good, I've mostly just suggested some minor tweaks to some of the docstrings

@heimengqi heimengqi merged commit 9630421 into master Mar 31, 2021
@heimengqi heimengqi deleted the mehei/fractionalweight branch March 31, 2021 16:56
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.

3 participants