Conversation
…ibutional setting
albertgong1
left a comment
There was a problem hiding this comment.
Looks good overall (see inline comments)
| def _make_mnar(self) -> None: | ||
| raise NotImplementedError("MNAR yet to be implemented") | ||
| # TODO: Aashish/Caleb/Kyuesong/Tatha: come back to this later | ||
| """Makes values missing not at random (MNAR), specifically staggered adoption (non-positivity & confounded)""" |
There was a problem hiding this comment.
Could you explain what each of these terms mean in the doctoring:
- non-positivity
- confounded
| g3_inds = np.arange(2 * N // 3, N) | ||
|
|
||
| gamma_1 = [2, 0.7, 1, 0.7] | ||
| gamma_2 = [2, 0.2, 1, 0.2] |
There was a problem hiding this comment.
What is the significance of γ1, γ2? These appear as magic numbers. Is there a way we can parametrize this? Should also put some documentation (inline or at the top) to explain how this entire function works.
| 1, | ||
| self._expit( | ||
| gamma_1[0] | ||
| + (0.99**t) * gamma_1[1] * U[i - 1] |
There was a problem hiding this comment.
Why is 0.99 hardcoded inline? Could this be assigned a constant value near the beta? Ideally this is a parameter too
| 1, | ||
| self._expit( | ||
| gamma_2[0] | ||
| + (1.01**t) * gamma_2[1] * U[i - 1] |
There was a problem hiding this comment.
same issue as 0.99. Maybe it should be 2 - new_const_name? What is this for anyway?
| # Data[Masking == 0] = Y0[Masking == 0] | ||
| Data: np.ndarray = np.array(Y) | ||
| return Data, Theta, Masking | ||
|
|
There was a problem hiding this comment.
Shouldn't this entire file be deleted? Why are we adding code here? Ideally all mcar and mnar code sits inside the same class, with different parameters that may affect how we wish to do MCAR/MNAR
Merge origin into mnar_and_directopt
Added mnar option in loader.py
Added fit_method.py that implements direct optimization
Added mcar distributional data generator in the mcar.py file