Example #1
0
def test_get_synthetic_auuc():
    preds_dict = get_synthetic_preds(synthetic_data_func=simulate_nuisance_and_easy_treatment,
                                     n=1000,
                                     estimators={'S Learner (LR)': LRSRegressor(), 'T Learner (XGB)': XGBTRegressor()})

    auuc_df = get_synthetic_auuc(preds_dict, plot=False)
    print(auuc_df)
Example #2
0
def test_get_synthetic_preds(synthetic_data_func):
    preds_dict = get_synthetic_preds(synthetic_data_func=synthetic_data_func,
                                     n=1000,
                                     estimators={
                                         'S Learner (LR)': LRSRegressor(),
                                         'T Learner (XGB)': XGBTRegressor()
                                     })

    assert preds_dict['S Learner (LR)'].shape[0] == preds_dict[
        'T Learner (XGB)'].shape[0]
Example #3
0
def test_get_synthetic_preds():
    preds_dict = get_synthetic_preds(
        synthetic_data_func=simulate_nuisance_and_easy_treatment,
        n=1000,
        estimators={
            'S Learner (LR)': LRSRegressor(),
            'T Learner (XGB)': XGBTRegressor()
        })

    assert preds_dict['S Learner (LR)'].shape[0] == preds_dict[
        'T Learner (XGB)'].shape[0]
Example #4
0
def test_get_synthetic_preds(synthetic_data_func):
    preds_dict = get_synthetic_preds(
        synthetic_data_func=synthetic_data_func,
        n=1000,
        estimators={
            "S Learner (LR)": LRSRegressor(),
            "T Learner (XGB)": XGBTRegressor(),
        },
    )

    assert (
        preds_dict["S Learner (LR)"].shape[0] == preds_dict["T Learner (XGB)"].shape[0]
    )