Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add methods for performing Wald-tests #668

Merged
merged 29 commits into from
Aug 24, 2023
Merged

Add methods for performing Wald-tests #668

merged 29 commits into from
Aug 24, 2023

Conversation

MartinStancsicsQC
Copy link
Contributor

@MartinStancsicsQC MartinStancsicsQC commented Aug 2, 2023

Checklist

  • Added a CHANGELOG.rst entry

Summary

This PR adds some support for doing inference on estimated GLMs. Wald-tests can be performed based on a restriction matrix and corresponding RHS vector (lower-level, flexible), a list of feature names or a list of term names.

Notes

Can be re-added when we actually store term names in the model.
Copy link
Contributor

@MatthiasSchmidtblaicherQC MatthiasSchmidtblaicherQC 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 to me. I have some small stylistic points and a suggestion for a check that we could do.

src/glum/_glm.py Outdated Show resolved Hide resolved
src/glum/_glm.py Outdated Show resolved Hide resolved
src/glum/_glm.py Show resolved Hide resolved
src/glum/_glm.py Outdated Show resolved Hide resolved
src/glum/_glm.py Outdated Show resolved Hide resolved
tests/glm/test_glm.py Show resolved Hide resolved
src/glum/_glm.py Outdated Show resolved Hide resolved
src/glum/_glm.py Outdated Show resolved Hide resolved
CHANGELOG.rst Outdated Show resolved Hide resolved
CHANGELOG.rst Outdated Show resolved Hide resolved
Copy link
Member

@MarcAntoineSchmidtQC MarcAntoineSchmidtQC left a comment

Choose a reason for hiding this comment

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

Looks really good.
Please look at my suggestion for renaming the wald test methods. Otherwise, I think this can be merged.
🎉

src/glum/_glm.py Outdated Show resolved Hide resolved
@MartinStancsicsQC
Copy link
Contributor Author

MartinStancsicsQC commented Aug 17, 2023

Thank you @MarcAntoineSchmidtQC! The methods have been renamed. Should it go into main or glum-v3?

src/glum/_glm.py Outdated Show resolved Hide resolved
src/glum/_glm.py Outdated Show resolved Hide resolved
src/glum/_glm.py Outdated Show resolved Hide resolved
src/glum/_glm.py Outdated Show resolved Hide resolved
src/glum/_glm.py Outdated Show resolved Hide resolved
src/glum/_glm.py Show resolved Hide resolved
tests/glm/test_glm.py Show resolved Hide resolved
tests/glm/test_glm.py Show resolved Hide resolved
tests/glm/test_glm.py Outdated Show resolved Hide resolved
tests/glm/test_glm.py Outdated Show resolved Hide resolved
@MartinStancsicsQC
Copy link
Contributor Author

Note: windows conda-build also fails on main. (was fine in the morning...)

@MartinStancsicsQC
Copy link
Contributor Author

Related mamba issue: mamba-org/mamba#2770

@jonashaag
Copy link
Contributor

Are you pinning Mamba to 1.4.2 on purpose?

@MartinStancsicsQC
Copy link
Contributor Author

I don't think so. I'm not even sure where that pin comes from.

@MartinStancsicsQC
Copy link
Contributor Author

@jonashaag I don't think it's about the libmamba version. The CI for the same commit was green this morning but red when I rerun it this afternoon.. Based on the logs, the difference between the build environment is that the passing one uses libsolv 0.7.24 build 1, while the failing one uses libsolv 0.7.24 build 2. (there is also a difference in the patch version of wheel but I don't think that's the issue.) Is it possible that it is a libsolv problem?

@jonashaag
Copy link
Contributor

jonashaag commented Aug 22, 2023

@pavelzw it looks like you made the libsolv change, can you have a look please?

@MartinStancsicsQC
Copy link
Contributor Author

Never mind, libsolv build 2 was indeed broken and build 3 seem to have solved our issues

@MartinStancsicsQC MartinStancsicsQC merged commit 86f4ec6 into main Aug 24, 2023
22 checks passed
@MartinStancsicsQC MartinStancsicsQC deleted the wald-test-2 branch August 24, 2023 14:42
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.

5 participants