def test_independent_index_matching(): control = np.random.random((30, 6)) treatment = np.random.random((10, 6)) nn_index = non_stratified_matching(control, treatment) ( selected_control_index, selected_control_index_for_each_treatment, ) = independent_index_matching(nn_index, k=5) assert len(selected_control_index) > len(set(selected_control_index))
def test_non_stratified_matching(): control = np.random.random((100, 6)) treatment = np.random.random((10, 6)) nn_index = non_stratified_matching(control, treatment)