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 clipping to MultiplyRobust estimator #98

Open
brash6 opened this issue Oct 30, 2024 · 1 comment
Open

Add clipping to MultiplyRobust estimator #98

brash6 opened this issue Oct 30, 2024 · 1 comment

Comments

@brash6
Copy link
Collaborator

brash6 commented Oct 30, 2024

In the med_bench_prototype implementation, clipping is not implemented, there's only these commented lines :

# clipping
# p_x_clip = p_x != np.clip(p_x, self._clip, 1 - self._clip)
# f_m0x_clip = f_m0x != np.clip(f_m0x, self._clip, 1 - self._clip)
# f_m1x_clip = f_m1x != np.clip(f_m1x, self._clip, 1 - self._clip)
# clipped = p_x_clip + f_m0x_clip + f_m1x_clip

# var_name = ["t", "y", "p_x", "f_m0x", "f_m1x", "mu_1mx", "mu_0mx"]
# var_name += ["E_mu_t1_t1", "E_mu_t0_t0", "E_mu_t1_t0", "E_mu_t0_t1"]
# n_discarded = 0
# for var in var_name:
#     exec(f"{var} = {var}[~clipped]")
# n_discarded += np.sum(clipped)

Do we want to perform clipping ?
If yes, do we want to uncomment these lines or do we want to perform it in another way ?
@houssamzenati @bthirion @judithabk6

@bthirion
Copy link
Collaborator

+1 for it...
... but preferably in a forthcoming PR.

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

2 participants