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

Throw error when formula has parameters that are not available #159

Closed
hguturu opened this issue Oct 2, 2023 · 2 comments
Closed

Throw error when formula has parameters that are not available #159

hguturu opened this issue Oct 2, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@hguturu
Copy link

hguturu commented Oct 2, 2023

E..g.

formulaic.model_matrix(["1+BinGrpe"],phenotypes)
where
phenotypes =  all_phenotypes = pd.DataFrame({ "AltGrp": [1, 0, 0, 1, 0, 1], "BinGrp": [0, 0, 0, 1, 1, 1], "ContGrp" : [1,2,3,4,5,6]})

yields

   Intercept
0        1.0
1        1.0
2        1.0
3        1.0
4        1.0
5        1.0

Where the typo in BinGrpe is silently ignored. I think it would be safer if an error or warning is thrown here.

@matthewwardrop
Copy link
Owner

matthewwardrop commented Oct 4, 2023

This is a regression introduced in a recent release (is broken in 0.6.4+). Will make sure this gets patched. Thanks for reporting.

@matthewwardrop
Copy link
Owner

Fixed by 2f0a480

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants