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

m.astype(int) for multiply_robust #41

Open
sami6mz opened this issue Jul 25, 2023 · 3 comments
Open

m.astype(int) for multiply_robust #41

sami6mz opened this issue Jul 25, 2023 · 3 comments

Comments

@sami6mz
Copy link
Contributor

sami6mz commented Jul 25, 2023

In get_estimation.py, get_estimation() :

The mediator is forced to be binary with the line m.astype(int) :

https://github.com/judithabk6/med_bench/blob/13c97dadd3209f1fdb6e8b845225a88d89f0e6e0/src/get_estimation.py#L479C19-L479C19

I'm not sure it's a good idea since the user is not warned. Plus #35 already returns an error if m is not binary.

@bthirion
Copy link
Collaborator

But you indeed want to enforce this behavior. It just needs a warning, no ?

@judithabk6
Copy link
Owner

yes. we need a global refactor of checking the input format for all estimators. The latest ones implemented by @sami6mz are good, but not the old ones, and we probably want a general function to do it, in the spirit of https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/utils/validation.py ?

@sami6mz
Copy link
Contributor Author

sami6mz commented Jul 25, 2023

But you indeed want to enforce this behavior. It just needs a warning, no ?

Yes but we don't want this behavior to be in get_estimation(). get_estimation() should only call the estimator without any hidden behavior. The enforcment should be in the estimator itself, and like @judithabk6 said probably in a general function.

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

No branches or pull requests

3 participants