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

Wrong test_m_is_binary #33

Closed
sami6mz opened this issue Jul 6, 2023 · 0 comments
Closed

Wrong test_m_is_binary #33

sami6mz opened this issue Jul 6, 2023 · 0 comments

Comments

@sami6mz
Copy link
Contributor

sami6mz commented Jul 6, 2023

In test_get_simulated_data.py :

The test about whether m is binary or not is wrong. It computes how much binary entries m has and compares it with n, while it should be compared with n*dim_m.

Lines 109-113 :

def test_m_is_binary(m, dict_param):
    if dict_param["type_m"] == "binary":
        assert sum(m.ravel() == 1) + sum(m.ravel() == 0) == dict_param["n"]
    else:
        assert sum(m.ravel() == 1) + sum(m.ravel() == 0) < dict_param["n"]

Correction :

def test_m_is_binary(m, dict_param):
    if dict_param["type_m"] == "binary":
        assert sum(m.ravel() == 1) + sum(m.ravel() == 0) == dict_param["n"]*dict_param["dim_m"]
    else:
        assert sum(m.ravel() == 1) + sum(m.ravel() == 0) < dict_param["n"]*dict_param["dim_m"]

Note : Since issue #4 is not resolved, this correction doesn't change anything. (m cannot be multidimensional)

sami6mz pushed a commit to sami6mz/med_bench that referenced this issue Jul 7, 2023
sami6mz pushed a commit to sami6mz/med_bench that referenced this issue Jul 7, 2023
judithabk6 pushed a commit that referenced this issue Jul 9, 2023
Co-authored-by: Sami Boumaiza <[email protected]>
@sami6mz sami6mz closed this as completed Jul 27, 2023
judithabk6 pushed a commit that referenced this issue Jul 30, 2023
completing the implementation of the multiply robust estimator and solving #33

---------

Co-authored-by: Sami Boumaiza <[email protected]>
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

1 participant