From 2162f732da5e218e85449fd44664cc49723466a0 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Wed, 12 Mar 2025 16:25:31 +0100 Subject: [PATCH 01/60] add simple did multi simulation --- results/did/did_pa_multi_coverage.csv | 5 + .../did/did_pa_multi_coverage_metadata.csv | 2 + scripts/did/did_pa_multi_coverage.py | 165 ++++++++++++++++++ 3 files changed, 172 insertions(+) create mode 100644 results/did/did_pa_multi_coverage.csv create mode 100644 results/did/did_pa_multi_coverage_metadata.csv create mode 100644 scripts/did/did_pa_multi_coverage.py diff --git a/results/did/did_pa_multi_coverage.csv b/results/did/did_pa_multi_coverage.csv new file mode 100644 index 0000000..6e5e19f --- /dev/null +++ b/results/did/did_pa_multi_coverage.csv @@ -0,0 +1,5 @@ +Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition +Linear,Linear,observational,False,1,0.9,0.9029166666666666,0.3186627096956461,0.07711696371410508,0.901,0.49537746791429166,1000 +Linear,Linear,observational,False,1,0.95,0.95125,0.3797100386232941,0.07711696371410508,0.95,0.5448416509948917,1000 +Linear,Linear,observational,True,1,0.9,0.9003333333333333,0.3167085369567106,0.07700388113671185,0.901,0.49287577992610865,1000 +Linear,Linear,observational,True,1,0.95,0.9498333333333334,0.37738149818350913,0.07700388113671185,0.948,0.541465330653648,1000 diff --git a/results/did/did_pa_multi_coverage_metadata.csv b/results/did/did_pa_multi_coverage_metadata.csv new file mode 100644 index 0000000..5398bd1 --- /dev/null +++ b/results/did/did_pa_multi_coverage_metadata.csv @@ -0,0 +1,2 @@ +DoubleML Version,Script,Date,Total Runtime (seconds),Python Version +0.10.dev0,did_pa_multi_coverage.py,2025-03-12 16:23:08,1368.6782059669495,3.11.9 diff --git a/scripts/did/did_pa_multi_coverage.py b/scripts/did/did_pa_multi_coverage.py new file mode 100644 index 0000000..c983f4e --- /dev/null +++ b/scripts/did/did_pa_multi_coverage.py @@ -0,0 +1,165 @@ +import numpy as np +import pandas as pd +from datetime import datetime +import time +import sys + +from sklearn.linear_model import LinearRegression, LogisticRegression + +import doubleml as dml +from doubleml.did.datasets import make_did_CS2021 + +# Number of repetitions +n_rep = 1000 +max_runtime = 5.5 * 3600 # 5.5 hours in seconds + +# DGP pars +dgp_dict = {} + +df_oracle = make_did_CS2021(n_obs=int(1e+6), dgp_type=1) +df_oracle["ite"] = df_oracle["y1"] - df_oracle["y0"] +df_oracle_thetas = df_oracle.groupby(["d", "t"])["ite"].mean().reset_index() +# drop +print(df_oracle_thetas) + +n_obs = 2000 + +# to get the best possible comparison between different learners (and settings) we first simulate all datasets +np.random.seed(42) + +dgp_types = [1] +n_dgps = len(dgp_types) +datasets = [] +for dgp_type in dgp_types: + datasets_dgp = [] + for i in range(n_rep): + data = make_did_CS2021(n_obs=n_obs, dgp_type=dgp_type) + datasets_dgp.append(data) + datasets.append(datasets_dgp) + + +# set up hyperparameters +hyperparam_dict = { + "DGP": dgp_types, + "score": ["observational"], + "in sample normalization": [True, False], + "learner_g": [("Linear", LinearRegression()),], + "learner_m": [("Linear", LogisticRegression()),], + "level": [0.95, 0.90] +} + +# set up the results dataframe +df_results_detailed = pd.DataFrame() + +# start simulation +np.random.seed(42) +start_time = time.time() + +for i_rep in range(n_rep): + print(f"Repetition: {i_rep + 1}/{n_rep}", end="\r") + + # Check the elapsed time + elapsed_time = time.time() - start_time + if elapsed_time > max_runtime: + print("Maximum runtime exceeded. Stopping the simulation.") + break + + for i_dgp, dgp_type in enumerate(dgp_types): + # define the DoubleML data object + obj_dml_data = dml.data.DoubleMLPanelData( + datasets[i_dgp][i_rep], + y_col="y", + d_cols="d", + id_col="id", + t_col="t", + x_cols=["Z1", "Z2", "Z3", "Z4"], + ) + + for learner_g_idx, (learner_g_name, ml_g) in enumerate(hyperparam_dict["learner_g"]): + for learner_m_idx, (learner_m_name, ml_m) in enumerate(hyperparam_dict["learner_m"]): + for score in hyperparam_dict["score"]: + for in_sample_normalization in hyperparam_dict["in sample normalization"]: + if score == "experimental": + dml_DiD = dml.did.DoubleMLDIDMulti( + obj_dml_data=obj_dml_data, + ml_g=ml_g, + ml_m=None, + gt_combinations="standard", + score=score, + in_sample_normalization=in_sample_normalization) + else: + assert score == "observational" + dml_DiD = dml.did.DoubleMLDIDMulti( + obj_dml_data=obj_dml_data, + ml_g=ml_g, + ml_m=ml_m, + gt_combinations="standard", + score=score, + in_sample_normalization=in_sample_normalization) + dml_DiD.fit(n_jobs_cv=5) + + # oracle values + theta = np.full_like(dml_DiD.coef, np.nan) + for i, (g, _, t) in enumerate(dml_DiD.gt_combinations): + group_index = df_oracle_thetas["d"] == g + time_index = df_oracle_thetas["t"] == t + theta[i] = df_oracle_thetas[group_index & time_index]["ite"].iloc[0] + + for level_idx, level in enumerate(hyperparam_dict["level"]): + confint = dml_DiD.confint(level=level) + coverage = np.mean((confint.iloc[:, 0] < theta) & (theta < confint.iloc[:, 1])) + ci_length = np.mean(confint.iloc[:, 1] - confint.iloc[:, 0]) + bias = np.mean(abs(dml_DiD.coef - theta)) + + dml_DiD.bootstrap(n_rep_boot=2000) + confint_uniform = dml_DiD.confint(level=level, joint=True) + + coverage_uniform = all((confint_uniform.iloc[:, 0] < theta) & (theta < confint_uniform.iloc[:, 1])) + ci_length_uniform = np.mean(confint_uniform.iloc[:, 1] - confint_uniform.iloc[:, 0]) + + df_results_detailed = pd.concat( + (df_results_detailed, + pd.DataFrame({ + "Coverage": coverage, + "CI Length": ci_length, + "Bias": bias, + "Uniform Coverage": coverage_uniform, + "Uniform CI Length": ci_length_uniform, + "Learner g": learner_g_name, + "Learner m": learner_m_name, + "Score": score, + "In-sample-norm.": in_sample_normalization, + "DGP": dgp_type, + "level": level, + "repetition": i_rep}, index=[0])), + ignore_index=True) + +df_results = df_results_detailed.groupby( + ["Learner g", "Learner m", "Score", "In-sample-norm.", "DGP", "level"]).agg( + {"Coverage": "mean", + "CI Length": "mean", + "Bias": "mean", + "Uniform Coverage": "mean", + "Uniform CI Length": "mean", + "repetition": "count"} + ).reset_index() +print(df_results) + +end_time = time.time() +total_runtime = end_time - start_time + +# save results +script_name = "did_pa_multi_coverage.py" +path = "results/did/did_pa_multi_coverage" + +metadata = pd.DataFrame({ + 'DoubleML Version': [dml.__version__], + 'Script': [script_name], + 'Date': [datetime.now().strftime("%Y-%m-%d %H:%M:%S")], + 'Total Runtime (seconds)': [total_runtime], + 'Python Version': [f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"], +}) +print(metadata) + +df_results.to_csv(f"{path}.csv", index=False) +metadata.to_csv(f"{path}_metadata.csv", index=False) From 6557a2ff776011d0bd372fea349fa1e0e2a49658 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Wed, 12 Mar 2025 16:28:50 +0100 Subject: [PATCH 02/60] add to coverage website --- doc/_website.yml | 1 + doc/did/did_multi.qmd | 108 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 doc/did/did_multi.qmd diff --git a/doc/_website.yml b/doc/_website.yml index 6dd3260..4beb151 100644 --- a/doc/_website.yml +++ b/doc/_website.yml @@ -25,6 +25,7 @@ website: - plm/pliv.qmd - text: "DID" menu: + - did/did_multi.qmd - did/did_pa.qmd - did/did_cs.qmd - text: "SSM" diff --git a/doc/did/did_multi.qmd b/doc/did/did_multi.qmd new file mode 100644 index 0000000..e2fc2ae --- /dev/null +++ b/doc/did/did_multi.qmd @@ -0,0 +1,108 @@ +--- +title: "DiD for Panel Data over Multiple Periods" + +jupyter: python3 +--- + +```{python} +#| echo: false + +import numpy as np +import pandas as pd +from itables import init_notebook_mode, show, options + +init_notebook_mode(all_interactive=True) + +def highlight_range(s, level=0.95, dist=0.05, props=''): + color_grid = np.where((s >= level-dist) & + (s <= level+dist), props, '') + return color_grid + + +def color_coverage(df, level): + # color coverage column order is important + styled_df = df.apply( + highlight_range, + level=level, + dist=1.0, + props='color:black;background-color:red', + subset=["Coverage", "Uniform Coverage"]) + styled_df = styled_df.apply( + highlight_range, + level=level, + dist=0.1, + props='color:black;background-color:yellow', + subset=["Coverage", "Uniform Coverage"]) + styled_df = styled_df.apply( + highlight_range, + level=level, + dist=0.05, + props='color:white;background-color:darkgreen', + subset=["Coverage", "Uniform Coverage"]) + + # set all coverage values to bold + styled_df = styled_df.set_properties( + **{'font-weight': 'bold'}, + subset=["Coverage", "Uniform Coverage"]) + return styled_df + + +def make_pretty(df, level, n_rep): + styled_df = df.style.hide(axis="index") + # Format only float columns + float_cols = df.select_dtypes(include=['float']).columns + styled_df = styled_df.format({col: "{:.3f}" for col in float_cols}) + + # color coverage column order is important + styled_df = color_coverage(styled_df, level) + caption = f"Coverage for {level*100}%-Confidence Interval over {n_rep} Repetitions" + + return show(styled_df, caption=caption) +``` + +## ATTE Coverage + +The simulations are based on the the [make_did_SZ2020](https://docs.doubleml.org/stable/api/generated/doubleml.datasets.make_did_SZ2020.html)-DGP with $1000$ observations. Learners are only set to boosting, due to time constraints (and the nonlinearity of some of the DGPs). + +::: {.callout-note title="Metadata" collapse="true"} + +```{python} +#| echo: false +metadata_file = '../../results/did/did_pa_multi_coverage_metadata.csv' +metadata_df = pd.read_csv(metadata_file) +print(metadata_df.T.to_string(header=False)) +``` + +::: + +```{python} +#| echo: false + +# set up data +df = pd.read_csv("../../results/did/did_pa_multi_coverage.csv", index_col=None) + +assert df["repetition"].nunique() == 1 +n_rep = df["repetition"].unique()[0] + +display_columns = ["Learner g", "Learner m", "DGP", "In-sample-norm.", "Bias", "CI Length", "Coverage", "Uniform CI Length", "Uniform Coverage"] +``` + +### Observational Score + +```{python} +#| echo: false +score = "observational" +level = 0.95 + +df_ate_95 = df[(df['level'] == level) & (df["Score"] == score)][display_columns] +make_pretty(df_ate_95, level, n_rep) +``` + +```{python} +#| echo: false +score = "observational" +level = 0.9 + +df_ate_9 = df[(df['level'] == level) & (df["Score"] == score)][display_columns] +make_pretty(df_ate_9, level, n_rep) +``` From 2184a709409f1a5e96dd66d56d2ed53936bcdbc2 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Mon, 17 Mar 2025 07:20:50 +0100 Subject: [PATCH 03/60] add option for None in did multi (ml_m) --- scripts/did/did_pa_multi_coverage.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/did/did_pa_multi_coverage.py b/scripts/did/did_pa_multi_coverage.py index c983f4e..667fafd 100644 --- a/scripts/did/did_pa_multi_coverage.py +++ b/scripts/did/did_pa_multi_coverage.py @@ -5,6 +5,7 @@ import sys from sklearn.linear_model import LinearRegression, LogisticRegression +from lightgbm import LGBMRegressor, LGBMClassifier import doubleml as dml from doubleml.did.datasets import make_did_CS2021 @@ -16,10 +17,10 @@ # DGP pars dgp_dict = {} -df_oracle = make_did_CS2021(n_obs=int(1e+6), dgp_type=1) +df_oracle = make_did_CS2021(n_obs=int(1e+6), dgp_type=1) # does not depend on the DGP type df_oracle["ite"] = df_oracle["y1"] - df_oracle["y0"] df_oracle_thetas = df_oracle.groupby(["d", "t"])["ite"].mean().reset_index() -# drop +# drop print(df_oracle_thetas) n_obs = 2000 @@ -27,7 +28,7 @@ # to get the best possible comparison between different learners (and settings) we first simulate all datasets np.random.seed(42) -dgp_types = [1] +dgp_types = [1, 2, 3, 4, 5, 6] n_dgps = len(dgp_types) datasets = [] for dgp_type in dgp_types: @@ -41,10 +42,12 @@ # set up hyperparameters hyperparam_dict = { "DGP": dgp_types, - "score": ["observational"], + "score": ["observational", "experimental"], "in sample normalization": [True, False], - "learner_g": [("Linear", LinearRegression()),], - "learner_m": [("Linear", LogisticRegression()),], + "learner_g": [("Linear", LinearRegression()), + ("LGBM", LGBMRegressor(n_estimators=300, learning_rate=0.05, verbose=-1)),], + "learner_m": [("Linear", LogisticRegression()), + ("LGBM", LGBMClassifier(n_estimators=300, learning_rate=0.05, verbose=-1))], "level": [0.95, 0.90] } From df7222da860c63cba3be4ca2bc0189135c70aa69 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Wed, 19 Mar 2025 07:52:28 +0100 Subject: [PATCH 04/60] updated did sim --- results/did/did_pa_multi_coverage.csv | 28 +++++- .../did/did_pa_multi_coverage_metadata.csv | 2 +- scripts/did/did_pa_multi_agg_coverage.py | 0 scripts/did/did_pa_multi_coverage.py | 96 ++++++++++++++----- 4 files changed, 98 insertions(+), 28 deletions(-) create mode 100644 scripts/did/did_pa_multi_agg_coverage.py diff --git a/results/did/did_pa_multi_coverage.csv b/results/did/did_pa_multi_coverage.csv index 6e5e19f..8276aac 100644 --- a/results/did/did_pa_multi_coverage.csv +++ b/results/did/did_pa_multi_coverage.csv @@ -1,5 +1,25 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -Linear,Linear,observational,False,1,0.9,0.9029166666666666,0.3186627096956461,0.07711696371410508,0.901,0.49537746791429166,1000 -Linear,Linear,observational,False,1,0.95,0.95125,0.3797100386232941,0.07711696371410508,0.95,0.5448416509948917,1000 -Linear,Linear,observational,True,1,0.9,0.9003333333333333,0.3167085369567106,0.07700388113671185,0.901,0.49287577992610865,1000 -Linear,Linear,observational,True,1,0.95,0.9498333333333334,0.37738149818350913,0.07700388113671185,0.948,0.541465330653648,1000 +Linear,Linear,experimental,False,1,0.9,0.8875,0.589658704307476,0.14271881238392356,0.85,0.9184713776325004,20 +Linear,Linear,experimental,False,1,0.95,0.9458333333333334,0.7026216829731943,0.14271881238392356,0.9,1.0088572704968817,20 +Linear,Linear,experimental,False,4,0.9,0.7041666666666667,2.0297642964886093,0.9047675553035617,0.55,2.9260160123442596,20 +Linear,Linear,experimental,False,4,0.95,0.7708333333333333,2.418613336188561,0.9047675553035617,0.65,3.265541044699371,20 +Linear,Linear,experimental,False,6,0.9,0.9375,1.9858835644872976,0.4370880265956636,0.9,2.8747704680291024,20 +Linear,Linear,experimental,False,6,0.95,0.975,2.3663262190076697,0.4370880265956636,0.9,3.2067165503022985,20 +Linear,Linear,experimental,True,1,0.9,0.9041666666666666,0.5893929319394263,0.1419165948760371,0.9,0.9179189354368003,20 +Linear,Linear,experimental,True,1,0.95,0.9458333333333334,0.7023049956638021,0.1419165948760371,0.9,1.0086412447991253,20 +Linear,Linear,experimental,True,4,0.9,0.7041666666666667,2.031873164323966,0.9059623323417508,0.6,2.943810800692373,20 +Linear,Linear,experimental,True,4,0.95,0.7833333333333333,2.4211262072050013,0.9059623323417508,0.6,3.2739360531515684,20 +Linear,Linear,experimental,True,6,0.9,0.9458333333333334,1.9877755956053036,0.4386853538456557,0.9,2.8801526124840118,20 +Linear,Linear,experimental,True,6,0.95,0.975,2.3685807131390373,0.4386853538456557,0.9,3.2111476829248415,20 +Linear,Linear,observational,False,1,0.9,0.9125,0.6827078489949769,0.15467502808332462,0.9,1.0590069349882765,20 +Linear,Linear,observational,False,1,0.95,0.9583333333333334,0.8134965774875249,0.15467502808332462,1.0,1.1738447754301748,20 +Linear,Linear,observational,False,4,0.9,0.8,2.7854153587870214,0.8355183226583197,0.7,4.0015833335633415,20 +Linear,Linear,observational,False,4,0.95,0.8416666666666666,3.3190271132668636,0.8355183226583197,0.8,4.483472762454467,20 +Linear,Linear,observational,False,6,0.9,0.9333333333333333,2.5337718344427866,0.5967437923241619,0.9,3.6412755250672886,20 +Linear,Linear,observational,False,6,0.95,0.9708333333333334,3.0191753595448407,0.5967437923241619,0.95,4.081839476947988,20 +Linear,Linear,observational,True,1,0.9,0.9041666666666666,0.6620805479575324,0.15571526121686724,0.85,1.0317138682400495,20 +Linear,Linear,observational,True,1,0.95,0.9541666666666666,0.7889176323040639,0.15571526121686724,0.95,1.1316182486711308,20 +Linear,Linear,observational,True,4,0.9,0.7916666666666667,2.631108576842307,0.8079463860509168,0.7,3.77565721661986,20 +Linear,Linear,observational,True,4,0.95,0.8416666666666666,3.1351592418487586,0.8079463860509168,0.75,4.24016752287414,20 +Linear,Linear,observational,True,6,0.9,0.9333333333333333,2.3368968698600474,0.5421819294976428,0.9,3.361076606239287,20 +Linear,Linear,observational,True,6,0.95,0.9791666666666666,2.784584369977626,0.5421819294976428,0.95,3.7810902213750666,20 diff --git a/results/did/did_pa_multi_coverage_metadata.csv b/results/did/did_pa_multi_coverage_metadata.csv index 5398bd1..0cb88dc 100644 --- a/results/did/did_pa_multi_coverage_metadata.csv +++ b/results/did/did_pa_multi_coverage_metadata.csv @@ -1,2 +1,2 @@ DoubleML Version,Script,Date,Total Runtime (seconds),Python Version -0.10.dev0,did_pa_multi_coverage.py,2025-03-12 16:23:08,1368.6782059669495,3.11.9 +0.10.dev0,did_pa_multi_coverage.py,2025-03-18 07:37:01,120.99546647071838,3.11.9 diff --git a/scripts/did/did_pa_multi_agg_coverage.py b/scripts/did/did_pa_multi_agg_coverage.py new file mode 100644 index 0000000..e69de29 diff --git a/scripts/did/did_pa_multi_coverage.py b/scripts/did/did_pa_multi_coverage.py index 667fafd..664bbf1 100644 --- a/scripts/did/did_pa_multi_coverage.py +++ b/scripts/did/did_pa_multi_coverage.py @@ -3,6 +3,7 @@ from datetime import datetime import time import sys +import warnings from sklearn.linear_model import LinearRegression, LogisticRegression from lightgbm import LGBMRegressor, LGBMClassifier @@ -10,49 +11,55 @@ import doubleml as dml from doubleml.did.datasets import make_did_CS2021 +# Suppress warnings +warnings.simplefilter(action='ignore', category=UserWarning) + # Number of repetitions -n_rep = 1000 +n_rep = 20 max_runtime = 5.5 * 3600 # 5.5 hours in seconds -# DGP pars -dgp_dict = {} - +# Oracle values df_oracle = make_did_CS2021(n_obs=int(1e+6), dgp_type=1) # does not depend on the DGP type df_oracle["ite"] = df_oracle["y1"] - df_oracle["y0"] df_oracle_thetas = df_oracle.groupby(["d", "t"])["ite"].mean().reset_index() -# drop +print("ATTs:") print(df_oracle_thetas) -n_obs = 2000 +df_oracle_post_treatment = df_oracle[df_oracle["t"] >= df_oracle["d"]] +# Group aggregation +df_oracle_agg_group = df_oracle_post_treatment.groupby("d")["ite"].mean() +print("Group aggregated ATTs:") +print(df_oracle_agg_group) -# to get the best possible comparison between different learners (and settings) we first simulate all datasets -np.random.seed(42) +# Time aggregation +df_oracle_agg_time = df_oracle_post_treatment.groupby("t")["ite"].mean() +print("Time aggregated ATTs:") +print(df_oracle_agg_time) -dgp_types = [1, 2, 3, 4, 5, 6] -n_dgps = len(dgp_types) -datasets = [] -for dgp_type in dgp_types: - datasets_dgp = [] - for i in range(n_rep): - data = make_did_CS2021(n_obs=n_obs, dgp_type=dgp_type) - datasets_dgp.append(data) - datasets.append(datasets_dgp) +# Eventstudy aggregation +df_oracle["e"] = pd.to_datetime(df_oracle["t"]).values.astype("datetime64[M]") - \ + pd.to_datetime(df_oracle["d"]).values.astype("datetime64[M]") +df_oracle_agg_eventstudy = df_oracle.groupby("e")["ite"].mean() +print("Event Study aggregated ATTs:") +print(df_oracle_agg_eventstudy) +# DGP pars +n_obs = 500 +dgp_types = [1, 4, 6] # set up hyperparameters hyperparam_dict = { "DGP": dgp_types, "score": ["observational", "experimental"], "in sample normalization": [True, False], - "learner_g": [("Linear", LinearRegression()), - ("LGBM", LGBMRegressor(n_estimators=300, learning_rate=0.05, verbose=-1)),], - "learner_m": [("Linear", LogisticRegression()), - ("LGBM", LGBMClassifier(n_estimators=300, learning_rate=0.05, verbose=-1))], + "learner_g": [("Linear", LinearRegression()),], + "learner_m": [("Linear", LogisticRegression()),], "level": [0.95, 0.90] } # set up the results dataframe df_results_detailed = pd.DataFrame() +df_results_agg = pd.DataFrame() # start simulation np.random.seed(42) @@ -69,8 +76,9 @@ for i_dgp, dgp_type in enumerate(dgp_types): # define the DoubleML data object + data = make_did_CS2021(n_obs=n_obs, dgp_type=dgp_type) obj_dml_data = dml.data.DoubleMLPanelData( - datasets[i_dgp][i_rep], + data, y_col="y", d_cols="d", id_col="id", @@ -104,7 +112,7 @@ # oracle values theta = np.full_like(dml_DiD.coef, np.nan) for i, (g, _, t) in enumerate(dml_DiD.gt_combinations): - group_index = df_oracle_thetas["d"] == g + group_index = df_oracle_thetas["d"] == g time_index = df_oracle_thetas["t"] == t theta[i] = df_oracle_thetas[group_index & time_index]["ite"].iloc[0] @@ -136,6 +144,37 @@ "level": level, "repetition": i_rep}, index=[0])), ignore_index=True) + + # group aggregation + group_agg = dml_DiD.aggregate(aggregation="group") + group_confint = group_agg.aggregated_frameworks.confint(level=level) + group_coverage = np.mean((group_confint.iloc[:, 0] < df_oracle_agg_group.values) & (df_oracle_agg_group.values < group_confint.iloc[:, 1])) + group_ci_length = np.mean(group_confint.iloc[:, 1] - group_confint.iloc[:, 0]) + group_bias = np.mean(abs(group_agg.aggregated_frameworks.thetas - df_oracle_agg_group.values)) + + group_agg.aggregated_frameworks.bootstrap(n_rep_boot=2000) + group_confint_uniform = group_agg.aggregated_frameworks.confint(level=level, joint=True) + group_coverage_uniform = all((group_confint_uniform.iloc[:, 0] < df_oracle_agg_group.values) & (df_oracle_agg_group.values < group_confint_uniform.iloc[:, 1])) + group_ci_length_uniform = np.mean(group_confint_uniform.iloc[:, 1] - group_confint_uniform.iloc[:, 0]) + + df_results_agg = pd.concat( + (df_results_agg, + pd.DataFrame({ + "Coverage": group_coverage, + "CI Length": group_ci_length, + "Bias": group_bias, + "Uniform Coverage": group_coverage_uniform, + "Uniform CI Length": group_ci_length_uniform, + "Learner g": learner_g_name, + "Learner m": learner_m_name, + "Score": score, + "In-sample-norm.": in_sample_normalization, + "DGP": dgp_type, + "level": level, + "repetition": i_rep}, index=[0]), + ), + ignore_index=True) + df_results = df_results_detailed.groupby( ["Learner g", "Learner m", "Score", "In-sample-norm.", "DGP", "level"]).agg( @@ -148,6 +187,17 @@ ).reset_index() print(df_results) +df_results_agg = df_results_agg.groupby( + ["Learner g", "Learner m", "Score", "In-sample-norm.", "DGP", "level"]).agg( + {"Coverage": "mean", + "CI Length": "mean", + "Bias": "mean", + "Uniform Coverage": "mean", + "Uniform CI Length": "mean", + "repetition": "count"} + ).reset_index() +print(df_results_agg) + end_time = time.time() total_runtime = end_time - start_time From 694d2e8c3ee6f2a5bea420412908cffe1596df3b Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Wed, 19 Mar 2025 09:51:24 +0100 Subject: [PATCH 05/60] add a basic simulation package --- monte-cover/.python-version | 1 + monte-cover/README.md | 0 monte-cover/pyproject.toml | 48 + monte-cover/src/montecover/__init__.py | 13 + monte-cover/src/montecover/base.py | 78 ++ monte-cover/src/montecover/did/__init__.py | 7 + monte-cover/src/montecover/did/did_multi.py | 231 ++++ monte-cover/uv.lock | 1112 +++++++++++++++++++ 8 files changed, 1490 insertions(+) create mode 100644 monte-cover/.python-version create mode 100644 monte-cover/README.md create mode 100644 monte-cover/pyproject.toml create mode 100644 monte-cover/src/montecover/__init__.py create mode 100644 monte-cover/src/montecover/base.py create mode 100644 monte-cover/src/montecover/did/__init__.py create mode 100644 monte-cover/src/montecover/did/did_multi.py create mode 100644 monte-cover/uv.lock diff --git a/monte-cover/.python-version b/monte-cover/.python-version new file mode 100644 index 0000000..e4fba21 --- /dev/null +++ b/monte-cover/.python-version @@ -0,0 +1 @@ +3.12 diff --git a/monte-cover/README.md b/monte-cover/README.md new file mode 100644 index 0000000..e69de29 diff --git a/monte-cover/pyproject.toml b/monte-cover/pyproject.toml new file mode 100644 index 0000000..6aee923 --- /dev/null +++ b/monte-cover/pyproject.toml @@ -0,0 +1,48 @@ +[project] +name = "montecover" +version = "0.1.0" +description = "A Monte Carlo coverage simulation package" +readme = "README.md" +authors = [ + { name = "SvenKlaassen", email = "sven.klaassen@uni-hamburg.de" } +] +requires-python = ">=3.12" +dependencies = [ + "black>=25.1.0", + "doubleml[rdd]>=0.9.3", + "ipykernel>=6.29.5", + "itables>=2.2.5", + "joblib>=1.4.2", + "lightgbm>=4.6.0", + "numpy>=2.2.4", + "pandas>=2.2.3", + "ruff>=0.11.0", + "scikit-learn>=1.5.2", +] + +[project.scripts] +monte-cover = "montecover:main" + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.black] +line-length = 127 +target-version = ['py311', 'py312'] +preview = true + +[tool.ruff] +# max line length for black +line-length = 127 +target-version = "py312" + + +[tool.ruff.lint] +# all rules can be found here: https://beta.ruff.rs/docs/rules/ +select = ["E", "F", "W", "I"] +ignore = [ + # Use `is` and `is not` for type comparisons, or `isinstance()` for + # isinstance checks + "E721", +] diff --git a/monte-cover/src/montecover/__init__.py b/monte-cover/src/montecover/__init__.py new file mode 100644 index 0000000..e8b95c2 --- /dev/null +++ b/monte-cover/src/montecover/__init__.py @@ -0,0 +1,13 @@ +"""Monte Carlo coverage simulation package for statistical methods.""" + +from importlib.metadata import version + +__version__ = version("montecover") + +from .base import BaseSimulation + +__all__ = ["BaseSimulation"] + + +def main() -> None: + print("Hello from monte-cover!") diff --git a/monte-cover/src/montecover/base.py b/monte-cover/src/montecover/base.py new file mode 100644 index 0000000..a07d2a1 --- /dev/null +++ b/monte-cover/src/montecover/base.py @@ -0,0 +1,78 @@ +import time +import warnings +from abc import ABC, abstractmethod +from typing import Any, Dict, List + +from itertools import product +import numpy as np + + +class BaseSimulation(ABC): + """Abstract base class for simulation studies.""" + + def __init__( + self, + n_rep: int = 20, + max_runtime: float = 5.5 * 3600, + random_seed: int = 42, + output_path: str = "results", + suppress_warnings: bool = True, + ): + self.n_rep = n_rep + self.max_runtime = max_runtime + self.random_seed = random_seed + self.output_path = output_path + self.suppress_warnings = suppress_warnings + + # Results storage + self.results = [] + self.aggregated_results = None + + # Timing + self.start_time = None + self.end_time = None + self.total_runtime = None + + # Set up environment + if suppress_warnings: + warnings.simplefilter(action="ignore", category=UserWarning) + + np.random.seed(self.random_seed) + + @abstractmethod + def setup_parameters(self) -> Dict[str, List[Any]]: + """Define simulation parameters.""" + pass + + @abstractmethod + def run_single_rep(self, rep_idx: int, params: Dict[str, Any]) -> Dict[str, Any]: + """Run a single repetition with the given parameters.""" + pass + + def run_simulation(self): + """Run the full simulation.""" + self.start_time = time.time() + param_grid = self.setup_parameters() + + # Loop through repetitions + for i_rep in range(self.n_rep): + print(f"Repetition: {i_rep + 1}/{self.n_rep}", end="\r") + + # Check elapsed time + elapsed_time = time.time() - self.start_time + if elapsed_time > self.max_runtime: + print("Maximum runtime exceeded. Stopping the simulation.") + break + + keys = param_grid.keys() + for values in product(*param_grid.values()): + params = dict(zip(keys, values)) + result = self.run_single_rep(i_rep, params) + if result is not None: + result["repetition"] = i_rep + self.results.append(result) + + self.end_time = time.time() + self.total_runtime = self.end_time - self.start_time + + # Add other methods here... diff --git a/monte-cover/src/montecover/did/__init__.py b/monte-cover/src/montecover/did/__init__.py new file mode 100644 index 0000000..31d65c5 --- /dev/null +++ b/monte-cover/src/montecover/did/__init__.py @@ -0,0 +1,7 @@ +"""Monte Carlo coverage simulations for DiD.""" + + +from montecover.did.did_multi import DIDMultiCoverageSimulation + + +__all__ = ["DIDMultiCoverageSimulation"] \ No newline at end of file diff --git a/monte-cover/src/montecover/did/did_multi.py b/monte-cover/src/montecover/did/did_multi.py new file mode 100644 index 0000000..513073e --- /dev/null +++ b/monte-cover/src/montecover/did/did_multi.py @@ -0,0 +1,231 @@ +import numpy as np +import pandas as pd +from datetime import datetime +import sys +from typing import Dict, List, Any, Tuple + +from sklearn.linear_model import LinearRegression, LogisticRegression + +import doubleml as dml +from doubleml.did.datasets import make_did_CS2021 + +from montecover.base import BaseSimulation + +class DIDMultiCoverageSimulation(BaseSimulation): + """Simulation study for coverage properties of DoubleMLDIDMulti.""" + + def __init__( + self, + n_rep: int = 20, + n_obs: int = 500, + max_runtime: float = 5.5 * 3600, + random_seed: int = 42, + output_path: str = "results/did/did_pa_multi_coverage", + suppress_warnings: bool = True, + ): + super().__init__( + n_rep=n_rep, + max_runtime=max_runtime, + random_seed=random_seed, + output_path=output_path, + suppress_warnings=suppress_warnings, + ) + self.n_obs = n_obs + + # Calculate oracle values + self._calculate_oracle_values() + + # Additional results storage for aggregated results + self.results_aggregated = [] + + def _calculate_oracle_values(self): + """Calculate oracle values for the simulation.""" + # Oracle values + df_oracle = make_did_CS2021(n_obs=int(1e+6), dgp_type=1) # does not depend on the DGP type + df_oracle["ite"] = df_oracle["y1"] - df_oracle["y0"] + self.oracle_thetas = df_oracle.groupby(["d", "t"])["ite"].mean().reset_index() + print("ATTs:") + print(self.oracle_thetas) + + # Oracle group aggregation + df_oracle_post_treatment = df_oracle[df_oracle["t"] >= df_oracle["d"]] + self.oracle_agg_group = df_oracle_post_treatment.groupby("d")["ite"].mean() + print("Group aggregated ATTs:") + print(self.oracle_agg_group) + + # Oracle time aggregation + self.oracle_agg_time = df_oracle_post_treatment.groupby("t")["ite"].mean() + print("Time aggregated ATTs:") + print(self.oracle_agg_time) + + # Oracle eventstudy aggregation + df_oracle["e"] = pd.to_datetime(df_oracle["t"]).values.astype("datetime64[M]") - \ + pd.to_datetime(df_oracle["d"]).values.astype("datetime64[M]") + self.oracle_agg_eventstudy = df_oracle.groupby("e")["ite"].mean() + print("Event Study aggregated ATTs:") + print(self.oracle_agg_eventstudy) + + def setup_parameters(self) -> Dict[str, List[Any]]: + """Define simulation parameters.""" + return { + "DGP": [1, 4, 6], + "score": ["observational", "experimental"], + "in_sample_normalization": [True, False], + "learner_g": [("Linear", LinearRegression())], + "learner_m": [("Linear", LogisticRegression())], + "level": [0.95, 0.90] + } + + def run_single_rep(self, rep_idx: int, params: Dict[str, Any]) -> Dict[str, Any]: + """Run a single repetition with the given parameters.""" + # Extract parameters + dgp_type = params["DGP"] + score = params["score"] + in_sample_normalization = params["in_sample_normalization"] + learner_g_name, ml_g = params["learner_g"] + learner_m_name, ml_m = params["learner_m"] + level = params["level"] + + # Generate data + data = make_did_CS2021(n_obs=self.n_obs, dgp_type=dgp_type) + obj_dml_data = dml.data.DoubleMLPanelData( + data, + y_col="y", + d_cols="d", + id_col="id", + t_col="t", + x_cols=["Z1", "Z2", "Z3", "Z4"], + ) + + # Fit model + if score == "experimental": + dml_DiD = dml.did.DoubleMLDIDMulti( + obj_dml_data=obj_dml_data, + ml_g=ml_g, + ml_m=None, + gt_combinations="standard", + score=score, + in_sample_normalization=in_sample_normalization) + else: + dml_DiD = dml.did.DoubleMLDIDMulti( + obj_dml_data=obj_dml_data, + ml_g=ml_g, + ml_m=ml_m, + gt_combinations="standard", + score=score, + in_sample_normalization=in_sample_normalization) + + # Fit the model + dml_DiD.fit(n_jobs_cv=5) + + # Oracle values for this model + theta = np.full_like(dml_DiD.coef, np.nan) + for i, (g, _, t) in enumerate(dml_DiD.gt_combinations): + group_index = self.oracle_thetas["d"] == g + time_index = self.oracle_thetas["t"] == t + theta[i] = self.oracle_thetas[group_index & time_index]["ite"].iloc[0] + + # Confidence intervals and metrics + confint = dml_DiD.confint(level=level) + coverage = np.mean((confint.iloc[:, 0] < theta) & (theta < confint.iloc[:, 1])) + ci_length = np.mean(confint.iloc[:, 1] - confint.iloc[:, 0]) + bias = np.mean(abs(dml_DiD.coef - theta)) + + # Bootstrap for uniform confidence intervals + dml_DiD.bootstrap(n_rep_boot=2000) + confint_uniform = dml_DiD.confint(level=level, joint=True) + + coverage_uniform = all((confint_uniform.iloc[:, 0] < theta) & (theta < confint_uniform.iloc[:, 1])) + ci_length_uniform = np.mean(confint_uniform.iloc[:, 1] - confint_uniform.iloc[:, 0]) + + # Detailed results + result_detailed = { + "Coverage": coverage, + "CI Length": ci_length, + "Bias": bias, + "Uniform Coverage": coverage_uniform, + "Uniform CI Length": ci_length_uniform, + "Learner g": learner_g_name, + "Learner m": learner_m_name, + "Score": score, + "In-sample-norm.": in_sample_normalization, + "DGP": dgp_type, + "level": level, + } + + # Group aggregation + group_agg = dml_DiD.aggregate(aggregation="group") + group_confint = group_agg.aggregated_frameworks.confint(level=level) + group_coverage = np.mean((group_confint.iloc[:, 0] < self.oracle_agg_group.values) & + (self.oracle_agg_group.values < group_confint.iloc[:, 1])) + group_ci_length = np.mean(group_confint.iloc[:, 1] - group_confint.iloc[:, 0]) + group_bias = np.mean(abs(group_agg.aggregated_frameworks.thetas - self.oracle_agg_group.values)) + + group_agg.aggregated_frameworks.bootstrap(n_rep_boot=2000) + group_confint_uniform = group_agg.aggregated_frameworks.confint(level=level, joint=True) + group_coverage_uniform = all((group_confint_uniform.iloc[:, 0] < self.oracle_agg_group.values) & + (self.oracle_agg_group.values < group_confint_uniform.iloc[:, 1])) + group_ci_length_uniform = np.mean(group_confint_uniform.iloc[:, 1] - group_confint_uniform.iloc[:, 0]) + + # Aggregated results + result_aggregated = { + "Coverage": group_coverage, + "CI Length": group_ci_length, + "Bias": group_bias, + "Uniform Coverage": group_coverage_uniform, + "Uniform CI Length": group_ci_length_uniform, + "Learner g": learner_g_name, + "Learner m": learner_m_name, + "Score": score, + "In-sample-norm.": in_sample_normalization, + "DGP": dgp_type, + "level": level, + } + + # Store aggregated results + self.results_aggregated.append(result_aggregated) + + return result_detailed + + def summarize_results(self): + """Summarize results and save to CSV.""" + df_results_detailed = pd.DataFrame(self.results) + df_results_aggregated = pd.DataFrame(self.results_aggregated) + + # Aggregate results by parameters + df_summary_detailed = df_results_detailed.groupby( + ["Learner g", "Learner m", "Score", "In-sample-norm.", "DGP", "level"] + ).agg({ + "Coverage": "mean", + "CI Length": "mean", + "Bias": "mean", + "Uniform Coverage": "mean", + "Uniform CI Length": "mean", + "repetition": "count" + }).reset_index() + + df_summary_aggregated = df_results_aggregated.groupby( + ["Learner g", "Learner m", "Score", "In-sample-norm.", "DGP", "level"] + ).agg({ + "Coverage": "mean", + "CI Length": "mean", + "Bias": "mean", + "Uniform Coverage": "mean", + "Uniform CI Length": "mean", + "repetition": "count" + }).reset_index() + + # Save results + metadata = pd.DataFrame({ + 'DoubleML Version': [dml.__version__], + 'Script': ['DIDMultiCoverageSimulation'], + 'Date': [datetime.now().strftime("%Y-%m-%d %H:%M:%S")], + 'Total Runtime (seconds)': [self.total_runtime], + 'Python Version': [f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"], + }) + + df_summary_detailed.to_csv(f"{self.output_path}.csv", index=False) + df_summary_aggregated.to_csv(f"{self.output_path}_aggregated.csv", index=False) + metadata.to_csv(f"{self.output_path}_metadata.csv", index=False) + + return df_summary_detailed, df_summary_aggregated, metadata \ No newline at end of file diff --git a/monte-cover/uv.lock b/monte-cover/uv.lock new file mode 100644 index 0000000..eed1b7c --- /dev/null +++ b/monte-cover/uv.lock @@ -0,0 +1,1112 @@ +version = 1 +revision = 1 +requires-python = ">=3.12" + +[[package]] +name = "appnope" +version = "0.1.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/35/5d/752690df9ef5b76e169e68d6a129fa6d08a7100ca7f754c89495db3c6019/appnope-0.1.4.tar.gz", hash = "sha256:1de3860566df9caf38f01f86f65e0e13e379af54f9e4bee1e66b48f2efffd1ee", size = 4170 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/81/29/5ecc3a15d5a33e31b26c11426c45c501e439cb865d0bff96315d86443b78/appnope-0.1.4-py2.py3-none-any.whl", hash = "sha256:502575ee11cd7a28c0205f379b525beefebab9d161b7c964670864014ed7213c", size = 4321 }, +] + +[[package]] +name = "asttokens" +version = "3.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/4a/e7/82da0a03e7ba5141f05cce0d302e6eed121ae055e0456ca228bf693984bc/asttokens-3.0.0.tar.gz", hash = "sha256:0dcd8baa8d62b0c1d118b399b2ddba3c4aff271d0d7a9e0d4c1681c79035bbc7", size = 61978 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/25/8a/c46dcc25341b5bce5472c718902eb3d38600a903b14fa6aeecef3f21a46f/asttokens-3.0.0-py3-none-any.whl", hash = "sha256:e3078351a059199dd5138cb1c706e6430c05eff2ff136af5eb4790f9d28932e2", size = 26918 }, +] + +[[package]] +name = "black" +version = "25.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, + { name = "mypy-extensions" }, + { name = "packaging" }, + { name = "pathspec" }, + { name = "platformdirs" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/94/49/26a7b0f3f35da4b5a65f081943b7bcd22d7002f5f0fb8098ec1ff21cb6ef/black-25.1.0.tar.gz", hash = "sha256:33496d5cd1222ad73391352b4ae8da15253c5de89b93a80b3e2c8d9a19ec2666", size = 649449 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/83/71/3fe4741df7adf015ad8dfa082dd36c94ca86bb21f25608eb247b4afb15b2/black-25.1.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4b60580e829091e6f9238c848ea6750efed72140b91b048770b64e74fe04908b", size = 1650988 }, + { url = "https://files.pythonhosted.org/packages/13/f3/89aac8a83d73937ccd39bbe8fc6ac8860c11cfa0af5b1c96d081facac844/black-25.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1e2978f6df243b155ef5fa7e558a43037c3079093ed5d10fd84c43900f2d8ecc", size = 1453985 }, + { url = "https://files.pythonhosted.org/packages/6f/22/b99efca33f1f3a1d2552c714b1e1b5ae92efac6c43e790ad539a163d1754/black-25.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3b48735872ec535027d979e8dcb20bf4f70b5ac75a8ea99f127c106a7d7aba9f", size = 1783816 }, + { url = "https://files.pythonhosted.org/packages/18/7e/a27c3ad3822b6f2e0e00d63d58ff6299a99a5b3aee69fa77cd4b0076b261/black-25.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:ea0213189960bda9cf99be5b8c8ce66bb054af5e9e861249cd23471bd7b0b3ba", size = 1440860 }, + { url = "https://files.pythonhosted.org/packages/98/87/0edf98916640efa5d0696e1abb0a8357b52e69e82322628f25bf14d263d1/black-25.1.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8f0b18a02996a836cc9c9c78e5babec10930862827b1b724ddfe98ccf2f2fe4f", size = 1650673 }, + { url = "https://files.pythonhosted.org/packages/52/e5/f7bf17207cf87fa6e9b676576749c6b6ed0d70f179a3d812c997870291c3/black-25.1.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:afebb7098bfbc70037a053b91ae8437c3857482d3a690fefc03e9ff7aa9a5fd3", size = 1453190 }, + { url = "https://files.pythonhosted.org/packages/e3/ee/adda3d46d4a9120772fae6de454c8495603c37c4c3b9c60f25b1ab6401fe/black-25.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:030b9759066a4ee5e5aca28c3c77f9c64789cdd4de8ac1df642c40b708be6171", size = 1782926 }, + { url = "https://files.pythonhosted.org/packages/cc/64/94eb5f45dcb997d2082f097a3944cfc7fe87e071907f677e80788a2d7b7a/black-25.1.0-cp313-cp313-win_amd64.whl", hash = "sha256:a22f402b410566e2d1c950708c77ebf5ebd5d0d88a6a2e87c86d9fb48afa0d18", size = 1442613 }, + { url = "https://files.pythonhosted.org/packages/09/71/54e999902aed72baf26bca0d50781b01838251a462612966e9fc4891eadd/black-25.1.0-py3-none-any.whl", hash = "sha256:95e8176dae143ba9097f351d174fdaf0ccd29efb414b362ae3fd72bf0f710717", size = 207646 }, +] + +[[package]] +name = "cffi" +version = "1.17.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pycparser" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz", hash = "sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824", size = 516621 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5a/84/e94227139ee5fb4d600a7a4927f322e1d4aea6fdc50bd3fca8493caba23f/cffi-1.17.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:805b4371bf7197c329fcb3ead37e710d1bca9da5d583f5073b799d5c5bd1eee4", size = 183178 }, + { url = "https://files.pythonhosted.org/packages/da/ee/fb72c2b48656111c4ef27f0f91da355e130a923473bf5ee75c5643d00cca/cffi-1.17.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:733e99bc2df47476e3848417c5a4540522f234dfd4ef3ab7fafdf555b082ec0c", size = 178840 }, + { url = "https://files.pythonhosted.org/packages/cc/b6/db007700f67d151abadf508cbfd6a1884f57eab90b1bb985c4c8c02b0f28/cffi-1.17.1-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1257bdabf294dceb59f5e70c64a3e2f462c30c7ad68092d01bbbfb1c16b1ba36", size = 454803 }, + { url = "https://files.pythonhosted.org/packages/1a/df/f8d151540d8c200eb1c6fba8cd0dfd40904f1b0682ea705c36e6c2e97ab3/cffi-1.17.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da95af8214998d77a98cc14e3a3bd00aa191526343078b530ceb0bd710fb48a5", size = 478850 }, + { url = "https://files.pythonhosted.org/packages/28/c0/b31116332a547fd2677ae5b78a2ef662dfc8023d67f41b2a83f7c2aa78b1/cffi-1.17.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d63afe322132c194cf832bfec0dc69a99fb9bb6bbd550f161a49e9e855cc78ff", size = 485729 }, + { url = "https://files.pythonhosted.org/packages/91/2b/9a1ddfa5c7f13cab007a2c9cc295b70fbbda7cb10a286aa6810338e60ea1/cffi-1.17.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f79fc4fc25f1c8698ff97788206bb3c2598949bfe0fef03d299eb1b5356ada99", size = 471256 }, + { url = "https://files.pythonhosted.org/packages/b2/d5/da47df7004cb17e4955df6a43d14b3b4ae77737dff8bf7f8f333196717bf/cffi-1.17.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b62ce867176a75d03a665bad002af8e6d54644fad99a3c70905c543130e39d93", size = 479424 }, + { url = "https://files.pythonhosted.org/packages/0b/ac/2a28bcf513e93a219c8a4e8e125534f4f6db03e3179ba1c45e949b76212c/cffi-1.17.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:386c8bf53c502fff58903061338ce4f4950cbdcb23e2902d86c0f722b786bbe3", size = 484568 }, + { url = "https://files.pythonhosted.org/packages/d4/38/ca8a4f639065f14ae0f1d9751e70447a261f1a30fa7547a828ae08142465/cffi-1.17.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4ceb10419a9adf4460ea14cfd6bc43d08701f0835e979bf821052f1805850fe8", size = 488736 }, + { url = "https://files.pythonhosted.org/packages/86/c5/28b2d6f799ec0bdecf44dced2ec5ed43e0eb63097b0f58c293583b406582/cffi-1.17.1-cp312-cp312-win32.whl", hash = "sha256:a08d7e755f8ed21095a310a693525137cfe756ce62d066e53f502a83dc550f65", size = 172448 }, + { url = "https://files.pythonhosted.org/packages/50/b9/db34c4755a7bd1cb2d1603ac3863f22bcecbd1ba29e5ee841a4bc510b294/cffi-1.17.1-cp312-cp312-win_amd64.whl", hash = "sha256:51392eae71afec0d0c8fb1a53b204dbb3bcabcb3c9b807eedf3e1e6ccf2de903", size = 181976 }, + { url = "https://files.pythonhosted.org/packages/8d/f8/dd6c246b148639254dad4d6803eb6a54e8c85c6e11ec9df2cffa87571dbe/cffi-1.17.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f3a2b4222ce6b60e2e8b337bb9596923045681d71e5a082783484d845390938e", size = 182989 }, + { url = "https://files.pythonhosted.org/packages/8b/f1/672d303ddf17c24fc83afd712316fda78dc6fce1cd53011b839483e1ecc8/cffi-1.17.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0984a4925a435b1da406122d4d7968dd861c1385afe3b45ba82b750f229811e2", size = 178802 }, + { url = "https://files.pythonhosted.org/packages/0e/2d/eab2e858a91fdff70533cab61dcff4a1f55ec60425832ddfdc9cd36bc8af/cffi-1.17.1-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d01b12eeeb4427d3110de311e1774046ad344f5b1a7403101878976ecd7a10f3", size = 454792 }, + { url = "https://files.pythonhosted.org/packages/75/b2/fbaec7c4455c604e29388d55599b99ebcc250a60050610fadde58932b7ee/cffi-1.17.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:706510fe141c86a69c8ddc029c7910003a17353970cff3b904ff0686a5927683", size = 478893 }, + { url = "https://files.pythonhosted.org/packages/4f/b7/6e4a2162178bf1935c336d4da8a9352cccab4d3a5d7914065490f08c0690/cffi-1.17.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:de55b766c7aa2e2a3092c51e0483d700341182f08e67c63630d5b6f200bb28e5", size = 485810 }, + { url = "https://files.pythonhosted.org/packages/c7/8a/1d0e4a9c26e54746dc08c2c6c037889124d4f59dffd853a659fa545f1b40/cffi-1.17.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c59d6e989d07460165cc5ad3c61f9fd8f1b4796eacbd81cee78957842b834af4", size = 471200 }, + { url = "https://files.pythonhosted.org/packages/26/9f/1aab65a6c0db35f43c4d1b4f580e8df53914310afc10ae0397d29d697af4/cffi-1.17.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd398dbc6773384a17fe0d3e7eeb8d1a21c2200473ee6806bb5e6a8e62bb73dd", size = 479447 }, + { url = "https://files.pythonhosted.org/packages/5f/e4/fb8b3dd8dc0e98edf1135ff067ae070bb32ef9d509d6cb0f538cd6f7483f/cffi-1.17.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:3edc8d958eb099c634dace3c7e16560ae474aa3803a5df240542b305d14e14ed", size = 484358 }, + { url = "https://files.pythonhosted.org/packages/f1/47/d7145bf2dc04684935d57d67dff9d6d795b2ba2796806bb109864be3a151/cffi-1.17.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:72e72408cad3d5419375fc87d289076ee319835bdfa2caad331e377589aebba9", size = 488469 }, + { url = "https://files.pythonhosted.org/packages/bf/ee/f94057fa6426481d663b88637a9a10e859e492c73d0384514a17d78ee205/cffi-1.17.1-cp313-cp313-win32.whl", hash = "sha256:e03eab0a8677fa80d646b5ddece1cbeaf556c313dcfac435ba11f107ba117b5d", size = 172475 }, + { url = "https://files.pythonhosted.org/packages/7c/fc/6a8cb64e5f0324877d503c854da15d76c1e50eb722e320b15345c4d0c6de/cffi-1.17.1-cp313-cp313-win_amd64.whl", hash = "sha256:f6a16c31041f09ead72d69f583767292f750d24913dadacf5756b966aacb3f1a", size = 182009 }, +] + +[[package]] +name = "click" +version = "8.1.8" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a", size = 226593 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7e/d4/7ebdbd03970677812aac39c869717059dbb71a4cfc033ca6e5221787892c/click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2", size = 98188 }, +] + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335 }, +] + +[[package]] +name = "comm" +version = "0.2.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "traitlets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e9/a8/fb783cb0abe2b5fded9f55e5703015cdf1c9c85b3669087c538dd15a6a86/comm-0.2.2.tar.gz", hash = "sha256:3fd7a84065306e07bea1773df6eb8282de51ba82f77c72f9c85716ab11fe980e", size = 6210 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e6/75/49e5bfe642f71f272236b5b2d2691cf915a7283cc0ceda56357b61daa538/comm-0.2.2-py3-none-any.whl", hash = "sha256:e6fb86cb70ff661ee8c9c14e7d36d6de3b4066f1441be4063df9c5009f0a64d3", size = 7180 }, +] + +[[package]] +name = "contourpy" +version = "1.3.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/25/c2/fc7193cc5383637ff390a712e88e4ded0452c9fbcf84abe3de5ea3df1866/contourpy-1.3.1.tar.gz", hash = "sha256:dfd97abd83335045a913e3bcc4a09c0ceadbe66580cf573fe961f4a825efa699", size = 13465753 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/37/6b/175f60227d3e7f5f1549fcb374592be311293132207e451c3d7c654c25fb/contourpy-1.3.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:0ffa84be8e0bd33410b17189f7164c3589c229ce5db85798076a3fa136d0e509", size = 271494 }, + { url = "https://files.pythonhosted.org/packages/6b/6a/7833cfae2c1e63d1d8875a50fd23371394f540ce809d7383550681a1fa64/contourpy-1.3.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:805617228ba7e2cbbfb6c503858e626ab528ac2a32a04a2fe88ffaf6b02c32bc", size = 255444 }, + { url = "https://files.pythonhosted.org/packages/7f/b3/7859efce66eaca5c14ba7619791b084ed02d868d76b928ff56890d2d059d/contourpy-1.3.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ade08d343436a94e633db932e7e8407fe7de8083967962b46bdfc1b0ced39454", size = 307628 }, + { url = "https://files.pythonhosted.org/packages/48/b2/011415f5e3f0a50b1e285a0bf78eb5d92a4df000553570f0851b6e309076/contourpy-1.3.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:47734d7073fb4590b4a40122b35917cd77be5722d80683b249dac1de266aac80", size = 347271 }, + { url = "https://files.pythonhosted.org/packages/84/7d/ef19b1db0f45b151ac78c65127235239a8cf21a59d1ce8507ce03e89a30b/contourpy-1.3.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2ba94a401342fc0f8b948e57d977557fbf4d515f03c67682dd5c6191cb2d16ec", size = 318906 }, + { url = "https://files.pythonhosted.org/packages/ba/99/6794142b90b853a9155316c8f470d2e4821fe6f086b03e372aca848227dd/contourpy-1.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:efa874e87e4a647fd2e4f514d5e91c7d493697127beb95e77d2f7561f6905bd9", size = 323622 }, + { url = "https://files.pythonhosted.org/packages/3c/0f/37d2c84a900cd8eb54e105f4fa9aebd275e14e266736778bb5dccbf3bbbb/contourpy-1.3.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1bf98051f1045b15c87868dbaea84f92408337d4f81d0e449ee41920ea121d3b", size = 1266699 }, + { url = "https://files.pythonhosted.org/packages/3a/8a/deb5e11dc7d9cc8f0f9c8b29d4f062203f3af230ba83c30a6b161a6effc9/contourpy-1.3.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:61332c87493b00091423e747ea78200659dc09bdf7fd69edd5e98cef5d3e9a8d", size = 1326395 }, + { url = "https://files.pythonhosted.org/packages/1a/35/7e267ae7c13aaf12322ccc493531f1e7f2eb8fba2927b9d7a05ff615df7a/contourpy-1.3.1-cp312-cp312-win32.whl", hash = "sha256:e914a8cb05ce5c809dd0fe350cfbb4e881bde5e2a38dc04e3afe1b3e58bd158e", size = 175354 }, + { url = "https://files.pythonhosted.org/packages/a1/35/c2de8823211d07e8a79ab018ef03960716c5dff6f4d5bff5af87fd682992/contourpy-1.3.1-cp312-cp312-win_amd64.whl", hash = "sha256:08d9d449a61cf53033612cb368f3a1b26cd7835d9b8cd326647efe43bca7568d", size = 220971 }, + { url = "https://files.pythonhosted.org/packages/9a/e7/de62050dce687c5e96f946a93546910bc67e483fe05324439e329ff36105/contourpy-1.3.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a761d9ccfc5e2ecd1bf05534eda382aa14c3e4f9205ba5b1684ecfe400716ef2", size = 271548 }, + { url = "https://files.pythonhosted.org/packages/78/4d/c2a09ae014ae984c6bdd29c11e74d3121b25eaa117eca0bb76340efd7e1c/contourpy-1.3.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:523a8ee12edfa36f6d2a49407f705a6ef4c5098de4f498619787e272de93f2d5", size = 255576 }, + { url = "https://files.pythonhosted.org/packages/ab/8a/915380ee96a5638bda80cd061ccb8e666bfdccea38d5741cb69e6dbd61fc/contourpy-1.3.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece6df05e2c41bd46776fbc712e0996f7c94e0d0543af1656956d150c4ca7c81", size = 306635 }, + { url = "https://files.pythonhosted.org/packages/29/5c/c83ce09375428298acd4e6582aeb68b1e0d1447f877fa993d9bf6cd3b0a0/contourpy-1.3.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:573abb30e0e05bf31ed067d2f82500ecfdaec15627a59d63ea2d95714790f5c2", size = 345925 }, + { url = "https://files.pythonhosted.org/packages/29/63/5b52f4a15e80c66c8078a641a3bfacd6e07106835682454647aca1afc852/contourpy-1.3.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a9fa36448e6a3a1a9a2ba23c02012c43ed88905ec80163f2ffe2421c7192a5d7", size = 318000 }, + { url = "https://files.pythonhosted.org/packages/9a/e2/30ca086c692691129849198659bf0556d72a757fe2769eb9620a27169296/contourpy-1.3.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ea9924d28fc5586bf0b42d15f590b10c224117e74409dd7a0be3b62b74a501c", size = 322689 }, + { url = "https://files.pythonhosted.org/packages/6b/77/f37812ef700f1f185d348394debf33f22d531e714cf6a35d13d68a7003c7/contourpy-1.3.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:5b75aa69cb4d6f137b36f7eb2ace9280cfb60c55dc5f61c731fdf6f037f958a3", size = 1268413 }, + { url = "https://files.pythonhosted.org/packages/3f/6d/ce84e79cdd128542ebeb268f84abb4b093af78e7f8ec504676673d2675bc/contourpy-1.3.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:041b640d4ec01922083645a94bb3b2e777e6b626788f4095cf21abbe266413c1", size = 1326530 }, + { url = "https://files.pythonhosted.org/packages/72/22/8282f4eae20c73c89bee7a82a19c4e27af9b57bb602ecaa00713d5bdb54d/contourpy-1.3.1-cp313-cp313-win32.whl", hash = "sha256:36987a15e8ace5f58d4d5da9dca82d498c2bbb28dff6e5d04fbfcc35a9cb3a82", size = 175315 }, + { url = "https://files.pythonhosted.org/packages/e3/d5/28bca491f65312b438fbf076589dcde7f6f966b196d900777f5811b9c4e2/contourpy-1.3.1-cp313-cp313-win_amd64.whl", hash = "sha256:a7895f46d47671fa7ceec40f31fae721da51ad34bdca0bee83e38870b1f47ffd", size = 220987 }, + { url = "https://files.pythonhosted.org/packages/2f/24/a4b285d6adaaf9746e4700932f579f1a7b6f9681109f694cfa233ae75c4e/contourpy-1.3.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:9ddeb796389dadcd884c7eb07bd14ef12408aaae358f0e2ae24114d797eede30", size = 285001 }, + { url = "https://files.pythonhosted.org/packages/48/1d/fb49a401b5ca4f06ccf467cd6c4f1fd65767e63c21322b29b04ec40b40b9/contourpy-1.3.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:19c1555a6801c2f084c7ddc1c6e11f02eb6a6016ca1318dd5452ba3f613a1751", size = 268553 }, + { url = "https://files.pythonhosted.org/packages/79/1e/4aef9470d13fd029087388fae750dccb49a50c012a6c8d1d634295caa644/contourpy-1.3.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:841ad858cff65c2c04bf93875e384ccb82b654574a6d7f30453a04f04af71342", size = 310386 }, + { url = "https://files.pythonhosted.org/packages/b0/34/910dc706ed70153b60392b5305c708c9810d425bde12499c9184a1100888/contourpy-1.3.1-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4318af1c925fb9a4fb190559ef3eec206845f63e80fb603d47f2d6d67683901c", size = 349806 }, + { url = "https://files.pythonhosted.org/packages/31/3c/faee6a40d66d7f2a87f7102236bf4780c57990dd7f98e5ff29881b1b1344/contourpy-1.3.1-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:14c102b0eab282427b662cb590f2e9340a9d91a1c297f48729431f2dcd16e14f", size = 321108 }, + { url = "https://files.pythonhosted.org/packages/17/69/390dc9b20dd4bb20585651d7316cc3054b7d4a7b4f8b710b2b698e08968d/contourpy-1.3.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:05e806338bfeaa006acbdeba0ad681a10be63b26e1b17317bfac3c5d98f36cda", size = 327291 }, + { url = "https://files.pythonhosted.org/packages/ef/74/7030b67c4e941fe1e5424a3d988080e83568030ce0355f7c9fc556455b01/contourpy-1.3.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:4d76d5993a34ef3df5181ba3c92fabb93f1eaa5729504fb03423fcd9f3177242", size = 1263752 }, + { url = "https://files.pythonhosted.org/packages/f0/ed/92d86f183a8615f13f6b9cbfc5d4298a509d6ce433432e21da838b4b63f4/contourpy-1.3.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:89785bb2a1980c1bd87f0cb1517a71cde374776a5f150936b82580ae6ead44a1", size = 1318403 }, + { url = "https://files.pythonhosted.org/packages/b3/0e/c8e4950c77dcfc897c71d61e56690a0a9df39543d2164040301b5df8e67b/contourpy-1.3.1-cp313-cp313t-win32.whl", hash = "sha256:8eb96e79b9f3dcadbad2a3891672f81cdcab7f95b27f28f1c67d75f045b6b4f1", size = 185117 }, + { url = "https://files.pythonhosted.org/packages/c1/31/1ae946f11dfbd229222e6d6ad8e7bd1891d3d48bde5fbf7a0beb9491f8e3/contourpy-1.3.1-cp313-cp313t-win_amd64.whl", hash = "sha256:287ccc248c9e0d0566934e7d606201abd74761b5703d804ff3df8935f523d546", size = 236668 }, +] + +[[package]] +name = "cycler" +version = "0.12.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a9/95/a3dbbb5028f35eafb79008e7522a75244477d2838f38cbb722248dabc2a8/cycler-0.12.1.tar.gz", hash = "sha256:88bb128f02ba341da8ef447245a9e138fae777f6a23943da4540077d3601eb1c", size = 7615 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e7/05/c19819d5e3d95294a6f5947fb9b9629efb316b96de511b418c53d245aae6/cycler-0.12.1-py3-none-any.whl", hash = "sha256:85cef7cff222d8644161529808465972e51340599459b8ac3ccbac5a854e0d30", size = 8321 }, +] + +[[package]] +name = "debugpy" +version = "1.8.13" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/51/d4/f35f539e11c9344652f362c22413ec5078f677ac71229dc9b4f6f85ccaa3/debugpy-1.8.13.tar.gz", hash = "sha256:837e7bef95bdefba426ae38b9a94821ebdc5bea55627879cd48165c90b9e50ce", size = 1641193 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/79/ad/dff929b6b5403feaab0af0e5bb460fd723f9c62538b718a9af819b8fff20/debugpy-1.8.13-cp312-cp312-macosx_14_0_universal2.whl", hash = "sha256:2b8de94c5c78aa0d0ed79023eb27c7c56a64c68217d881bee2ffbcb13951d0c1", size = 2501004 }, + { url = "https://files.pythonhosted.org/packages/d6/4f/b7d42e6679f0bb525888c278b0c0d2b6dff26ed42795230bb46eaae4f9b3/debugpy-1.8.13-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:887d54276cefbe7290a754424b077e41efa405a3e07122d8897de54709dbe522", size = 4222346 }, + { url = "https://files.pythonhosted.org/packages/ec/18/d9b3e88e85d41f68f77235112adc31012a784e45a3fcdbb039777d570a0f/debugpy-1.8.13-cp312-cp312-win32.whl", hash = "sha256:3872ce5453b17837ef47fb9f3edc25085ff998ce63543f45ba7af41e7f7d370f", size = 5226639 }, + { url = "https://files.pythonhosted.org/packages/c9/f7/0df18a4f530ed3cc06f0060f548efe9e3316102101e311739d906f5650be/debugpy-1.8.13-cp312-cp312-win_amd64.whl", hash = "sha256:63ca7670563c320503fea26ac688988d9d6b9c6a12abc8a8cf2e7dd8e5f6b6ea", size = 5268735 }, + { url = "https://files.pythonhosted.org/packages/b1/db/ae7cd645c1826aae557cebccbc448f0cc9a818d364efb88f8d80e7a03f41/debugpy-1.8.13-cp313-cp313-macosx_14_0_universal2.whl", hash = "sha256:31abc9618be4edad0b3e3a85277bc9ab51a2d9f708ead0d99ffb5bb750e18503", size = 2485416 }, + { url = "https://files.pythonhosted.org/packages/ec/ed/db4b10ff3b5bb30fe41d9e86444a08bb6448e4d8265e7768450b8408dd36/debugpy-1.8.13-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a0bd87557f97bced5513a74088af0b84982b6ccb2e254b9312e29e8a5c4270eb", size = 4218784 }, + { url = "https://files.pythonhosted.org/packages/82/82/ed81852a8d94086f51664d032d83c7f87cd2b087c6ea70dabec7c1ba813d/debugpy-1.8.13-cp313-cp313-win32.whl", hash = "sha256:5268ae7fdca75f526d04465931cb0bd24577477ff50e8bb03dab90983f4ebd02", size = 5226270 }, + { url = "https://files.pythonhosted.org/packages/15/63/aa92fb341a78ec40f1c414ec7a7885c2ee17032eee00d12cee0cdc502af4/debugpy-1.8.13-cp313-cp313-win_amd64.whl", hash = "sha256:79ce4ed40966c4c1631d0131606b055a5a2f8e430e3f7bf8fd3744b09943e8e8", size = 5268621 }, + { url = "https://files.pythonhosted.org/packages/37/4f/0b65410a08b6452bfd3f7ed6f3610f1a31fb127f46836e82d31797065dcb/debugpy-1.8.13-py2.py3-none-any.whl", hash = "sha256:d4ba115cdd0e3a70942bd562adba9ec8c651fe69ddde2298a1be296fc331906f", size = 5229306 }, +] + +[[package]] +name = "decorator" +version = "5.2.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/43/fa/6d96a0978d19e17b68d634497769987b16c8f4cd0a7a05048bec693caa6b/decorator-5.2.1.tar.gz", hash = "sha256:65f266143752f734b0a7cc83c46f4618af75b8c5911b00ccb61d0ac9b6da0360", size = 56711 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4e/8c/f3147f5c4b73e7550fe5f9352eaa956ae838d5c51eb58e7a25b9f3e2643b/decorator-5.2.1-py3-none-any.whl", hash = "sha256:d316bb415a2d9e2d2b3abcc4084c6502fc09240e292cd76a76afc106a1c8e04a", size = 9190 }, +] + +[[package]] +name = "doubleml" +version = "0.9.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "joblib" }, + { name = "matplotlib" }, + { name = "numpy" }, + { name = "pandas" }, + { name = "plotly" }, + { name = "scikit-learn" }, + { name = "scipy" }, + { name = "statsmodels" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/48/c4/5798ab5c520868d31c625df3600e942612dea707a8da613a1a4341d47f1f/doubleml-0.9.3.tar.gz", hash = "sha256:a1f6337a5700856a3ab77af0b44449741d0fcb188b03ce7d15c0c0d0db0aca29", size = 226094 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/97/89/59665f3e7f1a2d99d6fd0babf61b2560c96686fe1fc17f8201f0a0c0baa0/DoubleML-0.9.3-py3-none-any.whl", hash = "sha256:c2ef19d8355babaf03392ae705353f309a684f4a8191cf8e2a7fed74db419808", size = 342917 }, +] + +[package.optional-dependencies] +rdd = [ + { name = "rdrobust" }, +] + +[[package]] +name = "executing" +version = "2.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/91/50/a9d80c47ff289c611ff12e63f7c5d13942c65d68125160cefd768c73e6e4/executing-2.2.0.tar.gz", hash = "sha256:5d108c028108fe2551d1a7b2e8b713341e2cb4fc0aa7dcf966fa4327a5226755", size = 978693 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7b/8f/c4d9bafc34ad7ad5d8dc16dd1347ee0e507a52c3adb6bfa8887e1c6a26ba/executing-2.2.0-py2.py3-none-any.whl", hash = "sha256:11387150cad388d62750327a53d3339fad4888b39a6fe233c3afbb54ecffd3aa", size = 26702 }, +] + +[[package]] +name = "fonttools" +version = "4.56.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/1c/8c/9ffa2a555af0e5e5d0e2ed7fdd8c9bef474ed676995bb4c57c9cd0014248/fonttools-4.56.0.tar.gz", hash = "sha256:a114d1567e1a1586b7e9e7fc2ff686ca542a82769a296cef131e4c4af51e58f4", size = 3462892 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/39/32/71cfd6877999576a11824a7fe7bc0bb57c5c72b1f4536fa56a3e39552643/fonttools-4.56.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:d6f195c14c01bd057bc9b4f70756b510e009c83c5ea67b25ced3e2c38e6ee6e9", size = 2747757 }, + { url = "https://files.pythonhosted.org/packages/15/52/d9f716b072c5061a0b915dd4c387f74bef44c68c069e2195c753905bd9b7/fonttools-4.56.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:fa760e5fe8b50cbc2d71884a1eff2ed2b95a005f02dda2fa431560db0ddd927f", size = 2279007 }, + { url = "https://files.pythonhosted.org/packages/d1/97/f1b3a8afa9a0d814a092a25cd42f59ccb98a0bb7a295e6e02fc9ba744214/fonttools-4.56.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d54a45d30251f1d729e69e5b675f9a08b7da413391a1227781e2a297fa37f6d2", size = 4783991 }, + { url = "https://files.pythonhosted.org/packages/95/70/2a781bedc1c45a0c61d29c56425609b22ed7f971da5d7e5df2679488741b/fonttools-4.56.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:661a8995d11e6e4914a44ca7d52d1286e2d9b154f685a4d1f69add8418961563", size = 4855109 }, + { url = "https://files.pythonhosted.org/packages/0c/02/a2597858e61a5e3fb6a14d5f6be9e6eb4eaf090da56ad70cedcbdd201685/fonttools-4.56.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9d94449ad0a5f2a8bf5d2f8d71d65088aee48adbe45f3c5f8e00e3ad861ed81a", size = 4762496 }, + { url = "https://files.pythonhosted.org/packages/f2/00/aaf00100d6078fdc73f7352b44589804af9dc12b182a2540b16002152ba4/fonttools-4.56.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:f59746f7953f69cc3290ce2f971ab01056e55ddd0fb8b792c31a8acd7fee2d28", size = 4990094 }, + { url = "https://files.pythonhosted.org/packages/bf/dc/3ff1db522460db60cf3adaf1b64e0c72b43406717d139786d3fa1eb20709/fonttools-4.56.0-cp312-cp312-win32.whl", hash = "sha256:bce60f9a977c9d3d51de475af3f3581d9b36952e1f8fc19a1f2254f1dda7ce9c", size = 2142888 }, + { url = "https://files.pythonhosted.org/packages/6f/e3/5a181a85777f7809076e51f7422e0dc77eb04676c40ec8bf6a49d390d1ff/fonttools-4.56.0-cp312-cp312-win_amd64.whl", hash = "sha256:300c310bb725b2bdb4f5fc7e148e190bd69f01925c7ab437b9c0ca3e1c7cd9ba", size = 2189734 }, + { url = "https://files.pythonhosted.org/packages/a5/55/f06b48d48e0b4ec3a3489efafe9bd4d81b6e0802ac51026e3ee4634e89ba/fonttools-4.56.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:f20e2c0dfab82983a90f3d00703ac0960412036153e5023eed2b4641d7d5e692", size = 2735127 }, + { url = "https://files.pythonhosted.org/packages/59/db/d2c7c9b6dd5cbd46f183e650a47403ffb88fca17484eb7c4b1cd88f9e513/fonttools-4.56.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f36a0868f47b7566237640c026c65a86d09a3d9ca5df1cd039e30a1da73098a0", size = 2272519 }, + { url = "https://files.pythonhosted.org/packages/4d/a2/da62d779c34a0e0c06415f02eab7fa3466de5d46df459c0275a255cefc65/fonttools-4.56.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:62b4c6802fa28e14dba010e75190e0e6228513573f1eeae57b11aa1a39b7e5b1", size = 4762423 }, + { url = "https://files.pythonhosted.org/packages/be/6a/fd4018e0448c8a5e12138906411282c5eab51a598493f080a9f0960e658f/fonttools-4.56.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a05d1f07eb0a7d755fbe01fee1fd255c3a4d3730130cf1bfefb682d18fd2fcea", size = 4834442 }, + { url = "https://files.pythonhosted.org/packages/6d/63/fa1dec8efb35bc11ef9c39b2d74754b45d48a3ccb2cf78c0109c0af639e8/fonttools-4.56.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0073b62c3438cf0058488c002ea90489e8801d3a7af5ce5f7c05c105bee815c3", size = 4742800 }, + { url = "https://files.pythonhosted.org/packages/dd/f4/963247ae8c73ccc4cf2929e7162f595c81dbe17997d1d0ea77da24a217c9/fonttools-4.56.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e2cad98c94833465bcf28f51c248aaf07ca022efc6a3eba750ad9c1e0256d278", size = 4963746 }, + { url = "https://files.pythonhosted.org/packages/ea/e0/46f9600c39c644b54e4420f941f75fa200d9288c9ae171e5d80918b8cbb9/fonttools-4.56.0-cp313-cp313-win32.whl", hash = "sha256:d0cb73ccf7f6d7ca8d0bc7ea8ac0a5b84969a41c56ac3ac3422a24df2680546f", size = 2140927 }, + { url = "https://files.pythonhosted.org/packages/27/6d/3edda54f98a550a0473f032d8050315fbc8f1b76a0d9f3879b72ebb2cdd6/fonttools-4.56.0-cp313-cp313-win_amd64.whl", hash = "sha256:62cc1253827d1e500fde9dbe981219fea4eb000fd63402283472d38e7d8aa1c6", size = 2186709 }, + { url = "https://files.pythonhosted.org/packages/bf/ff/44934a031ce5a39125415eb405b9efb76fe7f9586b75291d66ae5cbfc4e6/fonttools-4.56.0-py3-none-any.whl", hash = "sha256:1088182f68c303b50ca4dc0c82d42083d176cba37af1937e1a976a31149d4d14", size = 1089800 }, +] + +[[package]] +name = "ipykernel" +version = "6.29.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "appnope", marker = "sys_platform == 'darwin'" }, + { name = "comm" }, + { name = "debugpy" }, + { name = "ipython" }, + { name = "jupyter-client" }, + { name = "jupyter-core" }, + { name = "matplotlib-inline" }, + { name = "nest-asyncio" }, + { name = "packaging" }, + { name = "psutil" }, + { name = "pyzmq" }, + { name = "tornado" }, + { name = "traitlets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e9/5c/67594cb0c7055dc50814b21731c22a601101ea3b1b50a9a1b090e11f5d0f/ipykernel-6.29.5.tar.gz", hash = "sha256:f093a22c4a40f8828f8e330a9c297cb93dcab13bd9678ded6de8e5cf81c56215", size = 163367 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/94/5c/368ae6c01c7628438358e6d337c19b05425727fbb221d2a3c4303c372f42/ipykernel-6.29.5-py3-none-any.whl", hash = "sha256:afdb66ba5aa354b09b91379bac28ae4afebbb30e8b39510c9690afb7a10421b5", size = 117173 }, +] + +[[package]] +name = "ipython" +version = "9.0.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "decorator" }, + { name = "ipython-pygments-lexers" }, + { name = "jedi" }, + { name = "matplotlib-inline" }, + { name = "pexpect", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" }, + { name = "prompt-toolkit" }, + { name = "pygments" }, + { name = "stack-data" }, + { name = "traitlets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/7d/ce/012a0f40ca58a966f87a6e894d6828e2817657cbdf522b02a5d3a87d92ce/ipython-9.0.2.tar.gz", hash = "sha256:ec7b479e3e5656bf4f58c652c120494df1820f4f28f522fb7ca09e213c2aab52", size = 4366102 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/20/3a/917cb9e72f4e1a4ea13c862533205ae1319bd664119189ee5cc9e4e95ebf/ipython-9.0.2-py3-none-any.whl", hash = "sha256:143ef3ea6fb1e1bffb4c74b114051de653ffb7737a3f7ab1670e657ca6ae8c44", size = 600524 }, +] + +[[package]] +name = "ipython-pygments-lexers" +version = "1.1.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pygments" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ef/4c/5dd1d8af08107f88c7f741ead7a40854b8ac24ddf9ae850afbcf698aa552/ipython_pygments_lexers-1.1.1.tar.gz", hash = "sha256:09c0138009e56b6854f9535736f4171d855c8c08a563a0dcd8022f78355c7e81", size = 8393 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d9/33/1f075bf72b0b747cb3288d011319aaf64083cf2efef8354174e3ed4540e2/ipython_pygments_lexers-1.1.1-py3-none-any.whl", hash = "sha256:a9462224a505ade19a605f71f8fa63c2048833ce50abc86768a0d81d876dc81c", size = 8074 }, +] + +[[package]] +name = "itables" +version = "2.2.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "ipython" }, + { name = "numpy" }, + { name = "pandas" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/07/18/359fc46f2874290843a4ba2c089d0109874cd2d73863d0e69fd54a5e9532/itables-2.2.5.tar.gz", hash = "sha256:838ed4783da0b6481b9062c362b8a331aa56f48d6c90e0f6dc76a0488a316049", size = 2436699 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/aa/dd/8976761076632f492f0d25502e348f41f343423d36270dc32f323b9155bc/itables-2.2.5-py3-none-any.whl", hash = "sha256:d0d33ce427c6c84d4063998650323eb65ccddb47a5505ef1ad3f563580dc101d", size = 1407043 }, +] + +[[package]] +name = "jedi" +version = "0.19.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "parso" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/72/3a/79a912fbd4d8dd6fbb02bf69afd3bb72cf0c729bb3063c6f4498603db17a/jedi-0.19.2.tar.gz", hash = "sha256:4770dc3de41bde3966b02eb84fbcf557fb33cce26ad23da12c742fb50ecb11f0", size = 1231287 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c0/5a/9cac0c82afec3d09ccd97c8b6502d48f165f9124db81b4bcb90b4af974ee/jedi-0.19.2-py2.py3-none-any.whl", hash = "sha256:a8ef22bde8490f57fe5c7681a3c83cb58874daf72b4784de3cce5b6ef6edb5b9", size = 1572278 }, +] + +[[package]] +name = "joblib" +version = "1.4.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/64/33/60135848598c076ce4b231e1b1895170f45fbcaeaa2c9d5e38b04db70c35/joblib-1.4.2.tar.gz", hash = "sha256:2382c5816b2636fbd20a09e0f4e9dad4736765fdfb7dca582943b9c1366b3f0e", size = 2116621 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/91/29/df4b9b42f2be0b623cbd5e2140cafcaa2bef0759a00b7b70104dcfe2fb51/joblib-1.4.2-py3-none-any.whl", hash = "sha256:06d478d5674cbc267e7496a410ee875abd68e4340feff4490bcb7afb88060ae6", size = 301817 }, +] + +[[package]] +name = "jupyter-client" +version = "8.6.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "jupyter-core" }, + { name = "python-dateutil" }, + { name = "pyzmq" }, + { name = "tornado" }, + { name = "traitlets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/71/22/bf9f12fdaeae18019a468b68952a60fe6dbab5d67cd2a103cac7659b41ca/jupyter_client-8.6.3.tar.gz", hash = "sha256:35b3a0947c4a6e9d589eb97d7d4cd5e90f910ee73101611f01283732bd6d9419", size = 342019 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/11/85/b0394e0b6fcccd2c1eeefc230978a6f8cb0c5df1e4cd3e7625735a0d7d1e/jupyter_client-8.6.3-py3-none-any.whl", hash = "sha256:e8a19cc986cc45905ac3362915f410f3af85424b4c0905e94fa5f2cb08e8f23f", size = 106105 }, +] + +[[package]] +name = "jupyter-core" +version = "5.7.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "platformdirs" }, + { name = "pywin32", marker = "platform_python_implementation != 'PyPy' and sys_platform == 'win32'" }, + { name = "traitlets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/00/11/b56381fa6c3f4cc5d2cf54a7dbf98ad9aa0b339ef7a601d6053538b079a7/jupyter_core-5.7.2.tar.gz", hash = "sha256:aa5f8d32bbf6b431ac830496da7392035d6f61b4f54872f15c4bd2a9c3f536d9", size = 87629 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c9/fb/108ecd1fe961941959ad0ee4e12ee7b8b1477247f30b1fdfd83ceaf017f0/jupyter_core-5.7.2-py3-none-any.whl", hash = "sha256:4f7315d2f6b4bcf2e3e7cb6e46772eba760ae459cd1f59d29eb57b0a01bd7409", size = 28965 }, +] + +[[package]] +name = "kiwisolver" +version = "1.4.8" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/82/59/7c91426a8ac292e1cdd53a63b6d9439abd573c875c3f92c146767dd33faf/kiwisolver-1.4.8.tar.gz", hash = "sha256:23d5f023bdc8c7e54eb65f03ca5d5bb25b601eac4d7f1a042888a1f45237987e", size = 97538 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fc/aa/cea685c4ab647f349c3bc92d2daf7ae34c8e8cf405a6dcd3a497f58a2ac3/kiwisolver-1.4.8-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:d6af5e8815fd02997cb6ad9bbed0ee1e60014438ee1a5c2444c96f87b8843502", size = 124152 }, + { url = "https://files.pythonhosted.org/packages/c5/0b/8db6d2e2452d60d5ebc4ce4b204feeb16176a851fd42462f66ade6808084/kiwisolver-1.4.8-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:bade438f86e21d91e0cf5dd7c0ed00cda0f77c8c1616bd83f9fc157fa6760d31", size = 66555 }, + { url = "https://files.pythonhosted.org/packages/60/26/d6a0db6785dd35d3ba5bf2b2df0aedc5af089962c6eb2cbf67a15b81369e/kiwisolver-1.4.8-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b83dc6769ddbc57613280118fb4ce3cd08899cc3369f7d0e0fab518a7cf37fdb", size = 65067 }, + { url = "https://files.pythonhosted.org/packages/c9/ed/1d97f7e3561e09757a196231edccc1bcf59d55ddccefa2afc9c615abd8e0/kiwisolver-1.4.8-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:111793b232842991be367ed828076b03d96202c19221b5ebab421ce8bcad016f", size = 1378443 }, + { url = "https://files.pythonhosted.org/packages/29/61/39d30b99954e6b46f760e6289c12fede2ab96a254c443639052d1b573fbc/kiwisolver-1.4.8-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:257af1622860e51b1a9d0ce387bf5c2c4f36a90594cb9514f55b074bcc787cfc", size = 1472728 }, + { url = "https://files.pythonhosted.org/packages/0c/3e/804163b932f7603ef256e4a715e5843a9600802bb23a68b4e08c8c0ff61d/kiwisolver-1.4.8-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:69b5637c3f316cab1ec1c9a12b8c5f4750a4c4b71af9157645bf32830e39c03a", size = 1478388 }, + { url = "https://files.pythonhosted.org/packages/8a/9e/60eaa75169a154700be74f875a4d9961b11ba048bef315fbe89cb6999056/kiwisolver-1.4.8-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:782bb86f245ec18009890e7cb8d13a5ef54dcf2ebe18ed65f795e635a96a1c6a", size = 1413849 }, + { url = "https://files.pythonhosted.org/packages/bc/b3/9458adb9472e61a998c8c4d95cfdfec91c73c53a375b30b1428310f923e4/kiwisolver-1.4.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc978a80a0db3a66d25767b03688f1147a69e6237175c0f4ffffaaedf744055a", size = 1475533 }, + { url = "https://files.pythonhosted.org/packages/e4/7a/0a42d9571e35798de80aef4bb43a9b672aa7f8e58643d7bd1950398ffb0a/kiwisolver-1.4.8-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:36dbbfd34838500a31f52c9786990d00150860e46cd5041386f217101350f0d3", size = 2268898 }, + { url = "https://files.pythonhosted.org/packages/d9/07/1255dc8d80271400126ed8db35a1795b1a2c098ac3a72645075d06fe5c5d/kiwisolver-1.4.8-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:eaa973f1e05131de5ff3569bbba7f5fd07ea0595d3870ed4a526d486fe57fa1b", size = 2425605 }, + { url = "https://files.pythonhosted.org/packages/84/df/5a3b4cf13780ef6f6942df67b138b03b7e79e9f1f08f57c49957d5867f6e/kiwisolver-1.4.8-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:a66f60f8d0c87ab7f59b6fb80e642ebb29fec354a4dfad687ca4092ae69d04f4", size = 2375801 }, + { url = "https://files.pythonhosted.org/packages/8f/10/2348d068e8b0f635c8c86892788dac7a6b5c0cb12356620ab575775aad89/kiwisolver-1.4.8-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:858416b7fb777a53f0c59ca08190ce24e9abbd3cffa18886a5781b8e3e26f65d", size = 2520077 }, + { url = "https://files.pythonhosted.org/packages/32/d8/014b89fee5d4dce157d814303b0fce4d31385a2af4c41fed194b173b81ac/kiwisolver-1.4.8-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:085940635c62697391baafaaeabdf3dd7a6c3643577dde337f4d66eba021b2b8", size = 2338410 }, + { url = "https://files.pythonhosted.org/packages/bd/72/dfff0cc97f2a0776e1c9eb5bef1ddfd45f46246c6533b0191887a427bca5/kiwisolver-1.4.8-cp312-cp312-win_amd64.whl", hash = "sha256:01c3d31902c7db5fb6182832713d3b4122ad9317c2c5877d0539227d96bb2e50", size = 71853 }, + { url = "https://files.pythonhosted.org/packages/dc/85/220d13d914485c0948a00f0b9eb419efaf6da81b7d72e88ce2391f7aed8d/kiwisolver-1.4.8-cp312-cp312-win_arm64.whl", hash = "sha256:a3c44cb68861de93f0c4a8175fbaa691f0aa22550c331fefef02b618a9dcb476", size = 65424 }, + { url = "https://files.pythonhosted.org/packages/79/b3/e62464a652f4f8cd9006e13d07abad844a47df1e6537f73ddfbf1bc997ec/kiwisolver-1.4.8-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:1c8ceb754339793c24aee1c9fb2485b5b1f5bb1c2c214ff13368431e51fc9a09", size = 124156 }, + { url = "https://files.pythonhosted.org/packages/8d/2d/f13d06998b546a2ad4f48607a146e045bbe48030774de29f90bdc573df15/kiwisolver-1.4.8-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:54a62808ac74b5e55a04a408cda6156f986cefbcf0ada13572696b507cc92fa1", size = 66555 }, + { url = "https://files.pythonhosted.org/packages/59/e3/b8bd14b0a54998a9fd1e8da591c60998dc003618cb19a3f94cb233ec1511/kiwisolver-1.4.8-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:68269e60ee4929893aad82666821aaacbd455284124817af45c11e50a4b42e3c", size = 65071 }, + { url = "https://files.pythonhosted.org/packages/f0/1c/6c86f6d85ffe4d0ce04228d976f00674f1df5dc893bf2dd4f1928748f187/kiwisolver-1.4.8-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:34d142fba9c464bc3bbfeff15c96eab0e7310343d6aefb62a79d51421fcc5f1b", size = 1378053 }, + { url = "https://files.pythonhosted.org/packages/4e/b9/1c6e9f6dcb103ac5cf87cb695845f5fa71379021500153566d8a8a9fc291/kiwisolver-1.4.8-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3ddc373e0eef45b59197de815b1b28ef89ae3955e7722cc9710fb91cd77b7f47", size = 1472278 }, + { url = "https://files.pythonhosted.org/packages/ee/81/aca1eb176de671f8bda479b11acdc42c132b61a2ac861c883907dde6debb/kiwisolver-1.4.8-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:77e6f57a20b9bd4e1e2cedda4d0b986ebd0216236f0106e55c28aea3d3d69b16", size = 1478139 }, + { url = "https://files.pythonhosted.org/packages/49/f4/e081522473671c97b2687d380e9e4c26f748a86363ce5af48b4a28e48d06/kiwisolver-1.4.8-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:08e77738ed7538f036cd1170cbed942ef749137b1311fa2bbe2a7fda2f6bf3cc", size = 1413517 }, + { url = "https://files.pythonhosted.org/packages/8f/e9/6a7d025d8da8c4931522922cd706105aa32b3291d1add8c5427cdcd66e63/kiwisolver-1.4.8-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a5ce1e481a74b44dd5e92ff03ea0cb371ae7a0268318e202be06c8f04f4f1246", size = 1474952 }, + { url = "https://files.pythonhosted.org/packages/82/13/13fa685ae167bee5d94b415991c4fc7bb0a1b6ebea6e753a87044b209678/kiwisolver-1.4.8-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:fc2ace710ba7c1dfd1a3b42530b62b9ceed115f19a1656adefce7b1782a37794", size = 2269132 }, + { url = "https://files.pythonhosted.org/packages/ef/92/bb7c9395489b99a6cb41d502d3686bac692586db2045adc19e45ee64ed23/kiwisolver-1.4.8-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:3452046c37c7692bd52b0e752b87954ef86ee2224e624ef7ce6cb21e8c41cc1b", size = 2425997 }, + { url = "https://files.pythonhosted.org/packages/ed/12/87f0e9271e2b63d35d0d8524954145837dd1a6c15b62a2d8c1ebe0f182b4/kiwisolver-1.4.8-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:7e9a60b50fe8b2ec6f448fe8d81b07e40141bfced7f896309df271a0b92f80f3", size = 2376060 }, + { url = "https://files.pythonhosted.org/packages/02/6e/c8af39288edbce8bf0fa35dee427b082758a4b71e9c91ef18fa667782138/kiwisolver-1.4.8-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:918139571133f366e8362fa4a297aeba86c7816b7ecf0bc79168080e2bd79957", size = 2520471 }, + { url = "https://files.pythonhosted.org/packages/13/78/df381bc7b26e535c91469f77f16adcd073beb3e2dd25042efd064af82323/kiwisolver-1.4.8-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e063ef9f89885a1d68dd8b2e18f5ead48653176d10a0e324e3b0030e3a69adeb", size = 2338793 }, + { url = "https://files.pythonhosted.org/packages/d0/dc/c1abe38c37c071d0fc71c9a474fd0b9ede05d42f5a458d584619cfd2371a/kiwisolver-1.4.8-cp313-cp313-win_amd64.whl", hash = "sha256:a17b7c4f5b2c51bb68ed379defd608a03954a1845dfed7cc0117f1cc8a9b7fd2", size = 71855 }, + { url = "https://files.pythonhosted.org/packages/a0/b6/21529d595b126ac298fdd90b705d87d4c5693de60023e0efcb4f387ed99e/kiwisolver-1.4.8-cp313-cp313-win_arm64.whl", hash = "sha256:3cd3bc628b25f74aedc6d374d5babf0166a92ff1317f46267f12d2ed54bc1d30", size = 65430 }, + { url = "https://files.pythonhosted.org/packages/34/bd/b89380b7298e3af9b39f49334e3e2a4af0e04819789f04b43d560516c0c8/kiwisolver-1.4.8-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:370fd2df41660ed4e26b8c9d6bbcad668fbe2560462cba151a721d49e5b6628c", size = 126294 }, + { url = "https://files.pythonhosted.org/packages/83/41/5857dc72e5e4148eaac5aa76e0703e594e4465f8ab7ec0fc60e3a9bb8fea/kiwisolver-1.4.8-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:84a2f830d42707de1d191b9490ac186bf7997a9495d4e9072210a1296345f7dc", size = 67736 }, + { url = "https://files.pythonhosted.org/packages/e1/d1/be059b8db56ac270489fb0b3297fd1e53d195ba76e9bbb30e5401fa6b759/kiwisolver-1.4.8-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:7a3ad337add5148cf51ce0b55642dc551c0b9d6248458a757f98796ca7348712", size = 66194 }, + { url = "https://files.pythonhosted.org/packages/e1/83/4b73975f149819eb7dcf9299ed467eba068ecb16439a98990dcb12e63fdd/kiwisolver-1.4.8-cp313-cp313t-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7506488470f41169b86d8c9aeff587293f530a23a23a49d6bc64dab66bedc71e", size = 1465942 }, + { url = "https://files.pythonhosted.org/packages/c7/2c/30a5cdde5102958e602c07466bce058b9d7cb48734aa7a4327261ac8e002/kiwisolver-1.4.8-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f0121b07b356a22fb0414cec4666bbe36fd6d0d759db3d37228f496ed67c880", size = 1595341 }, + { url = "https://files.pythonhosted.org/packages/ff/9b/1e71db1c000385aa069704f5990574b8244cce854ecd83119c19e83c9586/kiwisolver-1.4.8-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d6d6bd87df62c27d4185de7c511c6248040afae67028a8a22012b010bc7ad062", size = 1598455 }, + { url = "https://files.pythonhosted.org/packages/85/92/c8fec52ddf06231b31cbb779af77e99b8253cd96bd135250b9498144c78b/kiwisolver-1.4.8-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:291331973c64bb9cce50bbe871fb2e675c4331dab4f31abe89f175ad7679a4d7", size = 1522138 }, + { url = "https://files.pythonhosted.org/packages/0b/51/9eb7e2cd07a15d8bdd976f6190c0164f92ce1904e5c0c79198c4972926b7/kiwisolver-1.4.8-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:893f5525bb92d3d735878ec00f781b2de998333659507d29ea4466208df37bed", size = 1582857 }, + { url = "https://files.pythonhosted.org/packages/0f/95/c5a00387a5405e68ba32cc64af65ce881a39b98d73cc394b24143bebc5b8/kiwisolver-1.4.8-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:b47a465040146981dc9db8647981b8cb96366fbc8d452b031e4f8fdffec3f26d", size = 2293129 }, + { url = "https://files.pythonhosted.org/packages/44/83/eeb7af7d706b8347548313fa3a3a15931f404533cc54fe01f39e830dd231/kiwisolver-1.4.8-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:99cea8b9dd34ff80c521aef46a1dddb0dcc0283cf18bde6d756f1e6f31772165", size = 2421538 }, + { url = "https://files.pythonhosted.org/packages/05/f9/27e94c1b3eb29e6933b6986ffc5fa1177d2cd1f0c8efc5f02c91c9ac61de/kiwisolver-1.4.8-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:151dffc4865e5fe6dafce5480fab84f950d14566c480c08a53c663a0020504b6", size = 2390661 }, + { url = "https://files.pythonhosted.org/packages/d9/d4/3c9735faa36ac591a4afcc2980d2691000506050b7a7e80bcfe44048daa7/kiwisolver-1.4.8-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:577facaa411c10421314598b50413aa1ebcf5126f704f1e5d72d7e4e9f020d90", size = 2546710 }, + { url = "https://files.pythonhosted.org/packages/4c/fa/be89a49c640930180657482a74970cdcf6f7072c8d2471e1babe17a222dc/kiwisolver-1.4.8-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:be4816dc51c8a471749d664161b434912eee82f2ea66bd7628bd14583a833e85", size = 2349213 }, +] + +[[package]] +name = "lightgbm" +version = "4.6.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy" }, + { name = "scipy" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/68/0b/a2e9f5c5da7ef047cc60cef37f86185088845e8433e54d2e7ed439cce8a3/lightgbm-4.6.0.tar.gz", hash = "sha256:cb1c59720eb569389c0ba74d14f52351b573af489f230032a1c9f314f8bab7fe", size = 1703705 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f2/75/cffc9962cca296bc5536896b7e65b4a7cdeb8db208e71b9c0133c08f8f7e/lightgbm-4.6.0-py3-none-macosx_10_15_x86_64.whl", hash = "sha256:b7a393de8a334d5c8e490df91270f0763f83f959574d504c7ccb9eee4aef70ed", size = 2010151 }, + { url = "https://files.pythonhosted.org/packages/21/1b/550ee378512b78847930f5d74228ca1fdba2a7fbdeaac9aeccc085b0e257/lightgbm-4.6.0-py3-none-macosx_12_0_arm64.whl", hash = "sha256:2dafd98d4e02b844ceb0b61450a660681076b1ea6c7adb8c566dfd66832aafad", size = 1592172 }, + { url = "https://files.pythonhosted.org/packages/64/41/4fbde2c3d29e25ee7c41d87df2f2e5eda65b431ee154d4d462c31041846c/lightgbm-4.6.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:4d68712bbd2b57a0b14390cbf9376c1d5ed773fa2e71e099cac588703b590336", size = 3454567 }, + { url = "https://files.pythonhosted.org/packages/42/86/dabda8fbcb1b00bcfb0003c3776e8ade1aa7b413dff0a2c08f457dace22f/lightgbm-4.6.0-py3-none-manylinux_2_28_x86_64.whl", hash = "sha256:cb19b5afea55b5b61cbb2131095f50538bd608a00655f23ad5d25ae3e3bf1c8d", size = 3569831 }, + { url = "https://files.pythonhosted.org/packages/5e/23/f8b28ca248bb629b9e08f877dd2965d1994e1674a03d67cd10c5246da248/lightgbm-4.6.0-py3-none-win_amd64.whl", hash = "sha256:37089ee95664b6550a7189d887dbf098e3eadab03537e411f52c63c121e3ba4b", size = 1451509 }, +] + +[[package]] +name = "matplotlib" +version = "3.10.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "contourpy" }, + { name = "cycler" }, + { name = "fonttools" }, + { name = "kiwisolver" }, + { name = "numpy" }, + { name = "packaging" }, + { name = "pillow" }, + { name = "pyparsing" }, + { name = "python-dateutil" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/2f/08/b89867ecea2e305f408fbb417139a8dd941ecf7b23a2e02157c36da546f0/matplotlib-3.10.1.tar.gz", hash = "sha256:e8d2d0e3881b129268585bf4765ad3ee73a4591d77b9a18c214ac7e3a79fb2ba", size = 36743335 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7c/1d/5e0dc3b59c034e43de16f94deb68f4ad8a96b3ea00f4b37c160b7474928e/matplotlib-3.10.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:66e907a06e68cb6cfd652c193311d61a12b54f56809cafbed9736ce5ad92f107", size = 8175488 }, + { url = "https://files.pythonhosted.org/packages/7a/81/dae7e14042e74da658c3336ab9799128e09a1ee03964f2d89630b5d12106/matplotlib-3.10.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e9b4bb156abb8fa5e5b2b460196f7db7264fc6d62678c03457979e7d5254b7be", size = 8046264 }, + { url = "https://files.pythonhosted.org/packages/21/c4/22516775dcde10fc9c9571d155f90710761b028fc44f660508106c363c97/matplotlib-3.10.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1985ad3d97f51307a2cbfc801a930f120def19ba22864182dacef55277102ba6", size = 8452048 }, + { url = "https://files.pythonhosted.org/packages/63/23/c0615001f67ce7c96b3051d856baedc0c818a2ed84570b9bf9bde200f85d/matplotlib-3.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c96f2c2f825d1257e437a1482c5a2cf4fee15db4261bd6fc0750f81ba2b4ba3d", size = 8597111 }, + { url = "https://files.pythonhosted.org/packages/ca/c0/a07939a82aed77770514348f4568177d7dadab9787ebc618a616fe3d665e/matplotlib-3.10.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:35e87384ee9e488d8dd5a2dd7baf471178d38b90618d8ea147aced4ab59c9bea", size = 9402771 }, + { url = "https://files.pythonhosted.org/packages/a6/b6/a9405484fb40746fdc6ae4502b16a9d6e53282ba5baaf9ebe2da579f68c4/matplotlib-3.10.1-cp312-cp312-win_amd64.whl", hash = "sha256:cfd414bce89cc78a7e1d25202e979b3f1af799e416010a20ab2b5ebb3a02425c", size = 8063742 }, + { url = "https://files.pythonhosted.org/packages/60/73/6770ff5e5523d00f3bc584acb6031e29ee5c8adc2336b16cd1d003675fe0/matplotlib-3.10.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:c42eee41e1b60fd83ee3292ed83a97a5f2a8239b10c26715d8a6172226988d7b", size = 8176112 }, + { url = "https://files.pythonhosted.org/packages/08/97/b0ca5da0ed54a3f6599c3ab568bdda65269bc27c21a2c97868c1625e4554/matplotlib-3.10.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:4f0647b17b667ae745c13721602b540f7aadb2a32c5b96e924cd4fea5dcb90f1", size = 8046931 }, + { url = "https://files.pythonhosted.org/packages/df/9a/1acbdc3b165d4ce2dcd2b1a6d4ffb46a7220ceee960c922c3d50d8514067/matplotlib-3.10.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aa3854b5f9473564ef40a41bc922be978fab217776e9ae1545c9b3a5cf2092a3", size = 8453422 }, + { url = "https://files.pythonhosted.org/packages/51/d0/2bc4368abf766203e548dc7ab57cf7e9c621f1a3c72b516cc7715347b179/matplotlib-3.10.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e496c01441be4c7d5f96d4e40f7fca06e20dcb40e44c8daa2e740e1757ad9e6", size = 8596819 }, + { url = "https://files.pythonhosted.org/packages/ab/1b/8b350f8a1746c37ab69dda7d7528d1fc696efb06db6ade9727b7887be16d/matplotlib-3.10.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5d45d3f5245be5b469843450617dcad9af75ca50568acf59997bed9311131a0b", size = 9402782 }, + { url = "https://files.pythonhosted.org/packages/89/06/f570373d24d93503988ba8d04f213a372fa1ce48381c5eb15da985728498/matplotlib-3.10.1-cp313-cp313-win_amd64.whl", hash = "sha256:8e8e25b1209161d20dfe93037c8a7f7ca796ec9aa326e6e4588d8c4a5dd1e473", size = 8063812 }, + { url = "https://files.pythonhosted.org/packages/fc/e0/8c811a925b5a7ad75135f0e5af46408b78af88bbb02a1df775100ef9bfef/matplotlib-3.10.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:19b06241ad89c3ae9469e07d77efa87041eac65d78df4fcf9cac318028009b01", size = 8214021 }, + { url = "https://files.pythonhosted.org/packages/4a/34/319ec2139f68ba26da9d00fce2ff9f27679fb799a6c8e7358539801fd629/matplotlib-3.10.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:01e63101ebb3014e6e9f80d9cf9ee361a8599ddca2c3e166c563628b39305dbb", size = 8090782 }, + { url = "https://files.pythonhosted.org/packages/77/ea/9812124ab9a99df5b2eec1110e9b2edc0b8f77039abf4c56e0a376e84a29/matplotlib-3.10.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3f06bad951eea6422ac4e8bdebcf3a70c59ea0a03338c5d2b109f57b64eb3972", size = 8478901 }, + { url = "https://files.pythonhosted.org/packages/c9/db/b05bf463689134789b06dea85828f8ebe506fa1e37593f723b65b86c9582/matplotlib-3.10.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a3dfb036f34873b46978f55e240cff7a239f6c4409eac62d8145bad3fc6ba5a3", size = 8613864 }, + { url = "https://files.pythonhosted.org/packages/c2/04/41ccec4409f3023a7576df3b5c025f1a8c8b81fbfe922ecfd837ac36e081/matplotlib-3.10.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:dc6ab14a7ab3b4d813b88ba957fc05c79493a037f54e246162033591e770de6f", size = 9409487 }, + { url = "https://files.pythonhosted.org/packages/ac/c2/0d5aae823bdcc42cc99327ecdd4d28585e15ccd5218c453b7bcd827f3421/matplotlib-3.10.1-cp313-cp313t-win_amd64.whl", hash = "sha256:bc411ebd5889a78dabbc457b3fa153203e22248bfa6eedc6797be5df0164dbf9", size = 8134832 }, +] + +[[package]] +name = "matplotlib-inline" +version = "0.1.7" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "traitlets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/99/5b/a36a337438a14116b16480db471ad061c36c3694df7c2084a0da7ba538b7/matplotlib_inline-0.1.7.tar.gz", hash = "sha256:8423b23ec666be3d16e16b60bdd8ac4e86e840ebd1dd11a30b9f117f2fa0ab90", size = 8159 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8f/8e/9ad090d3553c280a8060fbf6e24dc1c0c29704ee7d1c372f0c174aa59285/matplotlib_inline-0.1.7-py3-none-any.whl", hash = "sha256:df192d39a4ff8f21b1895d72e6a13f5fcc5099f00fa84384e0ea28c2cc0653ca", size = 9899 }, +] + +[[package]] +name = "mizani" +version = "0.13.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy" }, + { name = "pandas" }, + { name = "scipy" }, + { name = "tzdata", marker = "sys_platform == 'emscripten' or sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/91/c3/9f83c374314b2b42e7aec65f3bf87046415ab265f209fa8a04eb6da822ee/mizani-0.13.1.tar.gz", hash = "sha256:e3247ea12c746c8104767d7e42a2d16473173c7bc314f298d8294a58f4653353", size = 765181 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/29/85/16e17e75831ec01808c5f07e578f1552df87a4f5c827caa8be28f97b4c19/mizani-0.13.1-py3-none-any.whl", hash = "sha256:7da0dcacd43fbcc01c279ea06a76f1f064ae90dbb387c4a985ba24a92d3c7d7a", size = 127896 }, +] + +[[package]] +name = "montecover" +version = "0.1.0" +source = { editable = "." } +dependencies = [ + { name = "black" }, + { name = "doubleml", extra = ["rdd"] }, + { name = "ipykernel" }, + { name = "itables" }, + { name = "joblib" }, + { name = "lightgbm" }, + { name = "numpy" }, + { name = "pandas" }, + { name = "ruff" }, + { name = "scikit-learn" }, +] + +[package.metadata] +requires-dist = [ + { name = "black", specifier = ">=25.1.0" }, + { name = "doubleml", extras = ["rdd"], specifier = ">=0.9.3" }, + { name = "ipykernel", specifier = ">=6.29.5" }, + { name = "itables", specifier = ">=2.2.5" }, + { name = "joblib", specifier = ">=1.4.2" }, + { name = "lightgbm", specifier = ">=4.6.0" }, + { name = "numpy", specifier = ">=2.2.4" }, + { name = "pandas", specifier = ">=2.2.3" }, + { name = "ruff", specifier = ">=0.11.0" }, + { name = "scikit-learn", specifier = ">=1.5.2" }, +] + +[[package]] +name = "mypy-extensions" +version = "1.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/98/a4/1ab47638b92648243faf97a5aeb6ea83059cc3624972ab6b8d2316078d3f/mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782", size = 4433 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2a/e2/5d3f6ada4297caebe1a2add3b126fe800c96f56dbe5d1988a2cbe0b267aa/mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d", size = 4695 }, +] + +[[package]] +name = "narwhals" +version = "1.31.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/36/fa/c2b6a4d5dbc4af15aa58c86920d5275a9c65142318179b246685069f57da/narwhals-1.31.0.tar.gz", hash = "sha256:333472e2562343dfdd27407ec9b5114a07c81d0416794e4ac6b703dd925c6a1a", size = 253463 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f9/c0/fb39bd876ea2fd9509343d643690cd2f9715e6a77271e7c7b26f1eea70c1/narwhals-1.31.0-py3-none-any.whl", hash = "sha256:2a7b79bb5f511055c4c0142121fc0d4171ea171458e12d44dbd9c8fc6488e997", size = 313124 }, +] + +[[package]] +name = "nest-asyncio" +version = "1.6.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/83/f8/51569ac65d696c8ecbee95938f89d4abf00f47d58d48f6fbabfe8f0baefe/nest_asyncio-1.6.0.tar.gz", hash = "sha256:6f172d5449aca15afd6c646851f4e31e02c598d553a667e38cafa997cfec55fe", size = 7418 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a0/c4/c2971a3ba4c6103a3d10c4b0f24f461ddc027f0f09763220cf35ca1401b3/nest_asyncio-1.6.0-py3-none-any.whl", hash = "sha256:87af6efd6b5e897c81050477ef65c62e2b2f35d51703cae01aff2905b1852e1c", size = 5195 }, +] + +[[package]] +name = "numpy" +version = "2.2.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e1/78/31103410a57bc2c2b93a3597340a8119588571f6a4539067546cb9a0bfac/numpy-2.2.4.tar.gz", hash = "sha256:9ba03692a45d3eef66559efe1d1096c4b9b75c0986b5dff5530c378fb8331d4f", size = 20270701 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a2/30/182db21d4f2a95904cec1a6f779479ea1ac07c0647f064dea454ec650c42/numpy-2.2.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:a7b9084668aa0f64e64bd00d27ba5146ef1c3a8835f3bd912e7a9e01326804c4", size = 20947156 }, + { url = "https://files.pythonhosted.org/packages/24/6d/9483566acfbda6c62c6bc74b6e981c777229d2af93c8eb2469b26ac1b7bc/numpy-2.2.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:dbe512c511956b893d2dacd007d955a3f03d555ae05cfa3ff1c1ff6df8851854", size = 14133092 }, + { url = "https://files.pythonhosted.org/packages/27/f6/dba8a258acbf9d2bed2525cdcbb9493ef9bae5199d7a9cb92ee7e9b2aea6/numpy-2.2.4-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:bb649f8b207ab07caebba230d851b579a3c8711a851d29efe15008e31bb4de24", size = 5163515 }, + { url = "https://files.pythonhosted.org/packages/62/30/82116199d1c249446723c68f2c9da40d7f062551036f50b8c4caa42ae252/numpy-2.2.4-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:f34dc300df798742b3d06515aa2a0aee20941c13579d7a2f2e10af01ae4901ee", size = 6696558 }, + { url = "https://files.pythonhosted.org/packages/0e/b2/54122b3c6df5df3e87582b2e9430f1bdb63af4023c739ba300164c9ae503/numpy-2.2.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c3f7ac96b16955634e223b579a3e5798df59007ca43e8d451a0e6a50f6bfdfba", size = 14084742 }, + { url = "https://files.pythonhosted.org/packages/02/e2/e2cbb8d634151aab9528ef7b8bab52ee4ab10e076509285602c2a3a686e0/numpy-2.2.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f92084defa704deadd4e0a5ab1dc52d8ac9e8a8ef617f3fbb853e79b0ea3592", size = 16134051 }, + { url = "https://files.pythonhosted.org/packages/8e/21/efd47800e4affc993e8be50c1b768de038363dd88865920439ef7b422c60/numpy-2.2.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:7a4e84a6283b36632e2a5b56e121961f6542ab886bc9e12f8f9818b3c266bfbb", size = 15578972 }, + { url = "https://files.pythonhosted.org/packages/04/1e/f8bb88f6157045dd5d9b27ccf433d016981032690969aa5c19e332b138c0/numpy-2.2.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:11c43995255eb4127115956495f43e9343736edb7fcdb0d973defd9de14cd84f", size = 17898106 }, + { url = "https://files.pythonhosted.org/packages/2b/93/df59a5a3897c1f036ae8ff845e45f4081bb06943039ae28a3c1c7c780f22/numpy-2.2.4-cp312-cp312-win32.whl", hash = "sha256:65ef3468b53269eb5fdb3a5c09508c032b793da03251d5f8722b1194f1790c00", size = 6311190 }, + { url = "https://files.pythonhosted.org/packages/46/69/8c4f928741c2a8efa255fdc7e9097527c6dc4e4df147e3cadc5d9357ce85/numpy-2.2.4-cp312-cp312-win_amd64.whl", hash = "sha256:2aad3c17ed2ff455b8eaafe06bcdae0062a1db77cb99f4b9cbb5f4ecb13c5146", size = 12644305 }, + { url = "https://files.pythonhosted.org/packages/2a/d0/bd5ad792e78017f5decfb2ecc947422a3669a34f775679a76317af671ffc/numpy-2.2.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:1cf4e5c6a278d620dee9ddeb487dc6a860f9b199eadeecc567f777daace1e9e7", size = 20933623 }, + { url = "https://files.pythonhosted.org/packages/c3/bc/2b3545766337b95409868f8e62053135bdc7fa2ce630aba983a2aa60b559/numpy-2.2.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1974afec0b479e50438fc3648974268f972e2d908ddb6d7fb634598cdb8260a0", size = 14148681 }, + { url = "https://files.pythonhosted.org/packages/6a/70/67b24d68a56551d43a6ec9fe8c5f91b526d4c1a46a6387b956bf2d64744e/numpy-2.2.4-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:79bd5f0a02aa16808fcbc79a9a376a147cc1045f7dfe44c6e7d53fa8b8a79392", size = 5148759 }, + { url = "https://files.pythonhosted.org/packages/1c/8b/e2fc8a75fcb7be12d90b31477c9356c0cbb44abce7ffb36be39a0017afad/numpy-2.2.4-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:3387dd7232804b341165cedcb90694565a6015433ee076c6754775e85d86f1fc", size = 6683092 }, + { url = "https://files.pythonhosted.org/packages/13/73/41b7b27f169ecf368b52533edb72e56a133f9e86256e809e169362553b49/numpy-2.2.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6f527d8fdb0286fd2fd97a2a96c6be17ba4232da346931d967a0630050dfd298", size = 14081422 }, + { url = "https://files.pythonhosted.org/packages/4b/04/e208ff3ae3ddfbafc05910f89546382f15a3f10186b1f56bd99f159689c2/numpy-2.2.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bce43e386c16898b91e162e5baaad90c4b06f9dcbe36282490032cec98dc8ae7", size = 16132202 }, + { url = "https://files.pythonhosted.org/packages/fe/bc/2218160574d862d5e55f803d88ddcad88beff94791f9c5f86d67bd8fbf1c/numpy-2.2.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:31504f970f563d99f71a3512d0c01a645b692b12a63630d6aafa0939e52361e6", size = 15573131 }, + { url = "https://files.pythonhosted.org/packages/a5/78/97c775bc4f05abc8a8426436b7cb1be806a02a2994b195945600855e3a25/numpy-2.2.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:81413336ef121a6ba746892fad881a83351ee3e1e4011f52e97fba79233611fd", size = 17894270 }, + { url = "https://files.pythonhosted.org/packages/b9/eb/38c06217a5f6de27dcb41524ca95a44e395e6a1decdc0c99fec0832ce6ae/numpy-2.2.4-cp313-cp313-win32.whl", hash = "sha256:f486038e44caa08dbd97275a9a35a283a8f1d2f0ee60ac260a1790e76660833c", size = 6308141 }, + { url = "https://files.pythonhosted.org/packages/52/17/d0dd10ab6d125c6d11ffb6dfa3423c3571befab8358d4f85cd4471964fcd/numpy-2.2.4-cp313-cp313-win_amd64.whl", hash = "sha256:207a2b8441cc8b6a2a78c9ddc64d00d20c303d79fba08c577752f080c4007ee3", size = 12636885 }, + { url = "https://files.pythonhosted.org/packages/fa/e2/793288ede17a0fdc921172916efb40f3cbc2aa97e76c5c84aba6dc7e8747/numpy-2.2.4-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:8120575cb4882318c791f839a4fd66161a6fa46f3f0a5e613071aae35b5dd8f8", size = 20961829 }, + { url = "https://files.pythonhosted.org/packages/3a/75/bb4573f6c462afd1ea5cbedcc362fe3e9bdbcc57aefd37c681be1155fbaa/numpy-2.2.4-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a761ba0fa886a7bb33c6c8f6f20213735cb19642c580a931c625ee377ee8bd39", size = 14161419 }, + { url = "https://files.pythonhosted.org/packages/03/68/07b4cd01090ca46c7a336958b413cdbe75002286295f2addea767b7f16c9/numpy-2.2.4-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:ac0280f1ba4a4bfff363a99a6aceed4f8e123f8a9b234c89140f5e894e452ecd", size = 5196414 }, + { url = "https://files.pythonhosted.org/packages/a5/fd/d4a29478d622fedff5c4b4b4cedfc37a00691079623c0575978d2446db9e/numpy-2.2.4-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:879cf3a9a2b53a4672a168c21375166171bc3932b7e21f622201811c43cdd3b0", size = 6709379 }, + { url = "https://files.pythonhosted.org/packages/41/78/96dddb75bb9be730b87c72f30ffdd62611aba234e4e460576a068c98eff6/numpy-2.2.4-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f05d4198c1bacc9124018109c5fba2f3201dbe7ab6e92ff100494f236209c960", size = 14051725 }, + { url = "https://files.pythonhosted.org/packages/00/06/5306b8199bffac2a29d9119c11f457f6c7d41115a335b78d3f86fad4dbe8/numpy-2.2.4-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2f085ce2e813a50dfd0e01fbfc0c12bbe5d2063d99f8b29da30e544fb6483b8", size = 16101638 }, + { url = "https://files.pythonhosted.org/packages/fa/03/74c5b631ee1ded596945c12027649e6344614144369fd3ec1aaced782882/numpy-2.2.4-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:92bda934a791c01d6d9d8e038363c50918ef7c40601552a58ac84c9613a665bc", size = 15571717 }, + { url = "https://files.pythonhosted.org/packages/cb/dc/4fc7c0283abe0981e3b89f9b332a134e237dd476b0c018e1e21083310c31/numpy-2.2.4-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:ee4d528022f4c5ff67332469e10efe06a267e32f4067dc76bb7e2cddf3cd25ff", size = 17879998 }, + { url = "https://files.pythonhosted.org/packages/e5/2b/878576190c5cfa29ed896b518cc516aecc7c98a919e20706c12480465f43/numpy-2.2.4-cp313-cp313t-win32.whl", hash = "sha256:05c076d531e9998e7e694c36e8b349969c56eadd2cdcd07242958489d79a7286", size = 6366896 }, + { url = "https://files.pythonhosted.org/packages/3e/05/eb7eec66b95cf697f08c754ef26c3549d03ebd682819f794cb039574a0a6/numpy-2.2.4-cp313-cp313t-win_amd64.whl", hash = "sha256:188dcbca89834cc2e14eb2f106c96d6d46f200fe0200310fc29089657379c58d", size = 12739119 }, +] + +[[package]] +name = "packaging" +version = "24.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f", size = 163950 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759", size = 65451 }, +] + +[[package]] +name = "pandas" +version = "2.2.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy" }, + { name = "python-dateutil" }, + { name = "pytz" }, + { name = "tzdata" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/9c/d6/9f8431bacc2e19dca897724cd097b1bb224a6ad5433784a44b587c7c13af/pandas-2.2.3.tar.gz", hash = "sha256:4f18ba62b61d7e192368b84517265a99b4d7ee8912f8708660fb4a366cc82667", size = 4399213 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/17/a3/fb2734118db0af37ea7433f57f722c0a56687e14b14690edff0cdb4b7e58/pandas-2.2.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b1d432e8d08679a40e2a6d8b2f9770a5c21793a6f9f47fdd52c5ce1948a5a8a9", size = 12529893 }, + { url = "https://files.pythonhosted.org/packages/e1/0c/ad295fd74bfac85358fd579e271cded3ac969de81f62dd0142c426b9da91/pandas-2.2.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a5a1595fe639f5988ba6a8e5bc9649af3baf26df3998a0abe56c02609392e0a4", size = 11363475 }, + { url = "https://files.pythonhosted.org/packages/c6/2a/4bba3f03f7d07207481fed47f5b35f556c7441acddc368ec43d6643c5777/pandas-2.2.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5de54125a92bb4d1c051c0659e6fcb75256bf799a732a87184e5ea503965bce3", size = 15188645 }, + { url = "https://files.pythonhosted.org/packages/38/f8/d8fddee9ed0d0c0f4a2132c1dfcf0e3e53265055da8df952a53e7eaf178c/pandas-2.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fffb8ae78d8af97f849404f21411c95062db1496aeb3e56f146f0355c9989319", size = 12739445 }, + { url = "https://files.pythonhosted.org/packages/20/e8/45a05d9c39d2cea61ab175dbe6a2de1d05b679e8de2011da4ee190d7e748/pandas-2.2.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6dfcb5ee8d4d50c06a51c2fffa6cff6272098ad6540aed1a76d15fb9318194d8", size = 16359235 }, + { url = "https://files.pythonhosted.org/packages/1d/99/617d07a6a5e429ff90c90da64d428516605a1ec7d7bea494235e1c3882de/pandas-2.2.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:062309c1b9ea12a50e8ce661145c6aab431b1e99530d3cd60640e255778bd43a", size = 14056756 }, + { url = "https://files.pythonhosted.org/packages/29/d4/1244ab8edf173a10fd601f7e13b9566c1b525c4f365d6bee918e68381889/pandas-2.2.3-cp312-cp312-win_amd64.whl", hash = "sha256:59ef3764d0fe818125a5097d2ae867ca3fa64df032331b7e0917cf5d7bf66b13", size = 11504248 }, + { url = "https://files.pythonhosted.org/packages/64/22/3b8f4e0ed70644e85cfdcd57454686b9057c6c38d2f74fe4b8bc2527214a/pandas-2.2.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f00d1345d84d8c86a63e476bb4955e46458b304b9575dcf71102b5c705320015", size = 12477643 }, + { url = "https://files.pythonhosted.org/packages/e4/93/b3f5d1838500e22c8d793625da672f3eec046b1a99257666c94446969282/pandas-2.2.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3508d914817e153ad359d7e069d752cdd736a247c322d932eb89e6bc84217f28", size = 11281573 }, + { url = "https://files.pythonhosted.org/packages/f5/94/6c79b07f0e5aab1dcfa35a75f4817f5c4f677931d4234afcd75f0e6a66ca/pandas-2.2.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:22a9d949bfc9a502d320aa04e5d02feab689d61da4e7764b62c30b991c42c5f0", size = 15196085 }, + { url = "https://files.pythonhosted.org/packages/e8/31/aa8da88ca0eadbabd0a639788a6da13bb2ff6edbbb9f29aa786450a30a91/pandas-2.2.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f3a255b2c19987fbbe62a9dfd6cff7ff2aa9ccab3fc75218fd4b7530f01efa24", size = 12711809 }, + { url = "https://files.pythonhosted.org/packages/ee/7c/c6dbdb0cb2a4344cacfb8de1c5808ca885b2e4dcfde8008266608f9372af/pandas-2.2.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:800250ecdadb6d9c78eae4990da62743b857b470883fa27f652db8bdde7f6659", size = 16356316 }, + { url = "https://files.pythonhosted.org/packages/57/b7/8b757e7d92023b832869fa8881a992696a0bfe2e26f72c9ae9f255988d42/pandas-2.2.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6374c452ff3ec675a8f46fd9ab25c4ad0ba590b71cf0656f8b6daa5202bca3fb", size = 14022055 }, + { url = "https://files.pythonhosted.org/packages/3b/bc/4b18e2b8c002572c5a441a64826252ce5da2aa738855747247a971988043/pandas-2.2.3-cp313-cp313-win_amd64.whl", hash = "sha256:61c5ad4043f791b61dd4752191d9f07f0ae412515d59ba8f005832a532f8736d", size = 11481175 }, + { url = "https://files.pythonhosted.org/packages/76/a3/a5d88146815e972d40d19247b2c162e88213ef51c7c25993942c39dbf41d/pandas-2.2.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:3b71f27954685ee685317063bf13c7709a7ba74fc996b84fc6821c59b0f06468", size = 12615650 }, + { url = "https://files.pythonhosted.org/packages/9c/8c/f0fd18f6140ddafc0c24122c8a964e48294acc579d47def376fef12bcb4a/pandas-2.2.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:38cf8125c40dae9d5acc10fa66af8ea6fdf760b2714ee482ca691fc66e6fcb18", size = 11290177 }, + { url = "https://files.pythonhosted.org/packages/ed/f9/e995754eab9c0f14c6777401f7eece0943840b7a9fc932221c19d1abee9f/pandas-2.2.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ba96630bc17c875161df3818780af30e43be9b166ce51c9a18c1feae342906c2", size = 14651526 }, + { url = "https://files.pythonhosted.org/packages/25/b0/98d6ae2e1abac4f35230aa756005e8654649d305df9a28b16b9ae4353bff/pandas-2.2.3-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1db71525a1538b30142094edb9adc10be3f3e176748cd7acc2240c2f2e5aa3a4", size = 11871013 }, + { url = "https://files.pythonhosted.org/packages/cc/57/0f72a10f9db6a4628744c8e8f0df4e6e21de01212c7c981d31e50ffc8328/pandas-2.2.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:15c0e1e02e93116177d29ff83e8b1619c93ddc9c49083f237d4312337a61165d", size = 15711620 }, + { url = "https://files.pythonhosted.org/packages/ab/5f/b38085618b950b79d2d9164a711c52b10aefc0ae6833b96f626b7021b2ed/pandas-2.2.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:ad5b65698ab28ed8d7f18790a0dc58005c7629f227be9ecc1072aa74c0c1d43a", size = 13098436 }, +] + +[[package]] +name = "parso" +version = "0.8.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/66/94/68e2e17afaa9169cf6412ab0f28623903be73d1b32e208d9e8e541bb086d/parso-0.8.4.tar.gz", hash = "sha256:eb3a7b58240fb99099a345571deecc0f9540ea5f4dd2fe14c2a99d6b281ab92d", size = 400609 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c6/ac/dac4a63f978e4dcb3c6d3a78c4d8e0192a113d288502a1216950c41b1027/parso-0.8.4-py2.py3-none-any.whl", hash = "sha256:a418670a20291dacd2dddc80c377c5c3791378ee1e8d12bffc35420643d43f18", size = 103650 }, +] + +[[package]] +name = "pathspec" +version = "0.12.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712", size = 51043 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cc/20/ff623b09d963f88bfde16306a54e12ee5ea43e9b597108672ff3a408aad6/pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08", size = 31191 }, +] + +[[package]] +name = "patsy" +version = "1.0.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/d1/81/74f6a65b848ffd16c18f920620ce999fe45fe27f01ab3911260ce4ed85e4/patsy-1.0.1.tar.gz", hash = "sha256:e786a9391eec818c054e359b737bbce692f051aee4c661f4141cc88fb459c0c4", size = 396010 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/87/2b/b50d3d08ea0fc419c183a84210571eba005328efa62b6b98bc28e9ead32a/patsy-1.0.1-py2.py3-none-any.whl", hash = "sha256:751fb38f9e97e62312e921a1954b81e1bb2bcda4f5eeabaf94db251ee791509c", size = 232923 }, +] + +[[package]] +name = "pexpect" +version = "4.9.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "ptyprocess" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f", size = 166450 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9e/c3/059298687310d527a58bb01f3b1965787ee3b40dce76752eda8b44e9a2c5/pexpect-4.9.0-py2.py3-none-any.whl", hash = "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523", size = 63772 }, +] + +[[package]] +name = "pillow" +version = "11.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f3/af/c097e544e7bd278333db77933e535098c259609c4eb3b85381109602fb5b/pillow-11.1.0.tar.gz", hash = "sha256:368da70808b36d73b4b390a8ffac11069f8a5c85f29eff1f1b01bcf3ef5b2a20", size = 46742715 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/95/20/9ce6ed62c91c073fcaa23d216e68289e19d95fb8188b9fb7a63d36771db8/pillow-11.1.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:2062ffb1d36544d42fcaa277b069c88b01bb7298f4efa06731a7fd6cc290b81a", size = 3226818 }, + { url = "https://files.pythonhosted.org/packages/b9/d8/f6004d98579a2596c098d1e30d10b248798cceff82d2b77aa914875bfea1/pillow-11.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a85b653980faad27e88b141348707ceeef8a1186f75ecc600c395dcac19f385b", size = 3101662 }, + { url = "https://files.pythonhosted.org/packages/08/d9/892e705f90051c7a2574d9f24579c9e100c828700d78a63239676f960b74/pillow-11.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9409c080586d1f683df3f184f20e36fb647f2e0bc3988094d4fd8c9f4eb1b3b3", size = 4329317 }, + { url = "https://files.pythonhosted.org/packages/8c/aa/7f29711f26680eab0bcd3ecdd6d23ed6bce180d82e3f6380fb7ae35fcf3b/pillow-11.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7fdadc077553621911f27ce206ffcbec7d3f8d7b50e0da39f10997e8e2bb7f6a", size = 4412999 }, + { url = "https://files.pythonhosted.org/packages/c8/c4/8f0fe3b9e0f7196f6d0bbb151f9fba323d72a41da068610c4c960b16632a/pillow-11.1.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:93a18841d09bcdd774dcdc308e4537e1f867b3dec059c131fde0327899734aa1", size = 4368819 }, + { url = "https://files.pythonhosted.org/packages/38/0d/84200ed6a871ce386ddc82904bfadc0c6b28b0c0ec78176871a4679e40b3/pillow-11.1.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:9aa9aeddeed452b2f616ff5507459e7bab436916ccb10961c4a382cd3e03f47f", size = 4496081 }, + { url = "https://files.pythonhosted.org/packages/84/9c/9bcd66f714d7e25b64118e3952d52841a4babc6d97b6d28e2261c52045d4/pillow-11.1.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3cdcdb0b896e981678eee140d882b70092dac83ac1cdf6b3a60e2216a73f2b91", size = 4296513 }, + { url = "https://files.pythonhosted.org/packages/db/61/ada2a226e22da011b45f7104c95ebda1b63dcbb0c378ad0f7c2a710f8fd2/pillow-11.1.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:36ba10b9cb413e7c7dfa3e189aba252deee0602c86c309799da5a74009ac7a1c", size = 4431298 }, + { url = "https://files.pythonhosted.org/packages/e7/c4/fc6e86750523f367923522014b821c11ebc5ad402e659d8c9d09b3c9d70c/pillow-11.1.0-cp312-cp312-win32.whl", hash = "sha256:cfd5cd998c2e36a862d0e27b2df63237e67273f2fc78f47445b14e73a810e7e6", size = 2291630 }, + { url = "https://files.pythonhosted.org/packages/08/5c/2104299949b9d504baf3f4d35f73dbd14ef31bbd1ddc2c1b66a5b7dfda44/pillow-11.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:a697cd8ba0383bba3d2d3ada02b34ed268cb548b369943cd349007730c92bddf", size = 2626369 }, + { url = "https://files.pythonhosted.org/packages/37/f3/9b18362206b244167c958984b57c7f70a0289bfb59a530dd8af5f699b910/pillow-11.1.0-cp312-cp312-win_arm64.whl", hash = "sha256:4dd43a78897793f60766563969442020e90eb7847463eca901e41ba186a7d4a5", size = 2375240 }, + { url = "https://files.pythonhosted.org/packages/b3/31/9ca79cafdce364fd5c980cd3416c20ce1bebd235b470d262f9d24d810184/pillow-11.1.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:ae98e14432d458fc3de11a77ccb3ae65ddce70f730e7c76140653048c71bfcbc", size = 3226640 }, + { url = "https://files.pythonhosted.org/packages/ac/0f/ff07ad45a1f172a497aa393b13a9d81a32e1477ef0e869d030e3c1532521/pillow-11.1.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:cc1331b6d5a6e144aeb5e626f4375f5b7ae9934ba620c0ac6b3e43d5e683a0f0", size = 3101437 }, + { url = "https://files.pythonhosted.org/packages/08/2f/9906fca87a68d29ec4530be1f893149e0cb64a86d1f9f70a7cfcdfe8ae44/pillow-11.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:758e9d4ef15d3560214cddbc97b8ef3ef86ce04d62ddac17ad39ba87e89bd3b1", size = 4326605 }, + { url = "https://files.pythonhosted.org/packages/b0/0f/f3547ee15b145bc5c8b336401b2d4c9d9da67da9dcb572d7c0d4103d2c69/pillow-11.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b523466b1a31d0dcef7c5be1f20b942919b62fd6e9a9be199d035509cbefc0ec", size = 4411173 }, + { url = "https://files.pythonhosted.org/packages/b1/df/bf8176aa5db515c5de584c5e00df9bab0713548fd780c82a86cba2c2fedb/pillow-11.1.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:9044b5e4f7083f209c4e35aa5dd54b1dd5b112b108648f5c902ad586d4f945c5", size = 4369145 }, + { url = "https://files.pythonhosted.org/packages/de/7c/7433122d1cfadc740f577cb55526fdc39129a648ac65ce64db2eb7209277/pillow-11.1.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:3764d53e09cdedd91bee65c2527815d315c6b90d7b8b79759cc48d7bf5d4f114", size = 4496340 }, + { url = "https://files.pythonhosted.org/packages/25/46/dd94b93ca6bd555588835f2504bd90c00d5438fe131cf01cfa0c5131a19d/pillow-11.1.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:31eba6bbdd27dde97b0174ddf0297d7a9c3a507a8a1480e1e60ef914fe23d352", size = 4296906 }, + { url = "https://files.pythonhosted.org/packages/a8/28/2f9d32014dfc7753e586db9add35b8a41b7a3b46540e965cb6d6bc607bd2/pillow-11.1.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b5d658fbd9f0d6eea113aea286b21d3cd4d3fd978157cbf2447a6035916506d3", size = 4431759 }, + { url = "https://files.pythonhosted.org/packages/33/48/19c2cbe7403870fbe8b7737d19eb013f46299cdfe4501573367f6396c775/pillow-11.1.0-cp313-cp313-win32.whl", hash = "sha256:f86d3a7a9af5d826744fabf4afd15b9dfef44fe69a98541f666f66fbb8d3fef9", size = 2291657 }, + { url = "https://files.pythonhosted.org/packages/3b/ad/285c556747d34c399f332ba7c1a595ba245796ef3e22eae190f5364bb62b/pillow-11.1.0-cp313-cp313-win_amd64.whl", hash = "sha256:593c5fd6be85da83656b93ffcccc2312d2d149d251e98588b14fbc288fd8909c", size = 2626304 }, + { url = "https://files.pythonhosted.org/packages/e5/7b/ef35a71163bf36db06e9c8729608f78dedf032fc8313d19bd4be5c2588f3/pillow-11.1.0-cp313-cp313-win_arm64.whl", hash = "sha256:11633d58b6ee5733bde153a8dafd25e505ea3d32e261accd388827ee987baf65", size = 2375117 }, + { url = "https://files.pythonhosted.org/packages/79/30/77f54228401e84d6791354888549b45824ab0ffde659bafa67956303a09f/pillow-11.1.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:70ca5ef3b3b1c4a0812b5c63c57c23b63e53bc38e758b37a951e5bc466449861", size = 3230060 }, + { url = "https://files.pythonhosted.org/packages/ce/b1/56723b74b07dd64c1010fee011951ea9c35a43d8020acd03111f14298225/pillow-11.1.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:8000376f139d4d38d6851eb149b321a52bb8893a88dae8ee7d95840431977081", size = 3106192 }, + { url = "https://files.pythonhosted.org/packages/e1/cd/7bf7180e08f80a4dcc6b4c3a0aa9e0b0ae57168562726a05dc8aa8fa66b0/pillow-11.1.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9ee85f0696a17dd28fbcfceb59f9510aa71934b483d1f5601d1030c3c8304f3c", size = 4446805 }, + { url = "https://files.pythonhosted.org/packages/97/42/87c856ea30c8ed97e8efbe672b58c8304dee0573f8c7cab62ae9e31db6ae/pillow-11.1.0-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:dd0e081319328928531df7a0e63621caf67652c8464303fd102141b785ef9547", size = 4530623 }, + { url = "https://files.pythonhosted.org/packages/ff/41/026879e90c84a88e33fb00cc6bd915ac2743c67e87a18f80270dfe3c2041/pillow-11.1.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:e63e4e5081de46517099dc30abe418122f54531a6ae2ebc8680bcd7096860eab", size = 4465191 }, + { url = "https://files.pythonhosted.org/packages/e5/fb/a7960e838bc5df57a2ce23183bfd2290d97c33028b96bde332a9057834d3/pillow-11.1.0-cp313-cp313t-win32.whl", hash = "sha256:dda60aa465b861324e65a78c9f5cf0f4bc713e4309f83bc387be158b077963d9", size = 2295494 }, + { url = "https://files.pythonhosted.org/packages/d7/6c/6ec83ee2f6f0fda8d4cf89045c6be4b0373ebfc363ba8538f8c999f63fcd/pillow-11.1.0-cp313-cp313t-win_amd64.whl", hash = "sha256:ad5db5781c774ab9a9b2c4302bbf0c1014960a0a7be63278d13ae6fdf88126fe", size = 2631595 }, + { url = "https://files.pythonhosted.org/packages/cf/6c/41c21c6c8af92b9fea313aa47c75de49e2f9a467964ee33eb0135d47eb64/pillow-11.1.0-cp313-cp313t-win_arm64.whl", hash = "sha256:67cd427c68926108778a9005f2a04adbd5e67c442ed21d95389fe1d595458756", size = 2377651 }, +] + +[[package]] +name = "platformdirs" +version = "4.3.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907", size = 21302 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3c/a6/bc1012356d8ece4d66dd75c4b9fc6c1f6650ddd5991e421177d9f8f671be/platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb", size = 18439 }, +] + +[[package]] +name = "plotly" +version = "6.0.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "narwhals" }, + { name = "packaging" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c7/cc/e41b5f697ae403f0b50e47b7af2e36642a193085f553bf7cc1169362873a/plotly-6.0.1.tar.gz", hash = "sha256:dd8400229872b6e3c964b099be699f8d00c489a974f2cfccfad5e8240873366b", size = 8094643 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/02/65/ad2bc85f7377f5cfba5d4466d5474423a3fb7f6a97fd807c06f92dd3e721/plotly-6.0.1-py3-none-any.whl", hash = "sha256:4714db20fea57a435692c548a4eb4fae454f7daddf15f8d8ba7e1045681d7768", size = 14805757 }, +] + +[[package]] +name = "plotnine" +version = "0.14.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "matplotlib" }, + { name = "mizani" }, + { name = "numpy" }, + { name = "pandas" }, + { name = "scipy" }, + { name = "statsmodels" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/5d/0e/618bfa724ad19418c83eb22cdc4332dc69bb67f47094bd013ffe15e188d2/plotnine-0.14.5.tar.gz", hash = "sha256:9e75969e8e10d8d770a4be36d10e075cc10b88ca6fcc99e36ada53436fb5653f", size = 6424617 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4d/c5/7cfda7ba9fa02243367fbfb4880b6de8039266f22c47c2dbbd39b6adc46f/plotnine-0.14.5-py3-none-any.whl", hash = "sha256:4a8bc4360732dd69a0263def4abab285ed8f0f4386186f1e44c642f2cea79b88", size = 1301197 }, +] + +[[package]] +name = "prompt-toolkit" +version = "3.0.50" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "wcwidth" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a1/e1/bd15cb8ffdcfeeb2bdc215de3c3cffca11408d829e4b8416dcfe71ba8854/prompt_toolkit-3.0.50.tar.gz", hash = "sha256:544748f3860a2623ca5cd6d2795e7a14f3d0e1c3c9728359013f79877fc89bab", size = 429087 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e4/ea/d836f008d33151c7a1f62caf3d8dd782e4d15f6a43897f64480c2b8de2ad/prompt_toolkit-3.0.50-py3-none-any.whl", hash = "sha256:9b6427eb19e479d98acff65196a307c555eb567989e6d88ebbb1b509d9779198", size = 387816 }, +] + +[[package]] +name = "psutil" +version = "7.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/2a/80/336820c1ad9286a4ded7e845b2eccfcb27851ab8ac6abece774a6ff4d3de/psutil-7.0.0.tar.gz", hash = "sha256:7be9c3eba38beccb6495ea33afd982a44074b78f28c434a1f51cc07fd315c456", size = 497003 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ed/e6/2d26234410f8b8abdbf891c9da62bee396583f713fb9f3325a4760875d22/psutil-7.0.0-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:101d71dc322e3cffd7cea0650b09b3d08b8e7c4109dd6809fe452dfd00e58b25", size = 238051 }, + { url = "https://files.pythonhosted.org/packages/04/8b/30f930733afe425e3cbfc0e1468a30a18942350c1a8816acfade80c005c4/psutil-7.0.0-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:39db632f6bb862eeccf56660871433e111b6ea58f2caea825571951d4b6aa3da", size = 239535 }, + { url = "https://files.pythonhosted.org/packages/2a/ed/d362e84620dd22876b55389248e522338ed1bf134a5edd3b8231d7207f6d/psutil-7.0.0-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1fcee592b4c6f146991ca55919ea3d1f8926497a713ed7faaf8225e174581e91", size = 275004 }, + { url = "https://files.pythonhosted.org/packages/bf/b9/b0eb3f3cbcb734d930fdf839431606844a825b23eaf9a6ab371edac8162c/psutil-7.0.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b1388a4f6875d7e2aff5c4ca1cc16c545ed41dd8bb596cefea80111db353a34", size = 277986 }, + { url = "https://files.pythonhosted.org/packages/eb/a2/709e0fe2f093556c17fbafda93ac032257242cabcc7ff3369e2cb76a97aa/psutil-7.0.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5f098451abc2828f7dc6b58d44b532b22f2088f4999a937557b603ce72b1993", size = 279544 }, + { url = "https://files.pythonhosted.org/packages/50/e6/eecf58810b9d12e6427369784efe814a1eec0f492084ce8eb8f4d89d6d61/psutil-7.0.0-cp37-abi3-win32.whl", hash = "sha256:ba3fcef7523064a6c9da440fc4d6bd07da93ac726b5733c29027d7dc95b39d99", size = 241053 }, + { url = "https://files.pythonhosted.org/packages/50/1b/6921afe68c74868b4c9fa424dad3be35b095e16687989ebbb50ce4fceb7c/psutil-7.0.0-cp37-abi3-win_amd64.whl", hash = "sha256:4cf3d4eb1aa9b348dec30105c55cd9b7d4629285735a102beb4441e38db90553", size = 244885 }, +] + +[[package]] +name = "ptyprocess" +version = "0.7.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220", size = 70762 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/22/a6/858897256d0deac81a172289110f31629fc4cee19b6f01283303e18c8db3/ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35", size = 13993 }, +] + +[[package]] +name = "pure-eval" +version = "0.2.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/cd/05/0a34433a064256a578f1783a10da6df098ceaa4a57bbeaa96a6c0352786b/pure_eval-0.2.3.tar.gz", hash = "sha256:5f4e983f40564c576c7c8635ae88db5956bb2229d7e9237d03b3c0b0190eaf42", size = 19752 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8e/37/efad0257dc6e593a18957422533ff0f87ede7c9c6ea010a2177d738fb82f/pure_eval-0.2.3-py3-none-any.whl", hash = "sha256:1db8e35b67b3d218d818ae653e27f06c3aa420901fa7b081ca98cbedc874e0d0", size = 11842 }, +] + +[[package]] +name = "pycparser" +version = "2.22" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6", size = 172736 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/13/a3/a812df4e2dd5696d1f351d58b8fe16a405b234ad2886a0dab9183fb78109/pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc", size = 117552 }, +] + +[[package]] +name = "pygments" +version = "2.19.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz", hash = "sha256:61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f", size = 4968581 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8a/0b/9fcc47d19c48b59121088dd6da2488a49d5f72dacf8262e2790a1d2c7d15/pygments-2.19.1-py3-none-any.whl", hash = "sha256:9ea1544ad55cecf4b8242fab6dd35a93bbce657034b0611ee383099054ab6d8c", size = 1225293 }, +] + +[[package]] +name = "pyparsing" +version = "3.2.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/8b/1a/3544f4f299a47911c2ab3710f534e52fea62a633c96806995da5d25be4b2/pyparsing-3.2.1.tar.gz", hash = "sha256:61980854fd66de3a90028d679a954d5f2623e83144b5afe5ee86f43d762e5f0a", size = 1067694 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1c/a7/c8a2d361bf89c0d9577c934ebb7421b25dc84bf3a8e3ac0a40aed9acc547/pyparsing-3.2.1-py3-none-any.whl", hash = "sha256:506ff4f4386c4cec0590ec19e6302d3aedb992fdc02c761e90416f158dacf8e1", size = 107716 }, +] + +[[package]] +name = "python-dateutil" +version = "2.9.0.post0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "six" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", size = 342432 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892 }, +] + +[[package]] +name = "pytz" +version = "2025.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/5f/57/df1c9157c8d5a05117e455d66fd7cf6dbc46974f832b1058ed4856785d8a/pytz-2025.1.tar.gz", hash = "sha256:c2db42be2a2518b28e65f9207c4d05e6ff547d1efa4086469ef855e4ab70178e", size = 319617 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/eb/38/ac33370d784287baa1c3d538978b5e2ea064d4c1b93ffbd12826c190dd10/pytz-2025.1-py2.py3-none-any.whl", hash = "sha256:89dd22dca55b46eac6eda23b2d72721bf1bdfef212645d81513ef5d03038de57", size = 507930 }, +] + +[[package]] +name = "pywin32" +version = "310" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6b/ec/4fdbe47932f671d6e348474ea35ed94227fb5df56a7c30cbbb42cd396ed0/pywin32-310-cp312-cp312-win32.whl", hash = "sha256:8a75a5cc3893e83a108c05d82198880704c44bbaee4d06e442e471d3c9ea4f3d", size = 8796239 }, + { url = "https://files.pythonhosted.org/packages/e3/e5/b0627f8bb84e06991bea89ad8153a9e50ace40b2e1195d68e9dff6b03d0f/pywin32-310-cp312-cp312-win_amd64.whl", hash = "sha256:bf5c397c9a9a19a6f62f3fb821fbf36cac08f03770056711f765ec1503972060", size = 9503839 }, + { url = "https://files.pythonhosted.org/packages/1f/32/9ccf53748df72301a89713936645a664ec001abd35ecc8578beda593d37d/pywin32-310-cp312-cp312-win_arm64.whl", hash = "sha256:2349cc906eae872d0663d4d6290d13b90621eaf78964bb1578632ff20e152966", size = 8459470 }, + { url = "https://files.pythonhosted.org/packages/1c/09/9c1b978ffc4ae53999e89c19c77ba882d9fce476729f23ef55211ea1c034/pywin32-310-cp313-cp313-win32.whl", hash = "sha256:5d241a659c496ada3253cd01cfaa779b048e90ce4b2b38cd44168ad555ce74ab", size = 8794384 }, + { url = "https://files.pythonhosted.org/packages/45/3c/b4640f740ffebadd5d34df35fecba0e1cfef8fde9f3e594df91c28ad9b50/pywin32-310-cp313-cp313-win_amd64.whl", hash = "sha256:667827eb3a90208ddbdcc9e860c81bde63a135710e21e4cb3348968e4bd5249e", size = 9503039 }, + { url = "https://files.pythonhosted.org/packages/b4/f4/f785020090fb050e7fb6d34b780f2231f302609dc964672f72bfaeb59a28/pywin32-310-cp313-cp313-win_arm64.whl", hash = "sha256:e308f831de771482b7cf692a1f308f8fca701b2d8f9dde6cc440c7da17e47b33", size = 8458152 }, +] + +[[package]] +name = "pyzmq" +version = "26.3.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cffi", marker = "implementation_name == 'pypy'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3a/ed/c3876f3b3e8beba336214ce44e1efa1792dd537027cef24192ac2b077d7c/pyzmq-26.3.0.tar.gz", hash = "sha256:f1cd68b8236faab78138a8fc703f7ca0ad431b17a3fcac696358600d4e6243b3", size = 276733 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7b/03/7170c3814bb9106c1bca67700c731aaf1cd990fd2f0097c754acb600330e/pyzmq-26.3.0-cp312-cp312-macosx_10_15_universal2.whl", hash = "sha256:c80653332c6136da7f4d4e143975e74ac0fa14f851f716d90583bc19e8945cea", size = 1348354 }, + { url = "https://files.pythonhosted.org/packages/74/f3/908b17f9111cdc764aef1de3d36026a2984c46ed90c3c2c85f28b66142f0/pyzmq-26.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6e317ee1d4528a03506cb1c282cd9db73660a35b3564096de37de7350e7d87a7", size = 671056 }, + { url = "https://files.pythonhosted.org/packages/02/ad/afcb8484b65ceacd1609f709c2caeed31bd6c49261a7507cd5c175cc105f/pyzmq-26.3.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:943a22ebb3daacb45f76a9bcca9a7b74e7d94608c0c0505da30af900b998ca8d", size = 908597 }, + { url = "https://files.pythonhosted.org/packages/a1/b5/4eeeae0aaaa6ef0c74cfa8b2273b53382bd858df6d99485f2fc8211e7002/pyzmq-26.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3fc9e71490d989144981ea21ef4fdfaa7b6aa84aff9632d91c736441ce2f6b00", size = 865260 }, + { url = "https://files.pythonhosted.org/packages/74/6a/63db856e93e3a3c3dc98a1de28a902cf1b21c7b0d3856cd5931d7cfd30af/pyzmq-26.3.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:e281a8071a06888575a4eb523c4deeefdcd2f5fe4a2d47e02ac8bf3a5b49f695", size = 859916 }, + { url = "https://files.pythonhosted.org/packages/e1/ce/d522c9b46ee3746d4b98c81969c568c2c6296e931a65f2c87104b645654c/pyzmq-26.3.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:be77efd735bb1064605be8dec6e721141c1421ef0b115ef54e493a64e50e9a52", size = 1201368 }, + { url = "https://files.pythonhosted.org/packages/5a/56/29dcd3647a39e933eb489fda261a1e2700a59d4a9432889a85166e15651c/pyzmq-26.3.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:7a4ac2ffa34f1212dd586af90f4ba894e424f0cabb3a49cdcff944925640f6ac", size = 1512663 }, + { url = "https://files.pythonhosted.org/packages/6b/36/7c570698127a43398ed1b1832dada59496e633115016addbce5eda9938a6/pyzmq-26.3.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:ba698c7c252af83b6bba9775035263f0df5f807f0404019916d4b71af8161f66", size = 1411693 }, + { url = "https://files.pythonhosted.org/packages/de/54/51d39bef85a7cdbca36227f7defdbfcdc5011b8361a3bfc0e8df431f5a5d/pyzmq-26.3.0-cp312-cp312-win32.whl", hash = "sha256:214038aaa88e801e54c2ef0cfdb2e6df27eb05f67b477380a452b595c5ecfa37", size = 581244 }, + { url = "https://files.pythonhosted.org/packages/f2/6a/9512b11a1d0c5648534f03d5ab0c3222f55dc9c192029c1cb00a0ca044e2/pyzmq-26.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:bad7fe0372e505442482ca3ccbc0d6f38dae81b1650f57a0aa6bbee18e7df495", size = 643559 }, + { url = "https://files.pythonhosted.org/packages/27/9f/faf5c9cf91b61eeb82a5e919d024d3ac28a795c92cce817be264ccd757d3/pyzmq-26.3.0-cp312-cp312-win_arm64.whl", hash = "sha256:b7b578d604e79e99aa39495becea013fd043fa9f36e4b490efa951f3d847a24d", size = 557664 }, + { url = "https://files.pythonhosted.org/packages/37/16/97b8c5107bfccb39120e611671a452c9ff6e8626fb3f8d4c15afd652b6ae/pyzmq-26.3.0-cp313-cp313-macosx_10_15_universal2.whl", hash = "sha256:fa85953df84beb7b8b73cb3ec3f5d92b62687a09a8e71525c6734e020edf56fd", size = 1345691 }, + { url = "https://files.pythonhosted.org/packages/a5/61/d5572d95040c0bb5b31eed5b23f3f0f992d94e4e0de0cea62e3c7f3a85c1/pyzmq-26.3.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:209d09f0ab6ddbcebe64630d1e6ca940687e736f443c265ae15bc4bfad833597", size = 670622 }, + { url = "https://files.pythonhosted.org/packages/1c/0c/f0235d27388aacf4ed8bcc1d574f6f2f629da0a20610faa0a8e9d363c2b0/pyzmq-26.3.0-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d35cc1086f1d4f907df85c6cceb2245cb39a04f69c3f375993363216134d76d4", size = 908683 }, + { url = "https://files.pythonhosted.org/packages/cb/52/664828f9586c396b857eec088d208230463e3dc991a24df6adbad98fbaa3/pyzmq-26.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b380e9087078ba91e45fb18cdd0c25275ffaa045cf63c947be0ddae6186bc9d9", size = 865212 }, + { url = "https://files.pythonhosted.org/packages/2b/14/213b2967030b7d7aecc32dd453830f98799b3cbf2b10a40232e9f22a6520/pyzmq-26.3.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:6d64e74143587efe7c9522bb74d1448128fdf9897cc9b6d8b9927490922fd558", size = 860068 }, + { url = "https://files.pythonhosted.org/packages/aa/e5/ff50c8fade69d1c0469652832c626d1910668697642c10cb0e1b6183ef9a/pyzmq-26.3.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:efba4f53ac7752eea6d8ca38a4ddac579e6e742fba78d1e99c12c95cd2acfc64", size = 1201303 }, + { url = "https://files.pythonhosted.org/packages/9a/e2/fff5e483be95ccc11a05781323e001e63ec15daec1d0f6f08de72ca534db/pyzmq-26.3.0-cp313-cp313-musllinux_1_1_i686.whl", hash = "sha256:9b0137a1c40da3b7989839f9b78a44de642cdd1ce20dcef341de174c8d04aa53", size = 1512892 }, + { url = "https://files.pythonhosted.org/packages/21/75/cc44d276e43136e5692e487c3c019f816e11ed445261e434217c28cc98c4/pyzmq-26.3.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:a995404bd3982c089e57b428c74edd5bfc3b0616b3dbcd6a8e270f1ee2110f36", size = 1411736 }, + { url = "https://files.pythonhosted.org/packages/ee/1c/d070cbc9a7961fe772641c51bb3798d88cb1f8e20ca718407363462624cf/pyzmq-26.3.0-cp313-cp313-win32.whl", hash = "sha256:240b1634b9e530ef6a277d95cbca1a6922f44dfddc5f0a3cd6c722a8de867f14", size = 581214 }, + { url = "https://files.pythonhosted.org/packages/38/d3/91082f1151ff5b54e0bed40eb1a26f418530ab07ecaec4dbb83e3d9fa9a9/pyzmq-26.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:fe67291775ea4c2883764ba467eb389c29c308c56b86c1e19e49c9e1ed0cbeca", size = 643412 }, + { url = "https://files.pythonhosted.org/packages/e0/cf/dabe68dfdf3e67bea6152eeec4b251cf899ee5b853cfb5c97e4719f9e6e9/pyzmq-26.3.0-cp313-cp313-win_arm64.whl", hash = "sha256:73ca9ae9a9011b714cf7650450cd9c8b61a135180b708904f1f0a05004543dce", size = 557444 }, + { url = "https://files.pythonhosted.org/packages/c0/56/e7576ac71c1566da4f4ec586351462a2bb202143fb074bf56df8fe85dcc3/pyzmq-26.3.0-cp313-cp313t-macosx_10_15_universal2.whl", hash = "sha256:fea7efbd7e49af9d7e5ed6c506dfc7de3d1a628790bd3a35fd0e3c904dc7d464", size = 1340288 }, + { url = "https://files.pythonhosted.org/packages/f1/ab/0bca97e94d420b5908968bc479e51c3686a9f80d8893450eefcd673b1b1d/pyzmq-26.3.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c4430c7cba23bb0e2ee203eee7851c1654167d956fc6d4b3a87909ccaf3c5825", size = 662462 }, + { url = "https://files.pythonhosted.org/packages/ee/be/99e89b55863808da322ac3ab52d8e135dcf2241094aaa468bfe2923d5194/pyzmq-26.3.0-cp313-cp313t-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:016d89bee8c7d566fad75516b4e53ec7c81018c062d4c51cd061badf9539be52", size = 896464 }, + { url = "https://files.pythonhosted.org/packages/38/d4/a4be06a313c8d6a5fe1d92975db30aca85f502e867fca392532e06a28c3c/pyzmq-26.3.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:04bfe59852d76d56736bfd10ac1d49d421ab8ed11030b4a0332900691507f557", size = 853432 }, + { url = "https://files.pythonhosted.org/packages/12/e6/e608b4c34106bbf5b3b382662ea90a43b2e23df0aa9c1f0fd4e21168d523/pyzmq-26.3.0-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:1fe05bd0d633a0f672bb28cb8b4743358d196792e1caf04973b7898a0d70b046", size = 845884 }, + { url = "https://files.pythonhosted.org/packages/c3/a9/d5e6355308ba529d9cd3576ee8bb3b2e2b726571748f515fbb8559401f5b/pyzmq-26.3.0-cp313-cp313t-musllinux_1_1_aarch64.whl", hash = "sha256:2aa1a9f236d5b835fb8642f27de95f9edcfd276c4bc1b6ffc84f27c6fb2e2981", size = 1191454 }, + { url = "https://files.pythonhosted.org/packages/6a/9a/a21dc6c73ac242e425709c1e0049368d8f5db5de7c1102a45f93f5c492b3/pyzmq-26.3.0-cp313-cp313t-musllinux_1_1_i686.whl", hash = "sha256:21399b31753bf321043ea60c360ed5052cc7be20739785b1dff1820f819e35b3", size = 1500397 }, + { url = "https://files.pythonhosted.org/packages/87/88/0236056156da0278c9ca2e2562463643597808b5bbd6c34009ba217e7e92/pyzmq-26.3.0-cp313-cp313t-musllinux_1_1_x86_64.whl", hash = "sha256:d015efcd96aca8882057e7e6f06224f79eecd22cad193d3e6a0a91ec67590d1f", size = 1398401 }, +] + +[[package]] +name = "rdrobust" +version = "1.3.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "matplotlib" }, + { name = "numpy" }, + { name = "pandas" }, + { name = "plotnine" }, + { name = "scikit-learn" }, + { name = "scipy" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/40/8a/e8ae926da333a82d597c874a59f888838616651de6bc815d9d78c2f76c64/rdrobust-1.3.0.tar.gz", hash = "sha256:994528ca6c7351b2ef8a1f9f57a524d8caa9d40f5f40f8a16c6533bd53109d53", size = 29187 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/90/d6/c2faba19eea47e62c9cb07abd9a4ef735d43d1f85ba562eb549b7540af12/rdrobust-1.3.0-py3-none-any.whl", hash = "sha256:611ae2c07dc4e7969596800987953747c7dd9a68c0536c86cb1c53af90b9a2de", size = 30285 }, +] + +[[package]] +name = "ruff" +version = "0.11.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/77/2b/7ca27e854d92df5e681e6527dc0f9254c9dc06c8408317893cf96c851cdd/ruff-0.11.0.tar.gz", hash = "sha256:e55c620690a4a7ee6f1cccb256ec2157dc597d109400ae75bbf944fc9d6462e2", size = 3799407 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/48/40/3d0340a9e5edc77d37852c0cd98c5985a5a8081fc3befaeb2ae90aaafd2b/ruff-0.11.0-py3-none-linux_armv6l.whl", hash = "sha256:dc67e32bc3b29557513eb7eeabb23efdb25753684b913bebb8a0c62495095acb", size = 10098158 }, + { url = "https://files.pythonhosted.org/packages/ec/a9/d8f5abb3b87b973b007649ac7bf63665a05b2ae2b2af39217b09f52abbbf/ruff-0.11.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:38c23fd9bdec4eb437b4c1e3595905a0a8edfccd63a790f818b28c78fe345639", size = 10879071 }, + { url = "https://files.pythonhosted.org/packages/ab/62/aaa198614c6211677913ec480415c5e6509586d7b796356cec73a2f8a3e6/ruff-0.11.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:7c8661b0be91a38bd56db593e9331beaf9064a79028adee2d5f392674bbc5e88", size = 10247944 }, + { url = "https://files.pythonhosted.org/packages/9f/52/59e0a9f2cf1ce5e6cbe336b6dd0144725c8ea3b97cac60688f4e7880bf13/ruff-0.11.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b6c0e8d3d2db7e9f6efd884f44b8dc542d5b6b590fc4bb334fdbc624d93a29a2", size = 10421725 }, + { url = "https://files.pythonhosted.org/packages/a6/c3/dcd71acc6dff72ce66d13f4be5bca1dbed4db678dff2f0f6f307b04e5c02/ruff-0.11.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3c3156d3f4b42e57247275a0a7e15a851c165a4fc89c5e8fa30ea6da4f7407b8", size = 9954435 }, + { url = "https://files.pythonhosted.org/packages/a6/9a/342d336c7c52dbd136dee97d4c7797e66c3f92df804f8f3b30da59b92e9c/ruff-0.11.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:490b1e147c1260545f6d041c4092483e3f6d8eba81dc2875eaebcf9140b53905", size = 11492664 }, + { url = "https://files.pythonhosted.org/packages/84/35/6e7defd2d7ca95cc385ac1bd9f7f2e4a61b9cc35d60a263aebc8e590c462/ruff-0.11.0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:1bc09a7419e09662983b1312f6fa5dab829d6ab5d11f18c3760be7ca521c9329", size = 12207856 }, + { url = "https://files.pythonhosted.org/packages/22/78/da669c8731bacf40001c880ada6d31bcfb81f89cc996230c3b80d319993e/ruff-0.11.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bcfa478daf61ac8002214eb2ca5f3e9365048506a9d52b11bea3ecea822bb844", size = 11645156 }, + { url = "https://files.pythonhosted.org/packages/ee/47/e27d17d83530a208f4a9ab2e94f758574a04c51e492aa58f91a3ed7cbbcb/ruff-0.11.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6fbb2aed66fe742a6a3a0075ed467a459b7cedc5ae01008340075909d819df1e", size = 13884167 }, + { url = "https://files.pythonhosted.org/packages/9f/5e/42ffbb0a5d4b07bbc642b7d58357b4e19a0f4774275ca6ca7d1f7b5452cd/ruff-0.11.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:92c0c1ff014351c0b0cdfdb1e35fa83b780f1e065667167bb9502d47ca41e6db", size = 11348311 }, + { url = "https://files.pythonhosted.org/packages/c8/51/dc3ce0c5ce1a586727a3444a32f98b83ba99599bb1ebca29d9302886e87f/ruff-0.11.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:e4fd5ff5de5f83e0458a138e8a869c7c5e907541aec32b707f57cf9a5e124445", size = 10305039 }, + { url = "https://files.pythonhosted.org/packages/60/e0/475f0c2f26280f46f2d6d1df1ba96b3399e0234cf368cc4c88e6ad10dcd9/ruff-0.11.0-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:96bc89a5c5fd21a04939773f9e0e276308be0935de06845110f43fd5c2e4ead7", size = 9937939 }, + { url = "https://files.pythonhosted.org/packages/e2/d3/3e61b7fd3e9cdd1e5b8c7ac188bec12975c824e51c5cd3d64caf81b0331e/ruff-0.11.0-py3-none-musllinux_1_2_i686.whl", hash = "sha256:a9352b9d767889ec5df1483f94870564e8102d4d7e99da52ebf564b882cdc2c7", size = 10923259 }, + { url = "https://files.pythonhosted.org/packages/30/32/cd74149ebb40b62ddd14bd2d1842149aeb7f74191fb0f49bd45c76909ff2/ruff-0.11.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:049a191969a10897fe052ef9cc7491b3ef6de79acd7790af7d7897b7a9bfbcb6", size = 11406212 }, + { url = "https://files.pythonhosted.org/packages/00/ef/033022a6b104be32e899b00de704d7c6d1723a54d4c9e09d147368f14b62/ruff-0.11.0-py3-none-win32.whl", hash = "sha256:3191e9116b6b5bbe187447656f0c8526f0d36b6fd89ad78ccaad6bdc2fad7df2", size = 10310905 }, + { url = "https://files.pythonhosted.org/packages/ed/8a/163f2e78c37757d035bd56cd60c8d96312904ca4a6deeab8442d7b3cbf89/ruff-0.11.0-py3-none-win_amd64.whl", hash = "sha256:c58bfa00e740ca0a6c43d41fb004cd22d165302f360aaa56f7126d544db31a21", size = 11411730 }, + { url = "https://files.pythonhosted.org/packages/4e/f7/096f6efabe69b49d7ca61052fc70289c05d8d35735c137ef5ba5ef423662/ruff-0.11.0-py3-none-win_arm64.whl", hash = "sha256:868364fc23f5aa122b00c6f794211e85f7e78f5dffdf7c590ab90b8c4e69b657", size = 10538956 }, +] + +[[package]] +name = "scikit-learn" +version = "1.5.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "joblib" }, + { name = "numpy" }, + { name = "scipy" }, + { name = "threadpoolctl" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/37/59/44985a2bdc95c74e34fef3d10cb5d93ce13b0e2a7baefffe1b53853b502d/scikit_learn-1.5.2.tar.gz", hash = "sha256:b4237ed7b3fdd0a4882792e68ef2545d5baa50aca3bb45aa7df468138ad8f94d", size = 7001680 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a4/db/b485c1ac54ff3bd9e7e6b39d3cc6609c4c76a65f52ab0a7b22b6c3ab0e9d/scikit_learn-1.5.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f932a02c3f4956dfb981391ab24bda1dbd90fe3d628e4b42caef3e041c67707a", size = 12110344 }, + { url = "https://files.pythonhosted.org/packages/54/1a/7deb52fa23aebb855431ad659b3c6a2e1709ece582cb3a63d66905e735fe/scikit_learn-1.5.2-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:3b923d119d65b7bd555c73be5423bf06c0105678ce7e1f558cb4b40b0a5502b1", size = 11033502 }, + { url = "https://files.pythonhosted.org/packages/a1/32/4a7a205b14c11225609b75b28402c196e4396ac754dab6a81971b811781c/scikit_learn-1.5.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f60021ec1574e56632be2a36b946f8143bf4e5e6af4a06d85281adc22938e0dd", size = 12085794 }, + { url = "https://files.pythonhosted.org/packages/c6/29/044048c5e911373827c0e1d3051321b9183b2a4f8d4e2f11c08fcff83f13/scikit_learn-1.5.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:394397841449853c2290a32050382edaec3da89e35b3e03d6cc966aebc6a8ae6", size = 12945797 }, + { url = "https://files.pythonhosted.org/packages/aa/ce/c0b912f2f31aeb1b756a6ba56bcd84dd1f8a148470526a48515a3f4d48cd/scikit_learn-1.5.2-cp312-cp312-win_amd64.whl", hash = "sha256:57cc1786cfd6bd118220a92ede80270132aa353647684efa385a74244a41e3b1", size = 10985467 }, + { url = "https://files.pythonhosted.org/packages/a4/50/8891028437858cc510e13578fe7046574a60c2aaaa92b02d64aac5b1b412/scikit_learn-1.5.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9a702e2de732bbb20d3bad29ebd77fc05a6b427dc49964300340e4c9328b3f5", size = 12025584 }, + { url = "https://files.pythonhosted.org/packages/d2/79/17feef8a1c14149436083bec0e61d7befb4812e272d5b20f9d79ea3e9ab1/scikit_learn-1.5.2-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:b0768ad641981f5d3a198430a1d31c3e044ed2e8a6f22166b4d546a5116d7908", size = 10959795 }, + { url = "https://files.pythonhosted.org/packages/b1/c8/f08313f9e2e656bd0905930ae8bf99a573ea21c34666a813b749c338202f/scikit_learn-1.5.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:178ddd0a5cb0044464fc1bfc4cca5b1833bfc7bb022d70b05db8530da4bb3dd3", size = 12077302 }, + { url = "https://files.pythonhosted.org/packages/a7/48/fbfb4dc72bed0fe31fe045fb30e924909ad03f717c36694351612973b1a9/scikit_learn-1.5.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f7284ade780084d94505632241bf78c44ab3b6f1e8ccab3d2af58e0e950f9c12", size = 13002811 }, + { url = "https://files.pythonhosted.org/packages/a5/e7/0c869f9e60d225a77af90d2aefa7a4a4c0e745b149325d1450f0f0ce5399/scikit_learn-1.5.2-cp313-cp313-win_amd64.whl", hash = "sha256:b7b0f9a0b1040830d38c39b91b3a44e1b643f4b36e36567b80b7c6bd2202a27f", size = 10951354 }, +] + +[[package]] +name = "scipy" +version = "1.15.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b7/b9/31ba9cd990e626574baf93fbc1ac61cf9ed54faafd04c479117517661637/scipy-1.15.2.tar.gz", hash = "sha256:cd58a314d92838f7e6f755c8a2167ead4f27e1fd5c1251fd54289569ef3495ec", size = 59417316 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4b/5d/3c78815cbab499610f26b5bae6aed33e227225a9fa5290008a733a64f6fc/scipy-1.15.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c4697a10da8f8765bb7c83e24a470da5797e37041edfd77fd95ba3811a47c4fd", size = 38756184 }, + { url = "https://files.pythonhosted.org/packages/37/20/3d04eb066b471b6e171827548b9ddb3c21c6bbea72a4d84fc5989933910b/scipy-1.15.2-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:869269b767d5ee7ea6991ed7e22b3ca1f22de73ab9a49c44bad338b725603301", size = 30163558 }, + { url = "https://files.pythonhosted.org/packages/a4/98/e5c964526c929ef1f795d4c343b2ff98634ad2051bd2bbadfef9e772e413/scipy-1.15.2-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:bad78d580270a4d32470563ea86c6590b465cb98f83d760ff5b0990cb5518a93", size = 22437211 }, + { url = "https://files.pythonhosted.org/packages/1d/cd/1dc7371e29195ecbf5222f9afeedb210e0a75057d8afbd942aa6cf8c8eca/scipy-1.15.2-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:b09ae80010f52efddb15551025f9016c910296cf70adbf03ce2a8704f3a5ad20", size = 25232260 }, + { url = "https://files.pythonhosted.org/packages/f0/24/1a181a9e5050090e0b5138c5f496fee33293c342b788d02586bc410c6477/scipy-1.15.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5a6fd6eac1ce74a9f77a7fc724080d507c5812d61e72bd5e4c489b042455865e", size = 35198095 }, + { url = "https://files.pythonhosted.org/packages/c0/53/eaada1a414c026673eb983f8b4a55fe5eb172725d33d62c1b21f63ff6ca4/scipy-1.15.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2b871df1fe1a3ba85d90e22742b93584f8d2b8e6124f8372ab15c71b73e428b8", size = 37297371 }, + { url = "https://files.pythonhosted.org/packages/e9/06/0449b744892ed22b7e7b9a1994a866e64895363572677a316a9042af1fe5/scipy-1.15.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:03205d57a28e18dfd39f0377d5002725bf1f19a46f444108c29bdb246b6c8a11", size = 36872390 }, + { url = "https://files.pythonhosted.org/packages/6a/6f/a8ac3cfd9505ec695c1bc35edc034d13afbd2fc1882a7c6b473e280397bb/scipy-1.15.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:601881dfb761311045b03114c5fe718a12634e5608c3b403737ae463c9885d53", size = 39700276 }, + { url = "https://files.pythonhosted.org/packages/f5/6f/e6e5aff77ea2a48dd96808bb51d7450875af154ee7cbe72188afb0b37929/scipy-1.15.2-cp312-cp312-win_amd64.whl", hash = "sha256:e7c68b6a43259ba0aab737237876e5c2c549a031ddb7abc28c7b47f22e202ded", size = 40942317 }, + { url = "https://files.pythonhosted.org/packages/53/40/09319f6e0f276ea2754196185f95cd191cb852288440ce035d5c3a931ea2/scipy-1.15.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:01edfac9f0798ad6b46d9c4c9ca0e0ad23dbf0b1eb70e96adb9fa7f525eff0bf", size = 38717587 }, + { url = "https://files.pythonhosted.org/packages/fe/c3/2854f40ecd19585d65afaef601e5e1f8dbf6758b2f95b5ea93d38655a2c6/scipy-1.15.2-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:08b57a9336b8e79b305a143c3655cc5bdbe6d5ece3378578888d2afbb51c4e37", size = 30100266 }, + { url = "https://files.pythonhosted.org/packages/dd/b1/f9fe6e3c828cb5930b5fe74cb479de5f3d66d682fa8adb77249acaf545b8/scipy-1.15.2-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:54c462098484e7466362a9f1672d20888f724911a74c22ae35b61f9c5919183d", size = 22373768 }, + { url = "https://files.pythonhosted.org/packages/15/9d/a60db8c795700414c3f681908a2b911e031e024d93214f2d23c6dae174ab/scipy-1.15.2-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:cf72ff559a53a6a6d77bd8eefd12a17995ffa44ad86c77a5df96f533d4e6c6bb", size = 25154719 }, + { url = "https://files.pythonhosted.org/packages/37/3b/9bda92a85cd93f19f9ed90ade84aa1e51657e29988317fabdd44544f1dd4/scipy-1.15.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9de9d1416b3d9e7df9923ab23cd2fe714244af10b763975bea9e4f2e81cebd27", size = 35163195 }, + { url = "https://files.pythonhosted.org/packages/03/5a/fc34bf1aa14dc7c0e701691fa8685f3faec80e57d816615e3625f28feb43/scipy-1.15.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fb530e4794fc8ea76a4a21ccb67dea33e5e0e60f07fc38a49e821e1eae3b71a0", size = 37255404 }, + { url = "https://files.pythonhosted.org/packages/4a/71/472eac45440cee134c8a180dbe4c01b3ec247e0338b7c759e6cd71f199a7/scipy-1.15.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:5ea7ed46d437fc52350b028b1d44e002646e28f3e8ddc714011aaf87330f2f32", size = 36860011 }, + { url = "https://files.pythonhosted.org/packages/01/b3/21f890f4f42daf20e4d3aaa18182dddb9192771cd47445aaae2e318f6738/scipy-1.15.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:11e7ad32cf184b74380f43d3c0a706f49358b904fa7d5345f16ddf993609184d", size = 39657406 }, + { url = "https://files.pythonhosted.org/packages/0d/76/77cf2ac1f2a9cc00c073d49e1e16244e389dd88e2490c91d84e1e3e4d126/scipy-1.15.2-cp313-cp313-win_amd64.whl", hash = "sha256:a5080a79dfb9b78b768cebf3c9dcbc7b665c5875793569f48bf0e2b1d7f68f6f", size = 40961243 }, + { url = "https://files.pythonhosted.org/packages/4c/4b/a57f8ddcf48e129e6054fa9899a2a86d1fc6b07a0e15c7eebff7ca94533f/scipy-1.15.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:447ce30cee6a9d5d1379087c9e474628dab3db4a67484be1b7dc3196bfb2fac9", size = 38870286 }, + { url = "https://files.pythonhosted.org/packages/0c/43/c304d69a56c91ad5f188c0714f6a97b9c1fed93128c691148621274a3a68/scipy-1.15.2-cp313-cp313t-macosx_12_0_arm64.whl", hash = "sha256:c90ebe8aaa4397eaefa8455a8182b164a6cc1d59ad53f79943f266d99f68687f", size = 30141634 }, + { url = "https://files.pythonhosted.org/packages/44/1a/6c21b45d2548eb73be9b9bff421aaaa7e85e22c1f9b3bc44b23485dfce0a/scipy-1.15.2-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:def751dd08243934c884a3221156d63e15234a3155cf25978b0a668409d45eb6", size = 22415179 }, + { url = "https://files.pythonhosted.org/packages/74/4b/aefac4bba80ef815b64f55da06f62f92be5d03b467f2ce3668071799429a/scipy-1.15.2-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:302093e7dfb120e55515936cb55618ee0b895f8bcaf18ff81eca086c17bd80af", size = 25126412 }, + { url = "https://files.pythonhosted.org/packages/b1/53/1cbb148e6e8f1660aacd9f0a9dfa2b05e9ff1cb54b4386fe868477972ac2/scipy-1.15.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7cd5b77413e1855351cdde594eca99c1f4a588c2d63711388b6a1f1c01f62274", size = 34952867 }, + { url = "https://files.pythonhosted.org/packages/2c/23/e0eb7f31a9c13cf2dca083828b97992dd22f8184c6ce4fec5deec0c81fcf/scipy-1.15.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d0194c37037707b2afa7a2f2a924cf7bac3dc292d51b6a925e5fcb89bc5c776", size = 36890009 }, + { url = "https://files.pythonhosted.org/packages/03/f3/e699e19cabe96bbac5189c04aaa970718f0105cff03d458dc5e2b6bd1e8c/scipy-1.15.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:bae43364d600fdc3ac327db99659dcb79e6e7ecd279a75fe1266669d9a652828", size = 36545159 }, + { url = "https://files.pythonhosted.org/packages/af/f5/ab3838e56fe5cc22383d6fcf2336e48c8fe33e944b9037fbf6cbdf5a11f8/scipy-1.15.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:f031846580d9acccd0044efd1a90e6f4df3a6e12b4b6bd694a7bc03a89892b28", size = 39136566 }, + { url = "https://files.pythonhosted.org/packages/0a/c8/b3f566db71461cabd4b2d5b39bcc24a7e1c119535c8361f81426be39bb47/scipy-1.15.2-cp313-cp313t-win_amd64.whl", hash = "sha256:fe8a9eb875d430d81755472c5ba75e84acc980e4a8f6204d402849234d3017db", size = 40477705 }, +] + +[[package]] +name = "six" +version = "1.17.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050 }, +] + +[[package]] +name = "stack-data" +version = "0.6.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "asttokens" }, + { name = "executing" }, + { name = "pure-eval" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/28/e3/55dcc2cfbc3ca9c29519eb6884dd1415ecb53b0e934862d3559ddcb7e20b/stack_data-0.6.3.tar.gz", hash = "sha256:836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9", size = 44707 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f1/7b/ce1eafaf1a76852e2ec9b22edecf1daa58175c090266e9f6c64afcd81d91/stack_data-0.6.3-py3-none-any.whl", hash = "sha256:d5558e0c25a4cb0853cddad3d77da9891a08cb85dd9f9f91b9f8cd66e511e695", size = 24521 }, +] + +[[package]] +name = "statsmodels" +version = "0.14.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy" }, + { name = "packaging" }, + { name = "pandas" }, + { name = "patsy" }, + { name = "scipy" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/1f/3b/963a015dd8ea17e10c7b0e2f14d7c4daec903baf60a017e756b57953a4bf/statsmodels-0.14.4.tar.gz", hash = "sha256:5d69e0f39060dc72c067f9bb6e8033b6dccdb0bae101d76a7ef0bcc94e898b67", size = 20354802 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f5/99/654fd41a9024643ee70b239e5ebc987bf98ce9fc2693bd550bee58136564/statsmodels-0.14.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:5221dba7424cf4f2561b22e9081de85f5bb871228581124a0d1b572708545199", size = 10220508 }, + { url = "https://files.pythonhosted.org/packages/67/d8/ac30cf4cf97adaa48548be57e7cf02e894f31b45fd55bf9213358d9781c9/statsmodels-0.14.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:17672b30c6b98afe2b095591e32d1d66d4372f2651428e433f16a3667f19eabb", size = 9912317 }, + { url = "https://files.pythonhosted.org/packages/e0/77/2440d551eaf27f9c1d3650e13b3821a35ad5b21d3a19f62fb302af9203e8/statsmodels-0.14.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ab5e6312213b8cfb9dca93dd46a0f4dccb856541f91d3306227c3d92f7659245", size = 10301662 }, + { url = "https://files.pythonhosted.org/packages/fa/e1/60a652f18996a40a7410aeb7eb476c18da8a39792c7effe67f06883e9852/statsmodels-0.14.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4bbb150620b53133d6cd1c5d14c28a4f85701e6c781d9b689b53681effaa655f", size = 10741763 }, + { url = "https://files.pythonhosted.org/packages/81/0c/2453eec3ac25e300847d9ed97f41156de145e507391ecb5ac989e111e525/statsmodels-0.14.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:bb695c2025d122a101c2aca66d2b78813c321b60d3a7c86bb8ec4467bb53b0f9", size = 10879534 }, + { url = "https://files.pythonhosted.org/packages/59/9a/e466a1b887a1441141e52dbcc98152f013d85076576da6eed2357f2016ae/statsmodels-0.14.4-cp312-cp312-win_amd64.whl", hash = "sha256:7f7917a51766b4e074da283c507a25048ad29a18e527207883d73535e0dc6184", size = 9823866 }, + { url = "https://files.pythonhosted.org/packages/31/f8/2662e6a101315ad336f75168fa9bac71f913ebcb92a6be84031d84a0f21f/statsmodels-0.14.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:b5a24f5d2c22852d807d2b42daf3a61740820b28d8381daaf59dcb7055bf1a79", size = 10186886 }, + { url = "https://files.pythonhosted.org/packages/fa/c0/ee6e8ed35fc1ca9c7538c592f4974547bf72274bc98db1ae4a6e87481a83/statsmodels-0.14.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:df4f7864606fa843d7e7c0e6af288f034a2160dba14e6ccc09020a3cf67cb092", size = 9880066 }, + { url = "https://files.pythonhosted.org/packages/d1/97/3380ca6d8fd66cfb3d12941e472642f26e781a311c355a4e97aab2ed0216/statsmodels-0.14.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:91341cbde9e8bea5fb419a76e09114e221567d03f34ca26e6d67ae2c27d8fe3c", size = 10283521 }, + { url = "https://files.pythonhosted.org/packages/fe/2a/55c5b5c5e5124a202ea3fe0bcdbdeceaf91b4ec6164b8434acb9dd97409c/statsmodels-0.14.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1322286a7bfdde2790bf72d29698a1b76c20b8423a55bdcd0d457969d0041f72", size = 10723228 }, + { url = "https://files.pythonhosted.org/packages/4f/76/67747e49dc758daae06f33aad8247b718cd7d224f091d2cd552681215bb2/statsmodels-0.14.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e31b95ac603415887c9f0d344cb523889cf779bc52d68e27e2d23c358958fec7", size = 10859503 }, + { url = "https://files.pythonhosted.org/packages/1d/eb/cb8b01f5edf8f135eb3d0553d159db113a35b2948d0e51eeb735e7ae09ea/statsmodels-0.14.4-cp313-cp313-win_amd64.whl", hash = "sha256:81030108d27aecc7995cac05aa280cf8c6025f6a6119894eef648997936c2dd0", size = 9817574 }, +] + +[[package]] +name = "threadpoolctl" +version = "3.6.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b7/4d/08c89e34946fce2aec4fbb45c9016efd5f4d7f24af8e5d93296e935631d8/threadpoolctl-3.6.0.tar.gz", hash = "sha256:8ab8b4aa3491d812b623328249fab5302a68d2d71745c8a4c719a2fcaba9f44e", size = 21274 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/32/d5/f9a850d79b0851d1d4ef6456097579a9005b31fea68726a4ae5f2d82ddd9/threadpoolctl-3.6.0-py3-none-any.whl", hash = "sha256:43a0b8fd5a2928500110039e43a5eed8480b918967083ea48dc3ab9f13c4a7fb", size = 18638 }, +] + +[[package]] +name = "tornado" +version = "6.4.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/59/45/a0daf161f7d6f36c3ea5fc0c2de619746cc3dd4c76402e9db545bd920f63/tornado-6.4.2.tar.gz", hash = "sha256:92bad5b4746e9879fd7bf1eb21dce4e3fc5128d71601f80005afa39237ad620b", size = 501135 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/26/7e/71f604d8cea1b58f82ba3590290b66da1e72d840aeb37e0d5f7291bd30db/tornado-6.4.2-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:e828cce1123e9e44ae2a50a9de3055497ab1d0aeb440c5ac23064d9e44880da1", size = 436299 }, + { url = "https://files.pythonhosted.org/packages/96/44/87543a3b99016d0bf54fdaab30d24bf0af2e848f1d13d34a3a5380aabe16/tornado-6.4.2-cp38-abi3-macosx_10_9_x86_64.whl", hash = "sha256:072ce12ada169c5b00b7d92a99ba089447ccc993ea2143c9ede887e0937aa803", size = 434253 }, + { url = "https://files.pythonhosted.org/packages/cb/fb/fdf679b4ce51bcb7210801ef4f11fdac96e9885daa402861751353beea6e/tornado-6.4.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a017d239bd1bb0919f72af256a970624241f070496635784d9bf0db640d3fec", size = 437602 }, + { url = "https://files.pythonhosted.org/packages/4f/3b/e31aeffffc22b475a64dbeb273026a21b5b566f74dee48742817626c47dc/tornado-6.4.2-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c36e62ce8f63409301537222faffcef7dfc5284f27eec227389f2ad11b09d946", size = 436972 }, + { url = "https://files.pythonhosted.org/packages/22/55/b78a464de78051a30599ceb6983b01d8f732e6f69bf37b4ed07f642ac0fc/tornado-6.4.2-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bca9eb02196e789c9cb5c3c7c0f04fb447dc2adffd95265b2c7223a8a615ccbf", size = 437173 }, + { url = "https://files.pythonhosted.org/packages/79/5e/be4fb0d1684eb822c9a62fb18a3e44a06188f78aa466b2ad991d2ee31104/tornado-6.4.2-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:304463bd0772442ff4d0f5149c6f1c2135a1fae045adf070821c6cdc76980634", size = 437892 }, + { url = "https://files.pythonhosted.org/packages/f5/33/4f91fdd94ea36e1d796147003b490fe60a0215ac5737b6f9c65e160d4fe0/tornado-6.4.2-cp38-abi3-musllinux_1_2_i686.whl", hash = "sha256:c82c46813ba483a385ab2a99caeaedf92585a1f90defb5693351fa7e4ea0bf73", size = 437334 }, + { url = "https://files.pythonhosted.org/packages/2b/ae/c1b22d4524b0e10da2f29a176fb2890386f7bd1f63aacf186444873a88a0/tornado-6.4.2-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:932d195ca9015956fa502c6b56af9eb06106140d844a335590c1ec7f5277d10c", size = 437261 }, + { url = "https://files.pythonhosted.org/packages/b5/25/36dbd49ab6d179bcfc4c6c093a51795a4f3bed380543a8242ac3517a1751/tornado-6.4.2-cp38-abi3-win32.whl", hash = "sha256:2876cef82e6c5978fde1e0d5b1f919d756968d5b4282418f3146b79b58556482", size = 438463 }, + { url = "https://files.pythonhosted.org/packages/61/cc/58b1adeb1bb46228442081e746fcdbc4540905c87e8add7c277540934edb/tornado-6.4.2-cp38-abi3-win_amd64.whl", hash = "sha256:908b71bf3ff37d81073356a5fadcc660eb10c1476ee6e2725588626ce7e5ca38", size = 438907 }, +] + +[[package]] +name = "traitlets" +version = "5.14.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/eb/79/72064e6a701c2183016abbbfedaba506d81e30e232a68c9f0d6f6fcd1574/traitlets-5.14.3.tar.gz", hash = "sha256:9ed0579d3502c94b4b3732ac120375cda96f923114522847de4b3bb98b96b6b7", size = 161621 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/00/c0/8f5d070730d7836adc9c9b6408dec68c6ced86b304a9b26a14df072a6e8c/traitlets-5.14.3-py3-none-any.whl", hash = "sha256:b74e89e397b1ed28cc831db7aea759ba6640cb3de13090ca145426688ff1ac4f", size = 85359 }, +] + +[[package]] +name = "tzdata" +version = "2025.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/43/0f/fa4723f22942480be4ca9527bbde8d43f6c3f2fe8412f00e7f5f6746bc8b/tzdata-2025.1.tar.gz", hash = "sha256:24894909e88cdb28bd1636c6887801df64cb485bd593f2fd83ef29075a81d694", size = 194950 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0f/dd/84f10e23edd882c6f968c21c2434fe67bd4a528967067515feca9e611e5e/tzdata-2025.1-py2.py3-none-any.whl", hash = "sha256:7e127113816800496f027041c570f50bcd464a020098a3b6b199517772303639", size = 346762 }, +] + +[[package]] +name = "wcwidth" +version = "0.2.13" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz", hash = "sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5", size = 101301 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fd/84/fd2ba7aafacbad3c4201d395674fc6348826569da3c0937e75505ead3528/wcwidth-0.2.13-py2.py3-none-any.whl", hash = "sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859", size = 34166 }, +] From b587615371ba2fd959e04d81834cdd737c2087d8 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Wed, 19 Mar 2025 12:43:43 +0100 Subject: [PATCH 06/60] update sim classes --- monte-cover/src/montecover/__init__.py | 2 +- monte-cover/src/montecover/base.py | 63 ++++++-- monte-cover/src/montecover/did/__init__.py | 4 +- monte-cover/src/montecover/did/did_multi.py | 153 +++++++++----------- scripts/did/did_pa_multi_agg_coverage.py | 9 ++ 5 files changed, 132 insertions(+), 99 deletions(-) diff --git a/monte-cover/src/montecover/__init__.py b/monte-cover/src/montecover/__init__.py index e8b95c2..8d60b6b 100644 --- a/monte-cover/src/montecover/__init__.py +++ b/monte-cover/src/montecover/__init__.py @@ -10,4 +10,4 @@ def main() -> None: - print("Hello from monte-cover!") + print("Hello from monte-cover! Run your simulations here.") diff --git a/monte-cover/src/montecover/base.py b/monte-cover/src/montecover/base.py index a07d2a1..dd2a7ee 100644 --- a/monte-cover/src/montecover/base.py +++ b/monte-cover/src/montecover/base.py @@ -1,10 +1,14 @@ import time import warnings +import pandas as pd from abc import ABC, abstractmethod +from itertools import product from typing import Any, Dict, List -from itertools import product +import sys +from datetime import datetime import numpy as np +import doubleml as dml class BaseSimulation(ABC): @@ -12,21 +16,21 @@ class BaseSimulation(ABC): def __init__( self, - n_rep: int = 20, + repetitions: int = 20, max_runtime: float = 5.5 * 3600, random_seed: int = 42, output_path: str = "results", suppress_warnings: bool = True, ): - self.n_rep = n_rep + self.repetitions = repetitions self.max_runtime = max_runtime self.random_seed = random_seed self.output_path = output_path self.suppress_warnings = suppress_warnings # Results storage - self.results = [] - self.aggregated_results = None + self.results = dict() + self.result_summary = None # Timing self.start_time = None @@ -49,14 +53,19 @@ def run_single_rep(self, rep_idx: int, params: Dict[str, Any]) -> Dict[str, Any] """Run a single repetition with the given parameters.""" pass + @abstractmethod + def summarize_results(self) -> Dict[str, Any]: + """Summarize the simulation results.""" + pass + def run_simulation(self): """Run the full simulation.""" self.start_time = time.time() param_grid = self.setup_parameters() # Loop through repetitions - for i_rep in range(self.n_rep): - print(f"Repetition: {i_rep + 1}/{self.n_rep}", end="\r") + for i_rep in range(self.repetitions): + print(f"Repetition: {i_rep + 1}/{self.repetitions}", end="\r") # Check elapsed time elapsed_time = time.time() - self.start_time @@ -67,12 +76,42 @@ def run_simulation(self): keys = param_grid.keys() for values in product(*param_grid.values()): params = dict(zip(keys, values)) - result = self.run_single_rep(i_rep, params) - if result is not None: - result["repetition"] = i_rep - self.results.append(result) + repetition_results = self.run_single_rep(params) + if repetition_results is not None: + assert isinstance(repetition_results, dict), "The result must be a dictionary." + # Process each dataframe in the result dictionary + for result_name, repetition_result in repetition_results.items(): + assert isinstance(repetition_result, dict), "Each result must be a dictionary." + repetition_result["repetition"] = i_rep + + # Initialize key in results dict if not exists + if result_name not in self.results: + self.results[result_name] = [] + self.results[result_name].append(repetition_result) + + # convert results to dataframes + for key, value in self.results.items(): + self.results[key] = pd.DataFrame(value) self.end_time = time.time() self.total_runtime = self.end_time - self.start_time - # Add other methods here... + # Summarize & save results + self.result_summary = self.summarize_results() + print("Simulation finished.") + + def save_results(self): + """Save the simulation results.""" + metadata = pd.DataFrame( + { + "DoubleML Version": [dml.__version__], + "Script": ["DIDMultiCoverageSimulation"], + "Date": [datetime.now().strftime("%Y-%m-%d %H")], + "Total Runtime (seconds)": [self.total_runtime], + "Python Version": [f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"], + } + ) + + for df_name, df in self.result_summary.items(): + df.to_csv(f"{self.output_path}_{df_name}.csv", index=False) + metadata.to_csv(f"{self.output_path}_metadata.csv", index=False) diff --git a/monte-cover/src/montecover/did/__init__.py b/monte-cover/src/montecover/did/__init__.py index 31d65c5..24967e6 100644 --- a/monte-cover/src/montecover/did/__init__.py +++ b/monte-cover/src/montecover/did/__init__.py @@ -1,7 +1,5 @@ """Monte Carlo coverage simulations for DiD.""" - from montecover.did.did_multi import DIDMultiCoverageSimulation - -__all__ = ["DIDMultiCoverageSimulation"] \ No newline at end of file +__all__ = ["DIDMultiCoverageSimulation"] diff --git a/monte-cover/src/montecover/did/did_multi.py b/monte-cover/src/montecover/did/did_multi.py index 513073e..f63f964 100644 --- a/monte-cover/src/montecover/did/did_multi.py +++ b/monte-cover/src/montecover/did/did_multi.py @@ -1,70 +1,69 @@ -import numpy as np -import pandas as pd -from datetime import datetime -import sys -from typing import Dict, List, Any, Tuple - -from sklearn.linear_model import LinearRegression, LogisticRegression +from typing import Any, Dict, List import doubleml as dml +import numpy as np +import pandas as pd from doubleml.did.datasets import make_did_CS2021 +from sklearn.linear_model import LinearRegression, LogisticRegression from montecover.base import BaseSimulation + class DIDMultiCoverageSimulation(BaseSimulation): """Simulation study for coverage properties of DoubleMLDIDMulti.""" - + def __init__( self, - n_rep: int = 20, + output_path: str, + repetitions: int = 20, n_obs: int = 500, max_runtime: float = 5.5 * 3600, random_seed: int = 42, - output_path: str = "results/did/did_pa_multi_coverage", suppress_warnings: bool = True, ): super().__init__( - n_rep=n_rep, + repetitions=repetitions, max_runtime=max_runtime, random_seed=random_seed, output_path=output_path, suppress_warnings=suppress_warnings, ) self.n_obs = n_obs - + # Calculate oracle values self._calculate_oracle_values() - + # Additional results storage for aggregated results self.results_aggregated = [] - + def _calculate_oracle_values(self): """Calculate oracle values for the simulation.""" # Oracle values - df_oracle = make_did_CS2021(n_obs=int(1e+6), dgp_type=1) # does not depend on the DGP type + df_oracle = make_did_CS2021(n_obs=int(1e6), dgp_type=1) # does not depend on the DGP type df_oracle["ite"] = df_oracle["y1"] - df_oracle["y0"] self.oracle_thetas = df_oracle.groupby(["d", "t"])["ite"].mean().reset_index() print("ATTs:") print(self.oracle_thetas) - + # Oracle group aggregation df_oracle_post_treatment = df_oracle[df_oracle["t"] >= df_oracle["d"]] self.oracle_agg_group = df_oracle_post_treatment.groupby("d")["ite"].mean() print("Group aggregated ATTs:") print(self.oracle_agg_group) - + # Oracle time aggregation self.oracle_agg_time = df_oracle_post_treatment.groupby("t")["ite"].mean() print("Time aggregated ATTs:") print(self.oracle_agg_time) - + # Oracle eventstudy aggregation - df_oracle["e"] = pd.to_datetime(df_oracle["t"]).values.astype("datetime64[M]") - \ - pd.to_datetime(df_oracle["d"]).values.astype("datetime64[M]") + df_oracle["e"] = pd.to_datetime(df_oracle["t"]).values.astype("datetime64[M]") - pd.to_datetime( + df_oracle["d"] + ).values.astype("datetime64[M]") self.oracle_agg_eventstudy = df_oracle.groupby("e")["ite"].mean() print("Event Study aggregated ATTs:") print(self.oracle_agg_eventstudy) - + def setup_parameters(self) -> Dict[str, List[Any]]: """Define simulation parameters.""" return { @@ -73,10 +72,10 @@ def setup_parameters(self) -> Dict[str, List[Any]]: "in_sample_normalization": [True, False], "learner_g": [("Linear", LinearRegression())], "learner_m": [("Linear", LogisticRegression())], - "level": [0.95, 0.90] + "level": [0.95, 0.90], } - - def run_single_rep(self, rep_idx: int, params: Dict[str, Any]) -> Dict[str, Any]: + + def run_single_rep(self, params: Dict[str, Any]) -> Dict[str, Any]: """Run a single repetition with the given parameters.""" # Extract parameters dgp_type = params["DGP"] @@ -85,7 +84,7 @@ def run_single_rep(self, rep_idx: int, params: Dict[str, Any]) -> Dict[str, Any] learner_g_name, ml_g = params["learner_g"] learner_m_name, ml_m = params["learner_m"] level = params["level"] - + # Generate data data = make_did_CS2021(n_obs=self.n_obs, dgp_type=dgp_type) obj_dml_data = dml.data.DoubleMLPanelData( @@ -96,7 +95,7 @@ def run_single_rep(self, rep_idx: int, params: Dict[str, Any]) -> Dict[str, Any] t_col="t", x_cols=["Z1", "Z2", "Z3", "Z4"], ) - + # Fit model if score == "experimental": dml_DiD = dml.did.DoubleMLDIDMulti( @@ -105,7 +104,8 @@ def run_single_rep(self, rep_idx: int, params: Dict[str, Any]) -> Dict[str, Any] ml_m=None, gt_combinations="standard", score=score, - in_sample_normalization=in_sample_normalization) + in_sample_normalization=in_sample_normalization, + ) else: dml_DiD = dml.did.DoubleMLDIDMulti( obj_dml_data=obj_dml_data, @@ -113,31 +113,32 @@ def run_single_rep(self, rep_idx: int, params: Dict[str, Any]) -> Dict[str, Any] ml_m=ml_m, gt_combinations="standard", score=score, - in_sample_normalization=in_sample_normalization) - + in_sample_normalization=in_sample_normalization, + ) + # Fit the model dml_DiD.fit(n_jobs_cv=5) - + # Oracle values for this model theta = np.full_like(dml_DiD.coef, np.nan) for i, (g, _, t) in enumerate(dml_DiD.gt_combinations): group_index = self.oracle_thetas["d"] == g time_index = self.oracle_thetas["t"] == t theta[i] = self.oracle_thetas[group_index & time_index]["ite"].iloc[0] - + # Confidence intervals and metrics confint = dml_DiD.confint(level=level) coverage = np.mean((confint.iloc[:, 0] < theta) & (theta < confint.iloc[:, 1])) ci_length = np.mean(confint.iloc[:, 1] - confint.iloc[:, 0]) bias = np.mean(abs(dml_DiD.coef - theta)) - + # Bootstrap for uniform confidence intervals dml_DiD.bootstrap(n_rep_boot=2000) confint_uniform = dml_DiD.confint(level=level, joint=True) - + coverage_uniform = all((confint_uniform.iloc[:, 0] < theta) & (theta < confint_uniform.iloc[:, 1])) ci_length_uniform = np.mean(confint_uniform.iloc[:, 1] - confint_uniform.iloc[:, 0]) - + # Detailed results result_detailed = { "Coverage": coverage, @@ -152,21 +153,25 @@ def run_single_rep(self, rep_idx: int, params: Dict[str, Any]) -> Dict[str, Any] "DGP": dgp_type, "level": level, } - + # Group aggregation group_agg = dml_DiD.aggregate(aggregation="group") group_confint = group_agg.aggregated_frameworks.confint(level=level) - group_coverage = np.mean((group_confint.iloc[:, 0] < self.oracle_agg_group.values) & - (self.oracle_agg_group.values < group_confint.iloc[:, 1])) + group_coverage = np.mean( + (group_confint.iloc[:, 0] < self.oracle_agg_group.values) + & (self.oracle_agg_group.values < group_confint.iloc[:, 1]) + ) group_ci_length = np.mean(group_confint.iloc[:, 1] - group_confint.iloc[:, 0]) group_bias = np.mean(abs(group_agg.aggregated_frameworks.thetas - self.oracle_agg_group.values)) - + group_agg.aggregated_frameworks.bootstrap(n_rep_boot=2000) group_confint_uniform = group_agg.aggregated_frameworks.confint(level=level, joint=True) - group_coverage_uniform = all((group_confint_uniform.iloc[:, 0] < self.oracle_agg_group.values) & - (self.oracle_agg_group.values < group_confint_uniform.iloc[:, 1])) + group_coverage_uniform = all( + (group_confint_uniform.iloc[:, 0] < self.oracle_agg_group.values) + & (self.oracle_agg_group.values < group_confint_uniform.iloc[:, 1]) + ) group_ci_length_uniform = np.mean(group_confint_uniform.iloc[:, 1] - group_confint_uniform.iloc[:, 0]) - + # Aggregated results result_aggregated = { "Coverage": group_coverage, @@ -181,51 +186,33 @@ def run_single_rep(self, rep_idx: int, params: Dict[str, Any]) -> Dict[str, Any] "DGP": dgp_type, "level": level, } - - # Store aggregated results - self.results_aggregated.append(result_aggregated) - - return result_detailed - + + result = { + "detailed": result_detailed, + "aggregated": result_aggregated, + } + + return result + def summarize_results(self): - """Summarize results and save to CSV.""" - df_results_detailed = pd.DataFrame(self.results) - df_results_aggregated = pd.DataFrame(self.results_aggregated) - - # Aggregate results by parameters - df_summary_detailed = df_results_detailed.groupby( - ["Learner g", "Learner m", "Score", "In-sample-norm.", "DGP", "level"] - ).agg({ - "Coverage": "mean", - "CI Length": "mean", - "Bias": "mean", - "Uniform Coverage": "mean", - "Uniform CI Length": "mean", - "repetition": "count" - }).reset_index() - - df_summary_aggregated = df_results_aggregated.groupby( - ["Learner g", "Learner m", "Score", "In-sample-norm.", "DGP", "level"] - ).agg({ + """Summarize the simulation results.""" + + groupby_cols = ["Learner g", "Learner m", "Score", "In-sample-norm.", "DGP", "level"] + aggregation_dict = { "Coverage": "mean", "CI Length": "mean", "Bias": "mean", "Uniform Coverage": "mean", "Uniform CI Length": "mean", - "repetition": "count" - }).reset_index() - - # Save results - metadata = pd.DataFrame({ - 'DoubleML Version': [dml.__version__], - 'Script': ['DIDMultiCoverageSimulation'], - 'Date': [datetime.now().strftime("%Y-%m-%d %H:%M:%S")], - 'Total Runtime (seconds)': [self.total_runtime], - 'Python Version': [f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"], - }) - - df_summary_detailed.to_csv(f"{self.output_path}.csv", index=False) - df_summary_aggregated.to_csv(f"{self.output_path}_aggregated.csv", index=False) - metadata.to_csv(f"{self.output_path}_metadata.csv", index=False) - - return df_summary_detailed, df_summary_aggregated, metadata \ No newline at end of file + "repetition": "count", + } + + result_summary = dict() + for result_name, result_df in self.results.items(): + result_summary[result_name] = ( + result_df.groupby(groupby_cols) + .agg(aggregation_dict) + .reset_index() + ) + + return result_summary diff --git a/scripts/did/did_pa_multi_agg_coverage.py b/scripts/did/did_pa_multi_agg_coverage.py index e69de29..76c35af 100644 --- a/scripts/did/did_pa_multi_agg_coverage.py +++ b/scripts/did/did_pa_multi_agg_coverage.py @@ -0,0 +1,9 @@ +from montecover.did import DIDMultiCoverageSimulation + +simulation = DIDMultiCoverageSimulation( + repetitions=5, + n_obs=500, + output_path="results/did/did_pa_multi_coverage" +) +simulation.run_simulation() +simulation.save_results() \ No newline at end of file From fbb40f313fc5d7f9a44f76ebbbd8fff63f04939d Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Wed, 19 Mar 2025 13:51:23 +0100 Subject: [PATCH 07/60] add all aggregations --- monte-cover/src/montecover/base.py | 22 ++++ monte-cover/src/montecover/did/did_multi.py | 120 +++++++------------- 2 files changed, 63 insertions(+), 79 deletions(-) diff --git a/monte-cover/src/montecover/base.py b/monte-cover/src/montecover/base.py index dd2a7ee..18ff049 100644 --- a/monte-cover/src/montecover/base.py +++ b/monte-cover/src/montecover/base.py @@ -115,3 +115,25 @@ def save_results(self): for df_name, df in self.result_summary.items(): df.to_csv(f"{self.output_path}_{df_name}.csv", index=False) metadata.to_csv(f"{self.output_path}_metadata.csv", index=False) + + @staticmethod + def _compute_coverage(thetas, oracle_thetas, confint, joint_confint=None): + """Compute coverage, CI length, and bias.""" + + coverage = np.mean((confint.iloc[:, 0] < oracle_thetas) & (oracle_thetas < confint.iloc[:, 1])) + ci_length = np.mean(confint.iloc[:, 1] - confint.iloc[:, 0]) + bias = np.mean(abs(thetas - oracle_thetas)) + result_dict = { + "Coverage": coverage, + "CI Length": ci_length, + "Bias": bias, + } + + if joint_confint is not None: + coverage_uniform = all((joint_confint.iloc[:, 0] < oracle_thetas) & (oracle_thetas < joint_confint.iloc[:, 1])) + ci_length_uniform = np.mean(joint_confint.iloc[:, 1] - joint_confint.iloc[:, 0]) + + result_dict["Uniform Coverage"] = coverage_uniform + result_dict["Uniform CI Length"] = ci_length_uniform + + return result_dict diff --git a/monte-cover/src/montecover/did/did_multi.py b/monte-cover/src/montecover/did/did_multi.py index f63f964..f0f9430 100644 --- a/monte-cover/src/montecover/did/did_multi.py +++ b/monte-cover/src/montecover/did/did_multi.py @@ -38,31 +38,25 @@ def __init__( def _calculate_oracle_values(self): """Calculate oracle values for the simulation.""" + + self.oracle_values = dict() # Oracle values df_oracle = make_did_CS2021(n_obs=int(1e6), dgp_type=1) # does not depend on the DGP type df_oracle["ite"] = df_oracle["y1"] - df_oracle["y0"] - self.oracle_thetas = df_oracle.groupby(["d", "t"])["ite"].mean().reset_index() - print("ATTs:") - print(self.oracle_thetas) + self.oracle_values["detailed"] = df_oracle.groupby(["d", "t"])["ite"].mean().reset_index() # Oracle group aggregation df_oracle_post_treatment = df_oracle[df_oracle["t"] >= df_oracle["d"]] - self.oracle_agg_group = df_oracle_post_treatment.groupby("d")["ite"].mean() - print("Group aggregated ATTs:") - print(self.oracle_agg_group) + self.oracle_values["group"] = df_oracle_post_treatment.groupby("d")["ite"].mean() # Oracle time aggregation - self.oracle_agg_time = df_oracle_post_treatment.groupby("t")["ite"].mean() - print("Time aggregated ATTs:") - print(self.oracle_agg_time) + self.oracle_values["time"] = df_oracle_post_treatment.groupby("t")["ite"].mean() # Oracle eventstudy aggregation df_oracle["e"] = pd.to_datetime(df_oracle["t"]).values.astype("datetime64[M]") - pd.to_datetime( df_oracle["d"] ).values.astype("datetime64[M]") - self.oracle_agg_eventstudy = df_oracle.groupby("e")["ite"].mean() - print("Event Study aggregated ATTs:") - print(self.oracle_agg_eventstudy) + self.oracle_values["eventstudy"] = df_oracle.groupby("e")["ite"].mean()[1:] def setup_parameters(self) -> Dict[str, List[Any]]: """Define simulation parameters.""" @@ -118,79 +112,44 @@ def run_single_rep(self, params: Dict[str, Any]) -> Dict[str, Any]: # Fit the model dml_DiD.fit(n_jobs_cv=5) + dml_DiD.bootstrap(n_rep_boot=2000) # Oracle values for this model - theta = np.full_like(dml_DiD.coef, np.nan) + oracle_thetas = np.full_like(dml_DiD.coef, np.nan) for i, (g, _, t) in enumerate(dml_DiD.gt_combinations): - group_index = self.oracle_thetas["d"] == g - time_index = self.oracle_thetas["t"] == t - theta[i] = self.oracle_thetas[group_index & time_index]["ite"].iloc[0] + group_index = self.oracle_values["detailed"]["d"] == g + time_index = self.oracle_values["detailed"]["t"] == t + oracle_thetas[i] = self.oracle_values["detailed"][group_index & time_index]["ite"].iloc[0] + + result = dict() + result["detailed"] = self._compute_coverage( + thetas=dml_DiD.coef, + oracle_thetas=oracle_thetas, + confint=dml_DiD.confint(level=level), + joint_confint=dml_DiD.confint(level=level, joint=True), + ) - # Confidence intervals and metrics - confint = dml_DiD.confint(level=level) - coverage = np.mean((confint.iloc[:, 0] < theta) & (theta < confint.iloc[:, 1])) - ci_length = np.mean(confint.iloc[:, 1] - confint.iloc[:, 0]) - bias = np.mean(abs(dml_DiD.coef - theta)) + for aggregation_method in ["group", "time", "eventstudy"]: + agg_obj = dml_DiD.aggregate(aggregation=aggregation_method) + agg_obj.aggregated_frameworks.bootstrap(n_rep_boot=2000) - # Bootstrap for uniform confidence intervals - dml_DiD.bootstrap(n_rep_boot=2000) - confint_uniform = dml_DiD.confint(level=level, joint=True) - - coverage_uniform = all((confint_uniform.iloc[:, 0] < theta) & (theta < confint_uniform.iloc[:, 1])) - ci_length_uniform = np.mean(confint_uniform.iloc[:, 1] - confint_uniform.iloc[:, 0]) - - # Detailed results - result_detailed = { - "Coverage": coverage, - "CI Length": ci_length, - "Bias": bias, - "Uniform Coverage": coverage_uniform, - "Uniform CI Length": ci_length_uniform, - "Learner g": learner_g_name, - "Learner m": learner_m_name, - "Score": score, - "In-sample-norm.": in_sample_normalization, - "DGP": dgp_type, - "level": level, - } - - # Group aggregation - group_agg = dml_DiD.aggregate(aggregation="group") - group_confint = group_agg.aggregated_frameworks.confint(level=level) - group_coverage = np.mean( - (group_confint.iloc[:, 0] < self.oracle_agg_group.values) - & (self.oracle_agg_group.values < group_confint.iloc[:, 1]) - ) - group_ci_length = np.mean(group_confint.iloc[:, 1] - group_confint.iloc[:, 0]) - group_bias = np.mean(abs(group_agg.aggregated_frameworks.thetas - self.oracle_agg_group.values)) - - group_agg.aggregated_frameworks.bootstrap(n_rep_boot=2000) - group_confint_uniform = group_agg.aggregated_frameworks.confint(level=level, joint=True) - group_coverage_uniform = all( - (group_confint_uniform.iloc[:, 0] < self.oracle_agg_group.values) - & (self.oracle_agg_group.values < group_confint_uniform.iloc[:, 1]) - ) - group_ci_length_uniform = np.mean(group_confint_uniform.iloc[:, 1] - group_confint_uniform.iloc[:, 0]) - - # Aggregated results - result_aggregated = { - "Coverage": group_coverage, - "CI Length": group_ci_length, - "Bias": group_bias, - "Uniform Coverage": group_coverage_uniform, - "Uniform CI Length": group_ci_length_uniform, - "Learner g": learner_g_name, - "Learner m": learner_m_name, - "Score": score, - "In-sample-norm.": in_sample_normalization, - "DGP": dgp_type, - "level": level, - } + result[aggregation_method] = self._compute_coverage( + thetas=agg_obj.aggregated_frameworks.thetas, + oracle_thetas=self.oracle_values[aggregation_method].values, + confint=agg_obj.aggregated_frameworks.confint(level=level), + joint_confint=agg_obj.aggregated_frameworks.confint(level=level, joint=True), + ) - result = { - "detailed": result_detailed, - "aggregated": result_aggregated, - } + # add parameters to the result + for result_dict in result.values(): + result_dict.update({ + "Learner g": learner_g_name, + "Learner m": learner_m_name, + "Score": score, + "In-sample-norm.": in_sample_normalization, + "DGP": dgp_type, + "level": level, + }) return result @@ -216,3 +175,6 @@ def summarize_results(self): ) return result_summary + + + From b3175f65dc3c8439eb716a5c03efb8b02bc416a5 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Wed, 19 Mar 2025 14:02:00 +0100 Subject: [PATCH 08/60] change output path to save_results method --- monte-cover/src/montecover/base.py | 8 ++--- monte-cover/src/montecover/did/did_multi.py | 33 ++++++++++----------- scripts/did/did_pa_multi_agg_coverage.py | 3 +- 3 files changed, 20 insertions(+), 24 deletions(-) diff --git a/monte-cover/src/montecover/base.py b/monte-cover/src/montecover/base.py index 18ff049..072eadb 100644 --- a/monte-cover/src/montecover/base.py +++ b/monte-cover/src/montecover/base.py @@ -19,13 +19,11 @@ def __init__( repetitions: int = 20, max_runtime: float = 5.5 * 3600, random_seed: int = 42, - output_path: str = "results", suppress_warnings: bool = True, ): self.repetitions = repetitions self.max_runtime = max_runtime self.random_seed = random_seed - self.output_path = output_path self.suppress_warnings = suppress_warnings # Results storage @@ -100,7 +98,7 @@ def run_simulation(self): self.result_summary = self.summarize_results() print("Simulation finished.") - def save_results(self): + def save_results(self, output_path: str = "results", file_prefix: str = ""): """Save the simulation results.""" metadata = pd.DataFrame( { @@ -113,8 +111,8 @@ def save_results(self): ) for df_name, df in self.result_summary.items(): - df.to_csv(f"{self.output_path}_{df_name}.csv", index=False) - metadata.to_csv(f"{self.output_path}_metadata.csv", index=False) + df.to_csv(f"{output_path}{file_prefix}_{df_name}.csv", index=False) + metadata.to_csv(f"{output_path}{file_prefix}_metadata.csv", index=False) @staticmethod def _compute_coverage(thetas, oracle_thetas, confint, joint_confint=None): diff --git a/monte-cover/src/montecover/did/did_multi.py b/monte-cover/src/montecover/did/did_multi.py index f0f9430..3aa84e6 100644 --- a/monte-cover/src/montecover/did/did_multi.py +++ b/monte-cover/src/montecover/did/did_multi.py @@ -14,7 +14,6 @@ class DIDMultiCoverageSimulation(BaseSimulation): def __init__( self, - output_path: str, repetitions: int = 20, n_obs: int = 500, max_runtime: float = 5.5 * 3600, @@ -25,7 +24,6 @@ def __init__( repetitions=repetitions, max_runtime=max_runtime, random_seed=random_seed, - output_path=output_path, suppress_warnings=suppress_warnings, ) self.n_obs = n_obs @@ -79,21 +77,12 @@ def run_single_rep(self, params: Dict[str, Any]) -> Dict[str, Any]: learner_m_name, ml_m = params["learner_m"] level = params["level"] - # Generate data - data = make_did_CS2021(n_obs=self.n_obs, dgp_type=dgp_type) - obj_dml_data = dml.data.DoubleMLPanelData( - data, - y_col="y", - d_cols="d", - id_col="id", - t_col="t", - x_cols=["Z1", "Z2", "Z3", "Z4"], - ) - + dml_data = self._generate_data(dgp_type=dgp_type) + # Fit model if score == "experimental": dml_DiD = dml.did.DoubleMLDIDMulti( - obj_dml_data=obj_dml_data, + obj_dml_data=dml_data, ml_g=ml_g, ml_m=None, gt_combinations="standard", @@ -102,7 +91,7 @@ def run_single_rep(self, params: Dict[str, Any]) -> Dict[str, Any]: ) else: dml_DiD = dml.did.DoubleMLDIDMulti( - obj_dml_data=obj_dml_data, + obj_dml_data=dml_data, ml_g=ml_g, ml_m=ml_m, gt_combinations="standard", @@ -176,5 +165,15 @@ def summarize_results(self): return result_summary - - + def _generate_data(self, dgp_type: int) -> dml.data.DoubleMLPanelData: + """Generate data for the simulation.""" + data = make_did_CS2021(n_obs=self.n_obs, dgp_type=dgp_type) + dml_data = dml.data.DoubleMLPanelData( + data, + y_col="y", + d_cols="d", + id_col="id", + t_col="t", + x_cols=["Z1", "Z2", "Z3", "Z4"], + ) + return dml_data diff --git a/scripts/did/did_pa_multi_agg_coverage.py b/scripts/did/did_pa_multi_agg_coverage.py index 76c35af..01d95db 100644 --- a/scripts/did/did_pa_multi_agg_coverage.py +++ b/scripts/did/did_pa_multi_agg_coverage.py @@ -3,7 +3,6 @@ simulation = DIDMultiCoverageSimulation( repetitions=5, n_obs=500, - output_path="results/did/did_pa_multi_coverage" ) simulation.run_simulation() -simulation.save_results() \ No newline at end of file +simulation.save_results(output_path="results/did/", file_prefix="did_pa_multi_coverage") \ No newline at end of file From a8240ece098c44fd2bdef27d04173645e1acbd72 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Wed, 19 Mar 2025 14:08:40 +0100 Subject: [PATCH 09/60] more concise did model --- monte-cover/src/montecover/did/did_multi.py | 46 ++++++++------------- 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/monte-cover/src/montecover/did/did_multi.py b/monte-cover/src/montecover/did/did_multi.py index 3aa84e6..d6d0489 100644 --- a/monte-cover/src/montecover/did/did_multi.py +++ b/monte-cover/src/montecover/did/did_multi.py @@ -78,48 +78,36 @@ def run_single_rep(self, params: Dict[str, Any]) -> Dict[str, Any]: level = params["level"] dml_data = self._generate_data(dgp_type=dgp_type) - - # Fit model - if score == "experimental": - dml_DiD = dml.did.DoubleMLDIDMulti( - obj_dml_data=dml_data, - ml_g=ml_g, - ml_m=None, - gt_combinations="standard", - score=score, - in_sample_normalization=in_sample_normalization, - ) - else: - dml_DiD = dml.did.DoubleMLDIDMulti( - obj_dml_data=dml_data, - ml_g=ml_g, - ml_m=ml_m, - gt_combinations="standard", - score=score, - in_sample_normalization=in_sample_normalization, - ) - # Fit the model - dml_DiD.fit(n_jobs_cv=5) - dml_DiD.bootstrap(n_rep_boot=2000) + # Model + dml_model = dml.did.DoubleMLDIDMulti( + obj_dml_data=dml_data, + ml_g=ml_g, + ml_m=None if score == "experimental" else ml_m, + gt_combinations="standard", + score=score, + in_sample_normalization=in_sample_normalization, + ) + dml_model.fit(n_jobs_cv=5) + dml_model.bootstrap(n_rep_boot=2000) # Oracle values for this model - oracle_thetas = np.full_like(dml_DiD.coef, np.nan) - for i, (g, _, t) in enumerate(dml_DiD.gt_combinations): + oracle_thetas = np.full_like(dml_model.coef, np.nan) + for i, (g, _, t) in enumerate(dml_model.gt_combinations): group_index = self.oracle_values["detailed"]["d"] == g time_index = self.oracle_values["detailed"]["t"] == t oracle_thetas[i] = self.oracle_values["detailed"][group_index & time_index]["ite"].iloc[0] result = dict() result["detailed"] = self._compute_coverage( - thetas=dml_DiD.coef, + thetas=dml_model.coef, oracle_thetas=oracle_thetas, - confint=dml_DiD.confint(level=level), - joint_confint=dml_DiD.confint(level=level, joint=True), + confint=dml_model.confint(level=level), + joint_confint=dml_model.confint(level=level, joint=True), ) for aggregation_method in ["group", "time", "eventstudy"]: - agg_obj = dml_DiD.aggregate(aggregation=aggregation_method) + agg_obj = dml_model.aggregate(aggregation=aggregation_method) agg_obj.aggregated_frameworks.bootstrap(n_rep_boot=2000) result[aggregation_method] = self._compute_coverage( From 097f167fae448507ca4a376499aeb54119f015bb Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Wed, 19 Mar 2025 14:47:42 +0100 Subject: [PATCH 10/60] add logs to gitignore --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index c18dd8d..67d3ba2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,6 @@ __pycache__/ + +# Logs +monte-cover/logs/ +*.log +run_*.out \ No newline at end of file From 7bc892e187e4af81378607ddd232c7a00d92c45c Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Wed, 19 Mar 2025 14:58:13 +0100 Subject: [PATCH 11/60] update with config files --- monte-cover/pyproject.toml | 1 + monte-cover/src/montecover/base.py | 189 ++++++++++++++++---- monte-cover/src/montecover/did/did_multi.py | 91 ++++++---- monte-cover/uv.lock | 28 +++ scripts/did/did_pa_multi_agg_coverage.py | 18 +- scripts/did/multi_config.yml | 24 +++ 6 files changed, 273 insertions(+), 78 deletions(-) create mode 100644 scripts/did/multi_config.yml diff --git a/monte-cover/pyproject.toml b/monte-cover/pyproject.toml index 6aee923..357e36c 100644 --- a/monte-cover/pyproject.toml +++ b/monte-cover/pyproject.toml @@ -16,6 +16,7 @@ dependencies = [ "lightgbm>=4.6.0", "numpy>=2.2.4", "pandas>=2.2.3", + "pyyaml>=6.0.2", "ruff>=0.11.0", "scikit-learn>=1.5.2", ] diff --git a/monte-cover/src/montecover/base.py b/monte-cover/src/montecover/base.py index 072eadb..cba4e8f 100644 --- a/monte-cover/src/montecover/base.py +++ b/monte-cover/src/montecover/base.py @@ -1,14 +1,17 @@ +import logging +import os +import sys import time import warnings -import pandas as pd from abc import ABC, abstractmethod +from datetime import datetime from itertools import product -from typing import Any, Dict, List +from typing import Any, Dict, List, Optional -import sys -from datetime import datetime -import numpy as np import doubleml as dml +import numpy as np +import pandas as pd +import yaml class BaseSimulation(ABC): @@ -16,16 +19,25 @@ class BaseSimulation(ABC): def __init__( self, - repetitions: int = 20, - max_runtime: float = 5.5 * 3600, - random_seed: int = 42, + config_file: str, suppress_warnings: bool = True, + log_level: str = "INFO", + log_file: Optional[str] = None, ): - self.repetitions = repetitions - self.max_runtime = max_runtime - self.random_seed = random_seed + # Load config first to get default values if needed + self.config_file = config_file + self.config = self._load_config(config_file) + + # Apply parameters from config + self.repetitions = self.config.get("repetitions", 20) + self.max_runtime = self.config.get("max_runtime", 5.5 * 3600) + self.random_seed = self.config.get("random_seed", 42) self.suppress_warnings = suppress_warnings + # Set up logging + self._setup_logging(log_level, log_file) + self.logger.info(f"Loaded configuration from {config_file}") + # Results storage self.results = dict() self.result_summary = None @@ -40,14 +52,13 @@ def __init__( warnings.simplefilter(action="ignore", category=UserWarning) np.random.seed(self.random_seed) + self.logger.info(f"Initialized simulation with random seed {self.random_seed}") - @abstractmethod - def setup_parameters(self) -> Dict[str, List[Any]]: - """Define simulation parameters.""" - pass + # Let child classes process any specific parameters + self._process_config_parameters() @abstractmethod - def run_single_rep(self, rep_idx: int, params: Dict[str, Any]) -> Dict[str, Any]: + def run_single_rep(self, params: Dict[str, Any]) -> Dict[str, Any]: """Run a single repetition with the given parameters.""" pass @@ -56,36 +67,75 @@ def summarize_results(self) -> Dict[str, Any]: """Summarize the simulation results.""" pass + def get_parameters(self) -> Dict[str, List[Any]]: + """Get parameter grid from config.""" + param_grid = self.config.get("parameters", {}) + if not param_grid: + self.logger.warning("No parameter grid found in config. Using empty parameter set.") + return param_grid + def run_simulation(self): """Run the full simulation.""" self.start_time = time.time() - param_grid = self.setup_parameters() + self.logger.info("Starting simulation") + + param_grid = self.get_parameters() + self.logger.info(f"Parameter grid: {param_grid}") + + # Calculate total number of parameter combinations + total_combinations = np.prod([len(values) for values in param_grid.values()]) + self.logger.info(f"Total parameter combinations: {total_combinations}") + + # Calculate expected total iterations + total_iterations = total_combinations * self.repetitions + self.logger.info(f"Expected total iterations: {total_iterations}") # Loop through repetitions for i_rep in range(self.repetitions): - print(f"Repetition: {i_rep + 1}/{self.repetitions}", end="\r") + rep_start_time = time.time() + self.logger.info(f"Starting repetition {i_rep + 1}/{self.repetitions}") # Check elapsed time elapsed_time = time.time() - self.start_time if elapsed_time > self.max_runtime: - print("Maximum runtime exceeded. Stopping the simulation.") + self.logger.warning("Maximum runtime exceeded. Stopping the simulation.") break + param_combo = 0 keys = param_grid.keys() for values in product(*param_grid.values()): + param_combo += 1 params = dict(zip(keys, values)) - repetition_results = self.run_single_rep(params) - if repetition_results is not None: - assert isinstance(repetition_results, dict), "The result must be a dictionary." - # Process each dataframe in the result dictionary - for result_name, repetition_result in repetition_results.items(): - assert isinstance(repetition_result, dict), "Each result must be a dictionary." - repetition_result["repetition"] = i_rep - - # Initialize key in results dict if not exists - if result_name not in self.results: - self.results[result_name] = [] - self.results[result_name].append(repetition_result) + param_start_time = time.time() + + # Log parameter combination + self.logger.debug(f"Rep {i_rep+1}, Combo {param_combo}/{total_combinations}: {params}") + + try: + repetition_results = self.run_single_rep(params) + param_end_time = time.time() + param_duration = param_end_time - param_start_time + + if repetition_results is not None: + assert isinstance(repetition_results, dict), "The result must be a dictionary." + # Process each dataframe in the result dictionary + for result_name, repetition_result in repetition_results.items(): + assert isinstance(repetition_result, dict), "Each result must be a dictionary." + repetition_result["repetition"] = i_rep + + # Initialize key in results dict if not exists + if result_name not in self.results: + self.results[result_name] = [] + self.results[result_name].append(repetition_result) + + self.logger.debug(f"Parameter combination completed in {param_duration:.2f}s") + except Exception as e: + self.logger.error(f"Error in repetition {i_rep+1}, parameters {params}: {str(e)}") + self.logger.exception("Exception details:") + + rep_end_time = time.time() + rep_duration = rep_end_time - rep_start_time + self.logger.info(f"Repetition {i_rep+1} completed in {rep_duration:.2f}s") # convert results to dataframes for key, value in self.results.items(): @@ -93,26 +143,48 @@ def run_simulation(self): self.end_time = time.time() self.total_runtime = self.end_time - self.start_time + self.logger.info(f"Simulation completed in {self.total_runtime:.2f}s") # Summarize & save results + self.logger.info("Summarizing results") self.result_summary = self.summarize_results() - print("Simulation finished.") def save_results(self, output_path: str = "results", file_prefix: str = ""): """Save the simulation results.""" + os.makedirs(output_path, exist_ok=True) + metadata = pd.DataFrame( { "DoubleML Version": [dml.__version__], - "Script": ["DIDMultiCoverageSimulation"], - "Date": [datetime.now().strftime("%Y-%m-%d %H")], + "Script": [self.__class__.__name__], + "Date": [datetime.now().strftime("%Y-%m-%d %H:%M:%S")], "Total Runtime (seconds)": [self.total_runtime], "Python Version": [f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"], + "Config File": [self.config_file], } ) for df_name, df in self.result_summary.items(): - df.to_csv(f"{output_path}{file_prefix}_{df_name}.csv", index=False) - metadata.to_csv(f"{output_path}{file_prefix}_metadata.csv", index=False) + output_file = os.path.join(output_path, f"{file_prefix}_{df_name}.csv") + df.to_csv(output_file, index=False) + self.logger.info(f"Results saved to {output_file}") + + metadata_file = os.path.join(output_path, f"{file_prefix}_metadata.csv") + metadata.to_csv(metadata_file, index=False) + self.logger.info(f"Metadata saved to {metadata_file}") + + def save_config(self, output_path: str): + """Save the current configuration to a YAML file.""" + os.makedirs(os.path.dirname(output_path), exist_ok=True) + + if not (output_path.endswith(".yaml") or output_path.endswith(".yml")): + output_path += ".yaml" + self.logger.warning(f"Adding .yaml extension to output path: {output_path}") + + with open(output_path, "w") as file: + yaml.dump(self.config, file) + + self.logger.info(f"Configuration saved to {output_path}") @staticmethod def _compute_coverage(thetas, oracle_thetas, confint, joint_confint=None): @@ -135,3 +207,48 @@ def _compute_coverage(thetas, oracle_thetas, confint, joint_confint=None): result_dict["Uniform CI Length"] = ci_length_uniform return result_dict + + def _load_config(self, config_path: str) -> Dict[str, Any]: + """Load configuration from a YAML file.""" + if not os.path.exists(config_path): + raise FileNotFoundError(f"Config file not found: {config_path}") + + if config_path.endswith(".yaml") or config_path.endswith(".yml"): + with open(config_path, "r") as file: + config = yaml.safe_load(file) + else: + raise ValueError(f"Unsupported config file format: {config_path}. Use .yaml or .yml") + + return config + + def _process_config_parameters(self): + """ + Process any special configuration parameters. + Child classes should override this method to handle specific parameters. + """ + pass + + def _setup_logging(self, log_level: str, log_file: Optional[str]): + """Set up logging configuration.""" + level = getattr(logging, log_level.upper()) + self.logger = logging.getLogger(self.__class__.__name__) + self.logger.setLevel(level) + + # Clear any existing handlers + if self.logger.hasHandlers(): + self.logger.handlers.clear() + + # Console handler + ch = logging.StreamHandler() + ch.setLevel(level) + formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") + ch.setFormatter(formatter) + self.logger.addHandler(ch) + + # File handler if specified + if log_file: + os.makedirs(os.path.dirname(log_file), exist_ok=True) + fh = logging.FileHandler(log_file) + fh.setLevel(level) + fh.setFormatter(formatter) + self.logger.addHandler(fh) diff --git a/monte-cover/src/montecover/did/did_multi.py b/monte-cover/src/montecover/did/did_multi.py index d6d0489..68ce5f0 100644 --- a/monte-cover/src/montecover/did/did_multi.py +++ b/monte-cover/src/montecover/did/did_multi.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List +from typing import Any, Dict, Optional import doubleml as dml import numpy as np @@ -14,28 +14,56 @@ class DIDMultiCoverageSimulation(BaseSimulation): def __init__( self, - repetitions: int = 20, - n_obs: int = 500, - max_runtime: float = 5.5 * 3600, - random_seed: int = 42, + config_file: str, suppress_warnings: bool = True, + log_level: str = "INFO", + log_file: Optional[str] = None, ): super().__init__( - repetitions=repetitions, - max_runtime=max_runtime, - random_seed=random_seed, + config_file=config_file, suppress_warnings=suppress_warnings, + log_level=log_level, + log_file=log_file, ) - self.n_obs = n_obs + + # Additional results storage for aggregated results + self.results_aggregated = [] # Calculate oracle values self._calculate_oracle_values() - # Additional results storage for aggregated results - self.results_aggregated = [] + def _process_config_parameters(self): + """Process simulation-specific parameters from config""" + # Extract n_obs from config or use default + self.n_obs = self.config.get("n_obs", 500) + + # Process ML models in parameter grid + if "parameters" in self.config: + param_grid = self.config["parameters"] + + # Convert learner_g strings to actual objects + if "learner_g" in param_grid: + processed_learners_g = [] + for learner in param_grid["learner_g"]: + if isinstance(learner, list) and len(learner) == 2: + if learner[0] == "Linear": + processed_learners_g.append(("Linear", LinearRegression())) + # Add more model types as needed + param_grid["learner_g"] = processed_learners_g + + # Convert learner_m strings to actual objects + if "learner_m" in param_grid: + processed_learners_m = [] + for learner in param_grid["learner_m"]: + if isinstance(learner, list) and len(learner) == 2: + if learner[0] == "Linear": + processed_learners_m.append(("Linear", LogisticRegression())) + # Add more model types as needed + param_grid["learner_m"] = processed_learners_m def _calculate_oracle_values(self): """Calculate oracle values for the simulation.""" + self.logger.info("Calculating oracle values") self.oracle_values = dict() # Oracle values @@ -56,17 +84,6 @@ def _calculate_oracle_values(self): ).values.astype("datetime64[M]") self.oracle_values["eventstudy"] = df_oracle.groupby("e")["ite"].mean()[1:] - def setup_parameters(self) -> Dict[str, List[Any]]: - """Define simulation parameters.""" - return { - "DGP": [1, 4, 6], - "score": ["observational", "experimental"], - "in_sample_normalization": [True, False], - "learner_g": [("Linear", LinearRegression())], - "learner_m": [("Linear", LogisticRegression())], - "level": [0.95, 0.90], - } - def run_single_rep(self, params: Dict[str, Any]) -> Dict[str, Any]: """Run a single repetition with the given parameters.""" # Extract parameters @@ -77,6 +94,8 @@ def run_single_rep(self, params: Dict[str, Any]) -> Dict[str, Any]: learner_m_name, ml_m = params["learner_m"] level = params["level"] + self.logger.debug(f"Running with DGP={dgp_type}, score={score}, level={level}") + dml_data = self._generate_data(dgp_type=dgp_type) # Model @@ -104,7 +123,7 @@ def run_single_rep(self, params: Dict[str, Any]) -> Dict[str, Any]: oracle_thetas=oracle_thetas, confint=dml_model.confint(level=level), joint_confint=dml_model.confint(level=level, joint=True), - ) + ) for aggregation_method in ["group", "time", "eventstudy"]: agg_obj = dml_model.aggregate(aggregation=aggregation_method) @@ -119,19 +138,22 @@ def run_single_rep(self, params: Dict[str, Any]) -> Dict[str, Any]: # add parameters to the result for result_dict in result.values(): - result_dict.update({ - "Learner g": learner_g_name, - "Learner m": learner_m_name, - "Score": score, - "In-sample-norm.": in_sample_normalization, - "DGP": dgp_type, - "level": level, - }) + result_dict.update( + { + "Learner g": learner_g_name, + "Learner m": learner_m_name, + "Score": score, + "In-sample-norm.": in_sample_normalization, + "DGP": dgp_type, + "level": level, + } + ) return result def summarize_results(self): """Summarize the simulation results.""" + self.logger.info("Summarizing simulation results") groupby_cols = ["Learner g", "Learner m", "Score", "In-sample-norm.", "DGP", "level"] aggregation_dict = { @@ -145,11 +167,8 @@ def summarize_results(self): result_summary = dict() for result_name, result_df in self.results.items(): - result_summary[result_name] = ( - result_df.groupby(groupby_cols) - .agg(aggregation_dict) - .reset_index() - ) + result_summary[result_name] = result_df.groupby(groupby_cols).agg(aggregation_dict).reset_index() + self.logger.debug(f"Summarized {result_name} results") return result_summary diff --git a/monte-cover/uv.lock b/monte-cover/uv.lock index eed1b7c..57e1dd3 100644 --- a/monte-cover/uv.lock +++ b/monte-cover/uv.lock @@ -511,6 +511,7 @@ dependencies = [ { name = "lightgbm" }, { name = "numpy" }, { name = "pandas" }, + { name = "pyyaml" }, { name = "ruff" }, { name = "scikit-learn" }, ] @@ -525,6 +526,7 @@ requires-dist = [ { name = "lightgbm", specifier = ">=4.6.0" }, { name = "numpy", specifier = ">=2.2.4" }, { name = "pandas", specifier = ">=2.2.3" }, + { name = "pyyaml", specifier = ">=6.0.2" }, { name = "ruff", specifier = ">=0.11.0" }, { name = "scikit-learn", specifier = ">=1.5.2" }, ] @@ -862,6 +864,32 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/b4/f4/f785020090fb050e7fb6d34b780f2231f302609dc964672f72bfaeb59a28/pywin32-310-cp313-cp313-win_arm64.whl", hash = "sha256:e308f831de771482b7cf692a1f308f8fca701b2d8f9dde6cc440c7da17e47b33", size = 8458152 }, ] +[[package]] +name = "pyyaml" +version = "6.0.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e", size = 130631 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/86/0c/c581167fc46d6d6d7ddcfb8c843a4de25bdd27e4466938109ca68492292c/PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab", size = 183873 }, + { url = "https://files.pythonhosted.org/packages/a8/0c/38374f5bb272c051e2a69281d71cba6fdb983413e6758b84482905e29a5d/PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725", size = 173302 }, + { url = "https://files.pythonhosted.org/packages/c3/93/9916574aa8c00aa06bbac729972eb1071d002b8e158bd0e83a3b9a20a1f7/PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5", size = 739154 }, + { url = "https://files.pythonhosted.org/packages/95/0f/b8938f1cbd09739c6da569d172531567dbcc9789e0029aa070856f123984/PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425", size = 766223 }, + { url = "https://files.pythonhosted.org/packages/b9/2b/614b4752f2e127db5cc206abc23a8c19678e92b23c3db30fc86ab731d3bd/PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476", size = 767542 }, + { url = "https://files.pythonhosted.org/packages/d4/00/dd137d5bcc7efea1836d6264f049359861cf548469d18da90cd8216cf05f/PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48", size = 731164 }, + { url = "https://files.pythonhosted.org/packages/c9/1f/4f998c900485e5c0ef43838363ba4a9723ac0ad73a9dc42068b12aaba4e4/PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b", size = 756611 }, + { url = "https://files.pythonhosted.org/packages/df/d1/f5a275fdb252768b7a11ec63585bc38d0e87c9e05668a139fea92b80634c/PyYAML-6.0.2-cp312-cp312-win32.whl", hash = "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4", size = 140591 }, + { url = "https://files.pythonhosted.org/packages/0c/e8/4f648c598b17c3d06e8753d7d13d57542b30d56e6c2dedf9c331ae56312e/PyYAML-6.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8", size = 156338 }, + { url = "https://files.pythonhosted.org/packages/ef/e3/3af305b830494fa85d95f6d95ef7fa73f2ee1cc8ef5b495c7c3269fb835f/PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba", size = 181309 }, + { url = "https://files.pythonhosted.org/packages/45/9f/3b1c20a0b7a3200524eb0076cc027a970d320bd3a6592873c85c92a08731/PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1", size = 171679 }, + { url = "https://files.pythonhosted.org/packages/7c/9a/337322f27005c33bcb656c655fa78325b730324c78620e8328ae28b64d0c/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133", size = 733428 }, + { url = "https://files.pythonhosted.org/packages/a3/69/864fbe19e6c18ea3cc196cbe5d392175b4cf3d5d0ac1403ec3f2d237ebb5/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484", size = 763361 }, + { url = "https://files.pythonhosted.org/packages/04/24/b7721e4845c2f162d26f50521b825fb061bc0a5afcf9a386840f23ea19fa/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5", size = 759523 }, + { url = "https://files.pythonhosted.org/packages/2b/b2/e3234f59ba06559c6ff63c4e10baea10e5e7df868092bf9ab40e5b9c56b6/PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc", size = 726660 }, + { url = "https://files.pythonhosted.org/packages/fe/0f/25911a9f080464c59fab9027482f822b86bf0608957a5fcc6eaac85aa515/PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652", size = 751597 }, + { url = "https://files.pythonhosted.org/packages/14/0d/e2c3b43bbce3cf6bd97c840b46088a3031085179e596d4929729d8d68270/PyYAML-6.0.2-cp313-cp313-win32.whl", hash = "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183", size = 140527 }, + { url = "https://files.pythonhosted.org/packages/fa/de/02b54f42487e3d3c6efb3f89428677074ca7bf43aae402517bc7cca949f3/PyYAML-6.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563", size = 156446 }, +] + [[package]] name = "pyzmq" version = "26.3.0" diff --git a/scripts/did/did_pa_multi_agg_coverage.py b/scripts/did/did_pa_multi_agg_coverage.py index 01d95db..5878820 100644 --- a/scripts/did/did_pa_multi_agg_coverage.py +++ b/scripts/did/did_pa_multi_agg_coverage.py @@ -1,8 +1,14 @@ -from montecover.did import DIDMultiCoverageSimulation -simulation = DIDMultiCoverageSimulation( - repetitions=5, - n_obs=500, +from montecover.did.did_multi import DIDMultiCoverageSimulation + +# Create and run simulation with config file +sim = DIDMultiCoverageSimulation( + config_file="scripts/did/multi_config.yml", + log_level="INFO", + log_file="logs/current_sim.log" ) -simulation.run_simulation() -simulation.save_results(output_path="results/did/", file_prefix="did_pa_multi_coverage") \ No newline at end of file +sim.run_simulation() +sim.save_results(output_path="results/did/", file_prefix="did_multi_run") + +# Save config file for reproducibility +sim.save_config("results/did/multi_config.yml") diff --git a/scripts/did/multi_config.yml b/scripts/did/multi_config.yml new file mode 100644 index 0000000..87348f1 --- /dev/null +++ b/scripts/did/multi_config.yml @@ -0,0 +1,24 @@ +# Simulation parameters for DID Multi Coverage +repetitions: 2 +max_runtime: 19800 # 5.5 hours in seconds +random_seed: 42 +n_obs: 500 # Sample size + +# Parameter grid for simulation +parameters: + DGP: [1, 4, 6] # Different DGP specifications + score: + - observational # Standard DML score + - experimental # Experimental score (no propensity estimation) + + in_sample_normalization: [true, false] + + # ML methods for outcome model + learner_g: + - ["Linear", "LinearRegression"] + + # ML methods for propensity score + learner_m: + - ["Linear", "LogisticRegression"] + + level: [0.95, 0.90] # Confidence levels \ No newline at end of file From 2737ef6c30167a06c04fb79e72ba23d0f462bb62 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Wed, 19 Mar 2025 16:10:40 +0100 Subject: [PATCH 12/60] seperate parameter configurations --- monte-cover/src/montecover/base.py | 103 +++++++++------- monte-cover/src/montecover/did/did_multi.py | 123 +++++++++----------- 2 files changed, 116 insertions(+), 110 deletions(-) diff --git a/monte-cover/src/montecover/base.py b/monte-cover/src/montecover/base.py index cba4e8f..be7ef1f 100644 --- a/monte-cover/src/montecover/base.py +++ b/monte-cover/src/montecover/base.py @@ -6,7 +6,7 @@ from abc import ABC, abstractmethod from datetime import datetime from itertools import product -from typing import Any, Dict, List, Optional +from typing import Any, Dict, Optional import doubleml as dml import numpy as np @@ -29,9 +29,10 @@ def __init__( self.config = self._load_config(config_file) # Apply parameters from config - self.repetitions = self.config.get("repetitions", 20) - self.max_runtime = self.config.get("max_runtime", 5.5 * 3600) - self.random_seed = self.config.get("random_seed", 42) + self.simulation_parameters = self.config.get("simulation_parameters", {}) + self.repetitions = self.simulation_parameters.get("repetitions", 20) + self.max_runtime = self.simulation_parameters.get("max_runtime", 5.5 * 3600) + self.random_seed = self.simulation_parameters.get("random_seed", 42) self.suppress_warnings = suppress_warnings # Set up logging @@ -55,8 +56,16 @@ def __init__( self.logger.info(f"Initialized simulation with random seed {self.random_seed}") # Let child classes process any specific parameters + self.dgp_parameters = self.config.get("dgp_parameters", {}) + self.dml_parameters = self.config.get("dml_parameters", {}) + self.confidence_parameters = self.config.get("confidence_parameters", {}) self._process_config_parameters() + @abstractmethod + def _generate_dml_data(self, dgp_params: Dict[str, Any]) -> dml.DoubleMLData: + """Generate data for the DoubleML simulation.""" + pass + @abstractmethod def run_single_rep(self, params: Dict[str, Any]) -> Dict[str, Any]: """Run a single repetition with the given parameters.""" @@ -67,23 +76,19 @@ def summarize_results(self) -> Dict[str, Any]: """Summarize the simulation results.""" pass - def get_parameters(self) -> Dict[str, List[Any]]: - """Get parameter grid from config.""" - param_grid = self.config.get("parameters", {}) - if not param_grid: - self.logger.warning("No parameter grid found in config. Using empty parameter set.") - return param_grid - def run_simulation(self): """Run the full simulation.""" self.start_time = time.time() self.logger.info("Starting simulation") - param_grid = self.get_parameters() - self.logger.info(f"Parameter grid: {param_grid}") + self.logger.info(f"DGP Parameters: {self.dgp_parameters}") + self.logger.info(f"DML Parameters: {self.dml_parameters}") + self.logger.info(f"Confidence Parameters: {self.confidence_parameters}") # Calculate total number of parameter combinations - total_combinations = np.prod([len(values) for values in param_grid.values()]) + dgp_combinations = [len(v) for v in self.dgp_parameters.values()] + dml_combinations = [len(v) for v in self.dml_parameters.values()] + total_combinations = np.prod(dgp_combinations + dml_combinations) self.logger.info(f"Total parameter combinations: {total_combinations}") # Calculate expected total iterations @@ -102,36 +107,46 @@ def run_simulation(self): break param_combo = 0 - keys = param_grid.keys() - for values in product(*param_grid.values()): - param_combo += 1 - params = dict(zip(keys, values)) - param_start_time = time.time() - - # Log parameter combination - self.logger.debug(f"Rep {i_rep+1}, Combo {param_combo}/{total_combinations}: {params}") - - try: - repetition_results = self.run_single_rep(params) - param_end_time = time.time() - param_duration = param_end_time - param_start_time - - if repetition_results is not None: - assert isinstance(repetition_results, dict), "The result must be a dictionary." - # Process each dataframe in the result dictionary - for result_name, repetition_result in repetition_results.items(): - assert isinstance(repetition_result, dict), "Each result must be a dictionary." - repetition_result["repetition"] = i_rep - - # Initialize key in results dict if not exists - if result_name not in self.results: - self.results[result_name] = [] - self.results[result_name].append(repetition_result) - - self.logger.debug(f"Parameter combination completed in {param_duration:.2f}s") - except Exception as e: - self.logger.error(f"Error in repetition {i_rep+1}, parameters {params}: {str(e)}") - self.logger.exception("Exception details:") + # loop through all + for dgp_param_values in product(*self.dgp_parameters.values()): + dgp_params = dict(zip(self.dgp_parameters.keys(), dgp_param_values)) + dml_data = self._generate_dml_data(dgp_params) + + for dml_param_values in product(*self.dml_parameters.values()): + dml_params = dict(zip(self.dml_parameters.keys(), dml_param_values)) + + param_combo += 1 + # Log parameter combination + self.logger.debug( + f"Rep {i_rep+1}, Combo {param_combo}/{total_combinations}: DGPs {dgp_params}, DML {dml_params}" + ) + param_start_time = time.time() + + try: + repetition_results = self.run_single_rep(dml_data, dml_params) + param_end_time = time.time() + param_duration = param_end_time - param_start_time + + if repetition_results is not None: + assert isinstance(repetition_results, dict), "The result must be a dictionary." + # Process each dataframe in the result dictionary + for result_name, repetition_result in repetition_results.items(): + assert isinstance(repetition_result, dict), "Each result must be a dictionary." + repetition_result["repetition"] = i_rep + # add dgp parameters to the result + repetition_result.update(dgp_params) + + # Initialize key in results dict if not exists + if result_name not in self.results: + self.results[result_name] = [] + self.results[result_name].append(repetition_result) + + self.logger.debug(f"Parameter combination completed in {param_duration:.2f}s") + except Exception as e: + self.logger.error( + f"Error: repetition {i_rep+1}, DGP parameters {dgp_params}, DML parameters {dml_params}: {str(e)}" + ) + self.logger.exception("Exception details:") rep_end_time = time.time() rep_duration = rep_end_time - rep_start_time diff --git a/monte-cover/src/montecover/did/did_multi.py b/monte-cover/src/montecover/did/did_multi.py index 68ce5f0..e7dfd56 100644 --- a/monte-cover/src/montecover/did/did_multi.py +++ b/monte-cover/src/montecover/did/did_multi.py @@ -4,6 +4,7 @@ import numpy as np import pandas as pd from doubleml.did.datasets import make_did_CS2021 +from lightgbm import LGBMClassifier, LGBMRegressor from sklearn.linear_model import LinearRegression, LogisticRegression from montecover.base import BaseSimulation @@ -34,32 +35,28 @@ def __init__( def _process_config_parameters(self): """Process simulation-specific parameters from config""" - # Extract n_obs from config or use default - self.n_obs = self.config.get("n_obs", 500) - # Process ML models in parameter grid - if "parameters" in self.config: - param_grid = self.config["parameters"] - - # Convert learner_g strings to actual objects - if "learner_g" in param_grid: - processed_learners_g = [] - for learner in param_grid["learner_g"]: - if isinstance(learner, list) and len(learner) == 2: - if learner[0] == "Linear": - processed_learners_g.append(("Linear", LinearRegression())) - # Add more model types as needed - param_grid["learner_g"] = processed_learners_g - - # Convert learner_m strings to actual objects - if "learner_m" in param_grid: - processed_learners_m = [] - for learner in param_grid["learner_m"]: - if isinstance(learner, list) and len(learner) == 2: - if learner[0] == "Linear": - processed_learners_m.append(("Linear", LogisticRegression())) - # Add more model types as needed - param_grid["learner_m"] = processed_learners_m + + assert "learners" in self.dml_parameters, "No learners specified in the config file" + for learner in self.dml_parameters["learners"]: + assert "ml_g" in learner, "No ml_g specified in the config file" + assert "ml_m" in learner, "No ml_m specified in the config file" + + # Convert ml_g strings to actual objects + if learner["ml_g"][0] == "Linear": + learner["ml_g"] = ("Linear", LinearRegression()) + elif learner["ml_g"][0] == "LGBM": + learner["ml_g"] = ("LGBM", LGBMRegressor(n_estimators=5, verbose=-1)) + else: + raise ValueError(f"Unknown learner type: {learner['ml_g']}") + + # Convert ml_m strings to actual objects + if learner["ml_m"][0] == "Linear": + learner["ml_m"] = ("Linear", LogisticRegression()) + elif learner["ml_m"][0] == "LGBM": + learner["ml_m"] = ("LGBM", LGBMClassifier(n_estimators=5, verbose=-1)) + else: + raise ValueError(f"Unknown learner type: {learner['ml_m']}") def _calculate_oracle_values(self): """Calculate oracle values for the simulation.""" @@ -84,19 +81,13 @@ def _calculate_oracle_values(self): ).values.astype("datetime64[M]") self.oracle_values["eventstudy"] = df_oracle.groupby("e")["ite"].mean()[1:] - def run_single_rep(self, params: Dict[str, Any]) -> Dict[str, Any]: + def run_single_rep(self, dml_data, dml_params) -> Dict[str, Any]: """Run a single repetition with the given parameters.""" # Extract parameters - dgp_type = params["DGP"] - score = params["score"] - in_sample_normalization = params["in_sample_normalization"] - learner_g_name, ml_g = params["learner_g"] - learner_m_name, ml_m = params["learner_m"] - level = params["level"] - - self.logger.debug(f"Running with DGP={dgp_type}, score={score}, level={level}") - - dml_data = self._generate_data(dgp_type=dgp_type) + learner_g_name, ml_g = dml_params["learners"]["ml_g"] + learner_m_name, ml_m = dml_params["learners"]["ml_m"] + score = dml_params["score"] + in_sample_normalization = dml_params["in_sample_normalization"] # Model dml_model = dml.did.DoubleMLDIDMulti( @@ -118,36 +109,36 @@ def run_single_rep(self, params: Dict[str, Any]) -> Dict[str, Any]: oracle_thetas[i] = self.oracle_values["detailed"][group_index & time_index]["ite"].iloc[0] result = dict() - result["detailed"] = self._compute_coverage( - thetas=dml_model.coef, - oracle_thetas=oracle_thetas, - confint=dml_model.confint(level=level), - joint_confint=dml_model.confint(level=level, joint=True), - ) - - for aggregation_method in ["group", "time", "eventstudy"]: - agg_obj = dml_model.aggregate(aggregation=aggregation_method) - agg_obj.aggregated_frameworks.bootstrap(n_rep_boot=2000) - - result[aggregation_method] = self._compute_coverage( - thetas=agg_obj.aggregated_frameworks.thetas, - oracle_thetas=self.oracle_values[aggregation_method].values, - confint=agg_obj.aggregated_frameworks.confint(level=level), - joint_confint=agg_obj.aggregated_frameworks.confint(level=level, joint=True), + for level in self.confidence_parameters["level"]: + result["detailed"] = self._compute_coverage( + thetas=dml_model.coef, + oracle_thetas=oracle_thetas, + confint=dml_model.confint(level=level), + joint_confint=dml_model.confint(level=level, joint=True), ) - # add parameters to the result - for result_dict in result.values(): - result_dict.update( - { - "Learner g": learner_g_name, - "Learner m": learner_m_name, - "Score": score, - "In-sample-norm.": in_sample_normalization, - "DGP": dgp_type, - "level": level, - } - ) + for aggregation_method in ["group", "time", "eventstudy"]: + agg_obj = dml_model.aggregate(aggregation=aggregation_method) + agg_obj.aggregated_frameworks.bootstrap(n_rep_boot=2000) + + result[aggregation_method] = self._compute_coverage( + thetas=agg_obj.aggregated_frameworks.thetas, + oracle_thetas=self.oracle_values[aggregation_method].values, + confint=agg_obj.aggregated_frameworks.confint(level=level), + joint_confint=agg_obj.aggregated_frameworks.confint(level=level, joint=True), + ) + + # add parameters to the result + for result_dict in result.values(): + result_dict.update( + { + "Learner g": learner_g_name, + "Learner m": learner_m_name, + "Score": score, + "In-sample-norm.": in_sample_normalization, + "level": level, + } + ) return result @@ -172,9 +163,9 @@ def summarize_results(self): return result_summary - def _generate_data(self, dgp_type: int) -> dml.data.DoubleMLPanelData: + def _generate_dml_data(self, dgp_params) -> dml.data.DoubleMLPanelData: """Generate data for the simulation.""" - data = make_did_CS2021(n_obs=self.n_obs, dgp_type=dgp_type) + data = make_did_CS2021(n_obs=dgp_params["n_obs"], dgp_type=dgp_params["DGP"]) dml_data = dml.data.DoubleMLPanelData( data, y_col="y", From 2b9bdfca747f434d339d6eec043224afed0ca972 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Wed, 19 Mar 2025 16:38:36 +0100 Subject: [PATCH 13/60] run multi simulation --- results/did/did_multi_detailed.csv | 13 ++ results/did/did_multi_eventstudy.csv | 13 ++ results/did/did_multi_group.csv | 13 ++ results/did/did_multi_metadata.csv | 2 + results/did/did_multi_time.csv | 13 ++ results/did/multi_config.yml | 50 +++++ scripts/did/did_pa_multi_agg_coverage.py | 14 -- scripts/did/did_pa_multi_coverage.py | 226 ++--------------------- scripts/did/multi_config.yml | 43 ++--- 9 files changed, 137 insertions(+), 250 deletions(-) create mode 100644 results/did/did_multi_detailed.csv create mode 100644 results/did/did_multi_eventstudy.csv create mode 100644 results/did/did_multi_group.csv create mode 100644 results/did/did_multi_metadata.csv create mode 100644 results/did/did_multi_time.csv create mode 100644 results/did/multi_config.yml delete mode 100644 scripts/did/did_pa_multi_agg_coverage.py diff --git a/results/did/did_multi_detailed.csv b/results/did/did_multi_detailed.csv new file mode 100644 index 0000000..ddbb273 --- /dev/null +++ b/results/did/did_multi_detailed.csv @@ -0,0 +1,13 @@ +Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition +Linear,Linear,experimental,False,1,0.9,0.8770833333333333,0.5957148258014461,0.15382974604923927,0.82,0.9277609206218338,200 +Linear,Linear,experimental,False,4,0.9,0.6683333333333333,1.9698836561519315,0.8284907405553992,0.525,2.863183256412114,200 +Linear,Linear,experimental,False,6,0.9,0.89375,2.012015821768593,0.4972286199594851,0.9,2.910046927597859,200 +Linear,Linear,experimental,True,1,0.9,0.8745833333333333,0.5956334541132615,0.1540676164908103,0.82,0.929071986266196,200 +Linear,Linear,experimental,True,4,0.9,0.6695833333333333,1.9690878328880732,0.8280711666335188,0.515,2.8592795655154974,200 +Linear,Linear,experimental,True,6,0.9,0.8954166666666667,2.012277261422281,0.4972240370172027,0.905,2.910046165626694,200 +Linear,Linear,observational,False,1,0.9,0.89625,0.686900650227242,0.16556887731250863,0.905,1.0684577495769967,200 +Linear,Linear,observational,False,4,0.9,0.7866666666666667,3.124729480506762,0.9502826142586591,0.735,4.394633218514321,200 +Linear,Linear,observational,False,6,0.9,0.8970833333333332,2.773055872422081,0.7355132665655921,0.915,3.9680250024995116,200 +Linear,Linear,observational,True,1,0.9,0.88875,0.6660387052074566,0.16288234355298709,0.875,1.03599720010251,200 +Linear,Linear,observational,True,4,0.9,0.7770833333333332,2.832512839406202,0.8935845118739927,0.72,4.034877974695546,200 +Linear,Linear,observational,True,6,0.9,0.8975,2.5644621837469375,0.675326608841152,0.9,3.688249907793509,200 diff --git a/results/did/did_multi_eventstudy.csv b/results/did/did_multi_eventstudy.csv new file mode 100644 index 0000000..5486774 --- /dev/null +++ b/results/did/did_multi_eventstudy.csv @@ -0,0 +1,13 @@ +Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition +Linear,Linear,experimental,False,1,0.9,0.8833333333333333,0.42565718743306286,0.10936767904635211,0.835,0.6077012485542163,200 +Linear,Linear,experimental,False,4,0.9,0.6125,1.9569891887347262,0.9196943825351817,0.545,2.5358161709127596,200 +Linear,Linear,experimental,False,6,0.9,0.8975,2.0153850665398654,0.5111684848078778,0.88,2.5922545970785786,200 +Linear,Linear,experimental,True,1,0.9,0.8791666666666668,0.4255897490005149,0.10926516710603056,0.845,0.6066297468359033,200 +Linear,Linear,experimental,True,4,0.9,0.605,1.9564893215757844,0.9195779385934096,0.55,2.5307678617965537,200 +Linear,Linear,experimental,True,6,0.9,0.8941666666666667,2.015463986254987,0.5113312788664856,0.89,2.5944084708379807,200 +Linear,Linear,observational,False,1,0.9,0.9083333333333333,0.4882437838128583,0.11428563471509198,0.9,0.6956288268269425,200 +Linear,Linear,observational,False,4,0.9,0.7691666666666667,3.3932130254913604,1.0549489318868936,0.755,4.223665366280769,200 +Linear,Linear,observational,False,6,0.9,0.8958333333333333,2.8512971267032157,0.7733310576205062,0.895,3.607707492218858,200 +Linear,Linear,observational,True,1,0.9,0.8975,0.4745126476352591,0.11192315736615333,0.895,0.6757224816274575,200 +Linear,Linear,observational,True,4,0.9,0.7566666666666667,3.005791111628938,0.9858031123253609,0.71,3.794083607223553,200 +Linear,Linear,observational,True,6,0.9,0.8933333333333333,2.6626861416696204,0.7105550768719945,0.895,3.3880858319786715,200 diff --git a/results/did/did_multi_group.csv b/results/did/did_multi_group.csv new file mode 100644 index 0000000..a4dbdc4 --- /dev/null +++ b/results/did/did_multi_group.csv @@ -0,0 +1,13 @@ +Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition +Linear,Linear,experimental,False,1,0.9,0.8666666666666667,0.533698038133595,0.14197945807093054,0.85,0.6861047473750901,200 +Linear,Linear,experimental,False,4,0.9,0.66,2.1748653096663464,0.9342553462922274,0.525,2.745378335374161,200 +Linear,Linear,experimental,False,6,0.9,0.8883333333333333,2.217594064950379,0.5525144231877022,0.875,2.791344195057897,200 +Linear,Linear,experimental,True,1,0.9,0.87,0.5335807495502426,0.14168060865880763,0.865,0.6849043629713572,200 +Linear,Linear,experimental,True,4,0.9,0.6633333333333333,2.173005344301668,0.9333928409584715,0.51,2.7419250872101033,200 +Linear,Linear,experimental,True,6,0.9,0.8933333333333333,2.2188654092146014,0.5513512630008591,0.85,2.790603998972855,200 +Linear,Linear,observational,False,1,0.9,0.8966666666666667,0.6108816472728611,0.145895094484495,0.87,0.783552984172717,200 +Linear,Linear,observational,False,4,0.9,0.78,3.5092375556264455,1.0649254128150685,0.73,4.316704955507763,200 +Linear,Linear,observational,False,6,0.9,0.895,2.9637734181525097,0.7818480925391569,0.9,3.6693459962202515,200 +Linear,Linear,observational,True,1,0.9,0.895,0.5920636535297172,0.1408811699533362,0.885,0.7597493231438954,200 +Linear,Linear,observational,True,4,0.9,0.7633333333333333,3.124012529892269,0.9973634763359689,0.72,3.880323357977367,200 +Linear,Linear,observational,True,6,0.9,0.8966666666666667,2.823741863032981,0.7474950667730065,0.88,3.5108185024043683,200 diff --git a/results/did/did_multi_metadata.csv b/results/did/did_multi_metadata.csv new file mode 100644 index 0000000..8f0a64a --- /dev/null +++ b/results/did/did_multi_metadata.csv @@ -0,0 +1,2 @@ +DoubleML Version,Script,Date,Total Runtime (seconds),Python Version,Config File +0.10.dev0,DIDMultiCoverageSimulation,2025-03-19 16:37:01,1605.1626930236816,3.12.9,scripts/did/multi_config.yml diff --git a/results/did/did_multi_time.csv b/results/did/did_multi_time.csv new file mode 100644 index 0000000..dd6f277 --- /dev/null +++ b/results/did/did_multi_time.csv @@ -0,0 +1,13 @@ +Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition +Linear,Linear,experimental,False,1,0.9,0.85,0.49360461245245374,0.13317137989658068,0.805,0.6319610870324371,200 +Linear,Linear,experimental,False,4,0.9,0.495,1.943482564791512,1.0099967068690494,0.475,2.237010089005512,200 +Linear,Linear,experimental,False,6,0.9,0.885,1.973586708219856,0.5137628285676683,0.875,2.269948492397086,200 +Linear,Linear,experimental,True,1,0.9,0.8533333333333333,0.4936441210979332,0.13386449414919313,0.815,0.6316313581946184,200 +Linear,Linear,experimental,True,4,0.9,0.495,1.9419691602716298,1.0073536527153972,0.485,2.233138294309388,200 +Linear,Linear,experimental,True,6,0.9,0.8916666666666667,1.9743669935047528,0.5111362751423758,0.895,2.2727934396360774,200 +Linear,Linear,observational,False,1,0.9,0.905,0.5957890718380163,0.14322442977409994,0.905,0.7621516555071253,200 +Linear,Linear,observational,False,4,0.9,0.7166666666666667,3.587198674078982,1.1518798523193952,0.695,4.005822809393348,200 +Linear,Linear,observational,False,6,0.9,0.8966666666666667,2.8422258436545302,0.7656607981855843,0.9,3.235109337869692,200 +Linear,Linear,observational,True,1,0.9,0.8966666666666667,0.5736643332685405,0.13819068965761655,0.89,0.7334447199193829,200 +Linear,Linear,observational,True,4,0.9,0.7016666666666667,3.135225381339414,1.0623341589035538,0.66,3.525109938704791,200 +Linear,Linear,observational,True,6,0.9,0.8816666666666667,2.6295968848181595,0.7121484510464997,0.87,3.011021831651718,200 diff --git a/results/did/multi_config.yml b/results/did/multi_config.yml new file mode 100644 index 0000000..b53271c --- /dev/null +++ b/results/did/multi_config.yml @@ -0,0 +1,50 @@ +confidence_parameters: + level: + - 0.95 + - 0.9 +dgp_parameters: + DGP: + - 1 + - 4 + - 6 + n_obs: + - 500 +dml_parameters: + in_sample_normalization: + - true + - false + learners: + - ml_g: !!python/tuple + - Linear + - !!python/object:sklearn.linear_model._base.LinearRegression + _sklearn_version: 1.5.2 + copy_X: true + fit_intercept: true + n_jobs: null + positive: false + ml_m: !!python/tuple + - Linear + - !!python/object:sklearn.linear_model._logistic.LogisticRegression + C: 1.0 + _sklearn_version: 1.5.2 + class_weight: null + dual: false + fit_intercept: true + intercept_scaling: 1 + l1_ratio: null + max_iter: 100 + multi_class: deprecated + n_jobs: null + penalty: l2 + random_state: null + solver: lbfgs + tol: 0.0001 + verbose: 0 + warm_start: false + score: + - observational + - experimental +simulation_parameters: + max_runtime: 19800 + random_seed: 42 + repetitions: 200 diff --git a/scripts/did/did_pa_multi_agg_coverage.py b/scripts/did/did_pa_multi_agg_coverage.py deleted file mode 100644 index 5878820..0000000 --- a/scripts/did/did_pa_multi_agg_coverage.py +++ /dev/null @@ -1,14 +0,0 @@ - -from montecover.did.did_multi import DIDMultiCoverageSimulation - -# Create and run simulation with config file -sim = DIDMultiCoverageSimulation( - config_file="scripts/did/multi_config.yml", - log_level="INFO", - log_file="logs/current_sim.log" -) -sim.run_simulation() -sim.save_results(output_path="results/did/", file_prefix="did_multi_run") - -# Save config file for reproducibility -sim.save_config("results/did/multi_config.yml") diff --git a/scripts/did/did_pa_multi_coverage.py b/scripts/did/did_pa_multi_coverage.py index 664bbf1..22251f2 100644 --- a/scripts/did/did_pa_multi_coverage.py +++ b/scripts/did/did_pa_multi_coverage.py @@ -1,218 +1,14 @@ -import numpy as np -import pandas as pd -from datetime import datetime -import time -import sys -import warnings -from sklearn.linear_model import LinearRegression, LogisticRegression -from lightgbm import LGBMRegressor, LGBMClassifier +from montecover.did.did_multi import DIDMultiCoverageSimulation -import doubleml as dml -from doubleml.did.datasets import make_did_CS2021 +# Create and run simulation with config file +sim = DIDMultiCoverageSimulation( + config_file="scripts/did/multi_config.yml", + log_level="INFO", + log_file="logs/current_sim.log" +) +sim.run_simulation() +sim.save_results(output_path="results/did/", file_prefix="did_multi") -# Suppress warnings -warnings.simplefilter(action='ignore', category=UserWarning) - -# Number of repetitions -n_rep = 20 -max_runtime = 5.5 * 3600 # 5.5 hours in seconds - -# Oracle values -df_oracle = make_did_CS2021(n_obs=int(1e+6), dgp_type=1) # does not depend on the DGP type -df_oracle["ite"] = df_oracle["y1"] - df_oracle["y0"] -df_oracle_thetas = df_oracle.groupby(["d", "t"])["ite"].mean().reset_index() -print("ATTs:") -print(df_oracle_thetas) - -df_oracle_post_treatment = df_oracle[df_oracle["t"] >= df_oracle["d"]] -# Group aggregation -df_oracle_agg_group = df_oracle_post_treatment.groupby("d")["ite"].mean() -print("Group aggregated ATTs:") -print(df_oracle_agg_group) - -# Time aggregation -df_oracle_agg_time = df_oracle_post_treatment.groupby("t")["ite"].mean() -print("Time aggregated ATTs:") -print(df_oracle_agg_time) - -# Eventstudy aggregation -df_oracle["e"] = pd.to_datetime(df_oracle["t"]).values.astype("datetime64[M]") - \ - pd.to_datetime(df_oracle["d"]).values.astype("datetime64[M]") -df_oracle_agg_eventstudy = df_oracle.groupby("e")["ite"].mean() -print("Event Study aggregated ATTs:") -print(df_oracle_agg_eventstudy) - -# DGP pars -n_obs = 500 -dgp_types = [1, 4, 6] - -# set up hyperparameters -hyperparam_dict = { - "DGP": dgp_types, - "score": ["observational", "experimental"], - "in sample normalization": [True, False], - "learner_g": [("Linear", LinearRegression()),], - "learner_m": [("Linear", LogisticRegression()),], - "level": [0.95, 0.90] -} - -# set up the results dataframe -df_results_detailed = pd.DataFrame() -df_results_agg = pd.DataFrame() - -# start simulation -np.random.seed(42) -start_time = time.time() - -for i_rep in range(n_rep): - print(f"Repetition: {i_rep + 1}/{n_rep}", end="\r") - - # Check the elapsed time - elapsed_time = time.time() - start_time - if elapsed_time > max_runtime: - print("Maximum runtime exceeded. Stopping the simulation.") - break - - for i_dgp, dgp_type in enumerate(dgp_types): - # define the DoubleML data object - data = make_did_CS2021(n_obs=n_obs, dgp_type=dgp_type) - obj_dml_data = dml.data.DoubleMLPanelData( - data, - y_col="y", - d_cols="d", - id_col="id", - t_col="t", - x_cols=["Z1", "Z2", "Z3", "Z4"], - ) - - for learner_g_idx, (learner_g_name, ml_g) in enumerate(hyperparam_dict["learner_g"]): - for learner_m_idx, (learner_m_name, ml_m) in enumerate(hyperparam_dict["learner_m"]): - for score in hyperparam_dict["score"]: - for in_sample_normalization in hyperparam_dict["in sample normalization"]: - if score == "experimental": - dml_DiD = dml.did.DoubleMLDIDMulti( - obj_dml_data=obj_dml_data, - ml_g=ml_g, - ml_m=None, - gt_combinations="standard", - score=score, - in_sample_normalization=in_sample_normalization) - else: - assert score == "observational" - dml_DiD = dml.did.DoubleMLDIDMulti( - obj_dml_data=obj_dml_data, - ml_g=ml_g, - ml_m=ml_m, - gt_combinations="standard", - score=score, - in_sample_normalization=in_sample_normalization) - dml_DiD.fit(n_jobs_cv=5) - - # oracle values - theta = np.full_like(dml_DiD.coef, np.nan) - for i, (g, _, t) in enumerate(dml_DiD.gt_combinations): - group_index = df_oracle_thetas["d"] == g - time_index = df_oracle_thetas["t"] == t - theta[i] = df_oracle_thetas[group_index & time_index]["ite"].iloc[0] - - for level_idx, level in enumerate(hyperparam_dict["level"]): - confint = dml_DiD.confint(level=level) - coverage = np.mean((confint.iloc[:, 0] < theta) & (theta < confint.iloc[:, 1])) - ci_length = np.mean(confint.iloc[:, 1] - confint.iloc[:, 0]) - bias = np.mean(abs(dml_DiD.coef - theta)) - - dml_DiD.bootstrap(n_rep_boot=2000) - confint_uniform = dml_DiD.confint(level=level, joint=True) - - coverage_uniform = all((confint_uniform.iloc[:, 0] < theta) & (theta < confint_uniform.iloc[:, 1])) - ci_length_uniform = np.mean(confint_uniform.iloc[:, 1] - confint_uniform.iloc[:, 0]) - - df_results_detailed = pd.concat( - (df_results_detailed, - pd.DataFrame({ - "Coverage": coverage, - "CI Length": ci_length, - "Bias": bias, - "Uniform Coverage": coverage_uniform, - "Uniform CI Length": ci_length_uniform, - "Learner g": learner_g_name, - "Learner m": learner_m_name, - "Score": score, - "In-sample-norm.": in_sample_normalization, - "DGP": dgp_type, - "level": level, - "repetition": i_rep}, index=[0])), - ignore_index=True) - - # group aggregation - group_agg = dml_DiD.aggregate(aggregation="group") - group_confint = group_agg.aggregated_frameworks.confint(level=level) - group_coverage = np.mean((group_confint.iloc[:, 0] < df_oracle_agg_group.values) & (df_oracle_agg_group.values < group_confint.iloc[:, 1])) - group_ci_length = np.mean(group_confint.iloc[:, 1] - group_confint.iloc[:, 0]) - group_bias = np.mean(abs(group_agg.aggregated_frameworks.thetas - df_oracle_agg_group.values)) - - group_agg.aggregated_frameworks.bootstrap(n_rep_boot=2000) - group_confint_uniform = group_agg.aggregated_frameworks.confint(level=level, joint=True) - group_coverage_uniform = all((group_confint_uniform.iloc[:, 0] < df_oracle_agg_group.values) & (df_oracle_agg_group.values < group_confint_uniform.iloc[:, 1])) - group_ci_length_uniform = np.mean(group_confint_uniform.iloc[:, 1] - group_confint_uniform.iloc[:, 0]) - - df_results_agg = pd.concat( - (df_results_agg, - pd.DataFrame({ - "Coverage": group_coverage, - "CI Length": group_ci_length, - "Bias": group_bias, - "Uniform Coverage": group_coverage_uniform, - "Uniform CI Length": group_ci_length_uniform, - "Learner g": learner_g_name, - "Learner m": learner_m_name, - "Score": score, - "In-sample-norm.": in_sample_normalization, - "DGP": dgp_type, - "level": level, - "repetition": i_rep}, index=[0]), - ), - ignore_index=True) - - -df_results = df_results_detailed.groupby( - ["Learner g", "Learner m", "Score", "In-sample-norm.", "DGP", "level"]).agg( - {"Coverage": "mean", - "CI Length": "mean", - "Bias": "mean", - "Uniform Coverage": "mean", - "Uniform CI Length": "mean", - "repetition": "count"} - ).reset_index() -print(df_results) - -df_results_agg = df_results_agg.groupby( - ["Learner g", "Learner m", "Score", "In-sample-norm.", "DGP", "level"]).agg( - {"Coverage": "mean", - "CI Length": "mean", - "Bias": "mean", - "Uniform Coverage": "mean", - "Uniform CI Length": "mean", - "repetition": "count"} - ).reset_index() -print(df_results_agg) - -end_time = time.time() -total_runtime = end_time - start_time - -# save results -script_name = "did_pa_multi_coverage.py" -path = "results/did/did_pa_multi_coverage" - -metadata = pd.DataFrame({ - 'DoubleML Version': [dml.__version__], - 'Script': [script_name], - 'Date': [datetime.now().strftime("%Y-%m-%d %H:%M:%S")], - 'Total Runtime (seconds)': [total_runtime], - 'Python Version': [f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"], -}) -print(metadata) - -df_results.to_csv(f"{path}.csv", index=False) -metadata.to_csv(f"{path}_metadata.csv", index=False) +# Save config file for reproducibility +sim.save_config("results/did/multi_config.yml") diff --git a/scripts/did/multi_config.yml b/scripts/did/multi_config.yml index 87348f1..de4d854 100644 --- a/scripts/did/multi_config.yml +++ b/scripts/did/multi_config.yml @@ -1,24 +1,25 @@ # Simulation parameters for DID Multi Coverage -repetitions: 2 -max_runtime: 19800 # 5.5 hours in seconds -random_seed: 42 -n_obs: 500 # Sample size -# Parameter grid for simulation -parameters: - DGP: [1, 4, 6] # Different DGP specifications - score: - - observational # Standard DML score - - experimental # Experimental score (no propensity estimation) - +simulation_parameters: + repetitions: 200 + max_runtime: 19800 # 5.5 hours in seconds + random_seed: 42 + +dgp_parameters: + DGP: [1, 4, 6] # Different DGP specifications + n_obs: [500] # Sample size for each simulation (has to be a list) + +dml_parameters: + # ML methods for ml_g and ml_m + learners: + - ml_g: ["Linear"] + ml_m: ["Linear"] + + score: + - observational # Standard DML score + - experimental # Experimental score (no propensity estimation) + in_sample_normalization: [true, false] - - # ML methods for outcome model - learner_g: - - ["Linear", "LinearRegression"] - - # ML methods for propensity score - learner_m: - - ["Linear", "LogisticRegression"] - - level: [0.95, 0.90] # Confidence levels \ No newline at end of file + +confidence_parameters: + level: [0.95, 0.90] # Confidence levels From c8e229696605cc2d640cdf29c516417dbb46ccbf Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Wed, 19 Mar 2025 16:50:01 +0100 Subject: [PATCH 14/60] update metadata --- monte-cover/src/montecover/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monte-cover/src/montecover/base.py b/monte-cover/src/montecover/base.py index be7ef1f..c374a9f 100644 --- a/monte-cover/src/montecover/base.py +++ b/monte-cover/src/montecover/base.py @@ -172,8 +172,8 @@ def save_results(self, output_path: str = "results", file_prefix: str = ""): { "DoubleML Version": [dml.__version__], "Script": [self.__class__.__name__], - "Date": [datetime.now().strftime("%Y-%m-%d %H:%M:%S")], - "Total Runtime (seconds)": [self.total_runtime], + "Date": [datetime.now().strftime("%Y-%m-%d %H:%M")], + "Total Runtime (minutes)": [self.total_runtime / 60], "Python Version": [f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"], "Config File": [self.config_file], } From 26002af2cc82327a1e10ac3f1527f060ebd316ec Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Wed, 19 Mar 2025 17:56:30 +0100 Subject: [PATCH 15/60] update sim with different levels --- monte-cover/src/montecover/base.py | 12 +++++++----- monte-cover/src/montecover/did/did_multi.py | 18 +++++++++++++----- results/did/did_multi_detailed.csv | 12 ++++++++++++ results/did/did_multi_eventstudy.csv | 12 ++++++++++++ results/did/did_multi_group.csv | 12 ++++++++++++ results/did/did_multi_metadata.csv | 4 ++-- results/did/did_multi_time.csv | 12 ++++++++++++ 7 files changed, 70 insertions(+), 12 deletions(-) diff --git a/monte-cover/src/montecover/base.py b/monte-cover/src/montecover/base.py index c374a9f..6eccc73 100644 --- a/monte-cover/src/montecover/base.py +++ b/monte-cover/src/montecover/base.py @@ -131,15 +131,17 @@ def run_simulation(self): assert isinstance(repetition_results, dict), "The result must be a dictionary." # Process each dataframe in the result dictionary for result_name, repetition_result in repetition_results.items(): - assert isinstance(repetition_result, dict), "Each result must be a dictionary." - repetition_result["repetition"] = i_rep - # add dgp parameters to the result - repetition_result.update(dgp_params) + assert isinstance(repetition_result, list), "Each repetition_result must be a list." + for res in repetition_result: + assert isinstance(res, dict), "Each res must be a dictionary." + res["repetition"] = i_rep + # add dgp parameters to the result + res.update(dgp_params) # Initialize key in results dict if not exists if result_name not in self.results: self.results[result_name] = [] - self.results[result_name].append(repetition_result) + self.results[result_name].extend(repetition_result) self.logger.debug(f"Parameter combination completed in {param_duration:.2f}s") except Exception as e: diff --git a/monte-cover/src/montecover/did/did_multi.py b/monte-cover/src/montecover/did/did_multi.py index e7dfd56..4eb6af0 100644 --- a/monte-cover/src/montecover/did/did_multi.py +++ b/monte-cover/src/montecover/did/did_multi.py @@ -108,9 +108,15 @@ def run_single_rep(self, dml_data, dml_params) -> Dict[str, Any]: time_index = self.oracle_values["detailed"]["t"] == t oracle_thetas[i] = self.oracle_values["detailed"][group_index & time_index]["ite"].iloc[0] - result = dict() + result = { + "detailed": [], + "group": [], + "time": [], + "eventstudy": [], + } for level in self.confidence_parameters["level"]: - result["detailed"] = self._compute_coverage( + level_result = dict() + level_result["detailed"] = self._compute_coverage( thetas=dml_model.coef, oracle_thetas=oracle_thetas, confint=dml_model.confint(level=level), @@ -121,7 +127,7 @@ def run_single_rep(self, dml_data, dml_params) -> Dict[str, Any]: agg_obj = dml_model.aggregate(aggregation=aggregation_method) agg_obj.aggregated_frameworks.bootstrap(n_rep_boot=2000) - result[aggregation_method] = self._compute_coverage( + level_result[aggregation_method] = self._compute_coverage( thetas=agg_obj.aggregated_frameworks.thetas, oracle_thetas=self.oracle_values[aggregation_method].values, confint=agg_obj.aggregated_frameworks.confint(level=level), @@ -129,8 +135,8 @@ def run_single_rep(self, dml_data, dml_params) -> Dict[str, Any]: ) # add parameters to the result - for result_dict in result.values(): - result_dict.update( + for res in level_result.values(): + res.update( { "Learner g": learner_g_name, "Learner m": learner_m_name, @@ -139,6 +145,8 @@ def run_single_rep(self, dml_data, dml_params) -> Dict[str, Any]: "level": level, } ) + for key, res in level_result.items(): + result[key].append(res) return result diff --git a/results/did/did_multi_detailed.csv b/results/did/did_multi_detailed.csv index ddbb273..f37be82 100644 --- a/results/did/did_multi_detailed.csv +++ b/results/did/did_multi_detailed.csv @@ -1,13 +1,25 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition Linear,Linear,experimental,False,1,0.9,0.8770833333333333,0.5957148258014461,0.15382974604923927,0.82,0.9277609206218338,200 +Linear,Linear,experimental,False,1,0.95,0.9329166666666667,0.709837996826105,0.15382974604923927,0.9,1.0183441020334203,200 Linear,Linear,experimental,False,4,0.9,0.6683333333333333,1.9698836561519315,0.8284907405553992,0.525,2.863183256412114,200 +Linear,Linear,experimental,False,4,0.95,0.7670833333333333,2.347261152317584,0.8284907405553992,0.64,3.1905243140809945,200 Linear,Linear,experimental,False,6,0.9,0.89375,2.012015821768593,0.4972286199594851,0.9,2.910046927597859,200 +Linear,Linear,experimental,False,6,0.95,0.9441666666666667,2.3974647241407983,0.4972286199594851,0.935,3.246758702976773,200 Linear,Linear,experimental,True,1,0.9,0.8745833333333333,0.5956334541132615,0.1540676164908103,0.82,0.929071986266196,200 +Linear,Linear,experimental,True,1,0.95,0.9333333333333332,0.7097410364792451,0.1540676164908103,0.895,1.0214045871405517,200 Linear,Linear,experimental,True,4,0.9,0.6695833333333333,1.9690878328880732,0.8280711666335188,0.515,2.8592795655154974,200 +Linear,Linear,experimental,True,4,0.95,0.7670833333333333,2.346312870409903,0.8280711666335188,0.645,3.184749486936283,200 Linear,Linear,experimental,True,6,0.9,0.8954166666666667,2.012277261422281,0.4972240370172027,0.905,2.910046165626694,200 +Linear,Linear,experimental,True,6,0.95,0.9433333333333332,2.3977762487025966,0.4972240370172027,0.93,3.2443247059312212,200 Linear,Linear,observational,False,1,0.9,0.89625,0.686900650227242,0.16556887731250863,0.905,1.0684577495769967,200 +Linear,Linear,observational,False,1,0.95,0.9441666666666667,0.8184926083044464,0.16556887731250863,0.93,1.1743444720583638,200 Linear,Linear,observational,False,4,0.9,0.7866666666666667,3.124729480506762,0.9502826142586591,0.735,4.394633218514321,200 +Linear,Linear,observational,False,4,0.95,0.8541666666666667,3.7233448270862413,0.9502826142586591,0.8,4.923945197030173,200 Linear,Linear,observational,False,6,0.9,0.8970833333333332,2.773055872422081,0.7355132665655921,0.915,3.9680250024995116,200 +Linear,Linear,observational,False,6,0.95,0.9541666666666667,3.304299876906268,0.7355132665655921,0.95,4.437925510709768,200 Linear,Linear,observational,True,1,0.9,0.88875,0.6660387052074566,0.16288234355298709,0.875,1.03599720010251,200 +Linear,Linear,observational,True,1,0.95,0.9408333333333333,0.7936340675709367,0.16288234355298709,0.925,1.1385204090656658,200 Linear,Linear,observational,True,4,0.9,0.7770833333333332,2.832512839406202,0.8935845118739927,0.72,4.034877974695546,200 +Linear,Linear,observational,True,4,0.95,0.8545833333333333,3.375147222839926,0.8935845118739927,0.78,4.5253801160151035,200 Linear,Linear,observational,True,6,0.9,0.8975,2.5644621837469375,0.675326608841152,0.9,3.688249907793509,200 +Linear,Linear,observational,True,6,0.95,0.9470833333333333,3.055745166318817,0.675326608841152,0.94,4.115336505261702,200 diff --git a/results/did/did_multi_eventstudy.csv b/results/did/did_multi_eventstudy.csv index 5486774..5d8b92f 100644 --- a/results/did/did_multi_eventstudy.csv +++ b/results/did/did_multi_eventstudy.csv @@ -1,13 +1,25 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition Linear,Linear,experimental,False,1,0.9,0.8833333333333333,0.42565718743306286,0.10936767904635211,0.835,0.6077012485542163,200 +Linear,Linear,experimental,False,1,0.95,0.9358333333333333,0.507201822374698,0.10936767904635211,0.905,0.6747323911476379,200 Linear,Linear,experimental,False,4,0.9,0.6125,1.9569891887347262,0.9196943825351817,0.545,2.5358161709127596,200 +Linear,Linear,experimental,False,4,0.95,0.7141666666666667,2.3318964467149415,0.9196943825351817,0.635,2.8827181581319787,200 Linear,Linear,experimental,False,6,0.9,0.8975,2.0153850665398654,0.5111684848078778,0.88,2.5922545970785786,200 +Linear,Linear,experimental,False,6,0.95,0.9441666666666667,2.40147942690741,0.5111684848078778,0.94,2.9541718057018187,200 Linear,Linear,experimental,True,1,0.9,0.8791666666666668,0.4255897490005149,0.10926516710603056,0.845,0.6066297468359033,200 +Linear,Linear,experimental,True,1,0.95,0.9358333333333333,0.5071214645259496,0.10926516710603056,0.915,0.6750610192677344,200 Linear,Linear,experimental,True,4,0.9,0.605,1.9564893215757844,0.9195779385934096,0.55,2.5307678617965537,200 +Linear,Linear,experimental,True,4,0.95,0.7158333333333333,2.3313008182574744,0.9195779385934096,0.65,2.872282262053714,200 Linear,Linear,experimental,True,6,0.9,0.8941666666666667,2.015463986254987,0.5113312788664856,0.89,2.5944084708379807,200 +Linear,Linear,experimental,True,6,0.95,0.9466666666666668,2.401573465548158,0.5113312788664856,0.93,2.9505612073229464,200 Linear,Linear,observational,False,1,0.9,0.9083333333333333,0.4882437838128583,0.11428563471509198,0.9,0.6956288268269425,200 +Linear,Linear,observational,False,1,0.95,0.9533333333333333,0.5817783517444832,0.11428563471509198,0.945,0.7729973931119418,200 Linear,Linear,observational,False,4,0.9,0.7691666666666667,3.3932130254913604,1.0549489318868936,0.755,4.223665366280769,200 +Linear,Linear,observational,False,4,0.95,0.8408333333333333,4.043262703053558,1.0549489318868936,0.81,4.8262642311066015,200 Linear,Linear,observational,False,6,0.9,0.8958333333333333,2.8512971267032157,0.7733310576205062,0.895,3.607707492218858,200 +Linear,Linear,observational,False,6,0.95,0.955,3.397530081699918,0.7733310576205062,0.955,4.122679418390554,200 Linear,Linear,observational,True,1,0.9,0.8975,0.4745126476352591,0.11192315736615333,0.895,0.6757224816274575,200 +Linear,Linear,observational,True,1,0.95,0.945,0.5654166938231102,0.11192315736615333,0.925,0.7517329711375669,200 Linear,Linear,observational,True,4,0.9,0.7566666666666667,3.005791111628938,0.9858031123253609,0.71,3.794083607223553,200 +Linear,Linear,observational,True,4,0.95,0.8341666666666667,3.581621019228321,0.9858031123253609,0.78,4.334336049644241,200 Linear,Linear,observational,True,6,0.9,0.8933333333333333,2.6626861416696204,0.7105550768719945,0.895,3.3880858319786715,200 +Linear,Linear,observational,True,6,0.95,0.9433333333333332,3.172786231124224,0.7105550768719945,0.935,3.871664400590925,200 diff --git a/results/did/did_multi_group.csv b/results/did/did_multi_group.csv index a4dbdc4..db6a426 100644 --- a/results/did/did_multi_group.csv +++ b/results/did/did_multi_group.csv @@ -1,13 +1,25 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition Linear,Linear,experimental,False,1,0.9,0.8666666666666667,0.533698038133595,0.14197945807093054,0.85,0.6861047473750901,200 +Linear,Linear,experimental,False,1,0.95,0.935,0.6359404364145231,0.14197945807093054,0.9,0.7748893935196418,200 Linear,Linear,experimental,False,4,0.9,0.66,2.1748653096663464,0.9342553462922274,0.525,2.745378335374161,200 +Linear,Linear,experimental,False,4,0.95,0.7633333333333333,2.5915118575455782,0.9342553462922274,0.655,3.1210909517446286,200 Linear,Linear,experimental,False,6,0.9,0.8883333333333333,2.217594064950379,0.5525144231877022,0.875,2.791344195057897,200 +Linear,Linear,experimental,False,6,0.95,0.9366666666666668,2.642426309803645,0.5525144231877022,0.92,3.170576857891774,200 Linear,Linear,experimental,True,1,0.9,0.87,0.5335807495502426,0.14168060865880763,0.865,0.6849043629713572,200 +Linear,Linear,experimental,True,1,0.95,0.9366666666666668,0.6358006784473694,0.14168060865880763,0.89,0.7736693416127448,200 Linear,Linear,experimental,True,4,0.9,0.6633333333333333,2.173005344301668,0.9333928409584715,0.51,2.7419250872101033,200 +Linear,Linear,experimental,True,4,0.95,0.76,2.5892955721159634,0.9333928409584715,0.65,3.1048660668399184,200 Linear,Linear,experimental,True,6,0.9,0.8933333333333333,2.2188654092146014,0.5513512630008591,0.85,2.790603998972855,200 +Linear,Linear,experimental,True,6,0.95,0.9366666666666668,2.6439412099315343,0.5513512630008591,0.93,3.172214838426176,200 Linear,Linear,observational,False,1,0.9,0.8966666666666667,0.6108816472728611,0.145895094484495,0.87,0.783552984172717,200 +Linear,Linear,observational,False,1,0.95,0.9466666666666668,0.7279103792903224,0.145895094484495,0.92,0.8844690424185709,200 Linear,Linear,observational,False,4,0.9,0.78,3.5092375556264455,1.0649254128150685,0.73,4.316704955507763,200 +Linear,Linear,observational,False,4,0.95,0.8466666666666667,4.181514457897795,1.0649254128150685,0.82,4.930150821324148,200 Linear,Linear,observational,False,6,0.9,0.895,2.9637734181525097,0.7818480925391569,0.9,3.6693459962202515,200 +Linear,Linear,observational,False,6,0.95,0.9483333333333333,3.53155384937329,0.7818480925391569,0.96,4.202951707840176,200 Linear,Linear,observational,True,1,0.9,0.895,0.5920636535297172,0.1408811699533362,0.885,0.7597493231438954,200 +Linear,Linear,observational,True,1,0.95,0.945,0.7054873567225215,0.1408811699533362,0.93,0.8582671047974608,200 Linear,Linear,observational,True,4,0.9,0.7633333333333333,3.124012529892269,0.9973634763359689,0.72,3.880323357977367,200 +Linear,Linear,observational,True,4,0.95,0.84,3.7224905277370017,0.9973634763359689,0.81,4.430132897406105,200 Linear,Linear,observational,True,6,0.9,0.8966666666666667,2.823741863032981,0.7474950667730065,0.88,3.5108185024043683,200 +Linear,Linear,observational,True,6,0.95,0.9466666666666668,3.3646959598709376,0.7474950667730065,0.945,4.0073726417113,200 diff --git a/results/did/did_multi_metadata.csv b/results/did/did_multi_metadata.csv index 8f0a64a..0e83932 100644 --- a/results/did/did_multi_metadata.csv +++ b/results/did/did_multi_metadata.csv @@ -1,2 +1,2 @@ -DoubleML Version,Script,Date,Total Runtime (seconds),Python Version,Config File -0.10.dev0,DIDMultiCoverageSimulation,2025-03-19 16:37:01,1605.1626930236816,3.12.9,scripts/did/multi_config.yml +DoubleML Version,Script,Date,Total Runtime (minutes),Python Version,Config File +0.10.dev0,DIDMultiCoverageSimulation,2025-03-19 17:35,27.171297589937847,3.12.9,scripts/did/multi_config.yml diff --git a/results/did/did_multi_time.csv b/results/did/did_multi_time.csv index dd6f277..0e8a662 100644 --- a/results/did/did_multi_time.csv +++ b/results/did/did_multi_time.csv @@ -1,13 +1,25 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition Linear,Linear,experimental,False,1,0.9,0.85,0.49360461245245374,0.13317137989658068,0.805,0.6319610870324371,200 +Linear,Linear,experimental,False,1,0.95,0.9083333333333333,0.5881661730610652,0.13317137989658068,0.89,0.7144940237492544,200 Linear,Linear,experimental,False,4,0.9,0.495,1.943482564791512,1.0099967068690494,0.475,2.237010089005512,200 +Linear,Linear,experimental,False,4,0.95,0.6183333333333334,2.315802311621298,1.0099967068690494,0.58,2.5967352695471275,200 Linear,Linear,experimental,False,6,0.9,0.885,1.973586708219856,0.5137628285676683,0.875,2.269948492397086,200 +Linear,Linear,experimental,False,6,0.95,0.935,2.351673611011224,0.5137628285676683,0.93,2.6378921840020486,200 Linear,Linear,experimental,True,1,0.9,0.8533333333333333,0.4936441210979332,0.13386449414919313,0.815,0.6316313581946184,200 +Linear,Linear,experimental,True,1,0.95,0.9083333333333333,0.5882132505158301,0.13386449414919313,0.89,0.7144700680586031,200 Linear,Linear,experimental,True,4,0.9,0.495,1.9419691602716298,1.0073536527153972,0.485,2.233138294309388,200 +Linear,Linear,experimental,True,4,0.95,0.6033333333333334,2.313998978908644,1.0073536527153972,0.6,2.590827144962406,200 Linear,Linear,experimental,True,6,0.9,0.8916666666666667,1.9743669935047528,0.5111362751423758,0.895,2.2727934396360774,200 +Linear,Linear,experimental,True,6,0.95,0.935,2.3526033782750138,0.5111362751423758,0.93,2.64045763785583,200 Linear,Linear,observational,False,1,0.9,0.905,0.5957890718380163,0.14322442977409994,0.905,0.7621516555071253,200 +Linear,Linear,observational,False,1,0.95,0.9483333333333333,0.7099264664353688,0.14322442977409994,0.94,0.8622889926115689,200 Linear,Linear,observational,False,4,0.9,0.7166666666666667,3.587198674078982,1.1518798523193952,0.695,4.005822809393348,200 +Linear,Linear,observational,False,4,0.95,0.7983333333333333,4.274410860263171,1.1518798523193952,0.785,4.68127664058613,200 Linear,Linear,observational,False,6,0.9,0.8966666666666667,2.8422258436545302,0.7656607981855843,0.9,3.235109337869692,200 +Linear,Linear,observational,False,6,0.95,0.9466666666666668,3.386720981256164,0.7656607981855843,0.935,3.77638226426171,200 Linear,Linear,observational,True,1,0.9,0.8966666666666667,0.5736643332685405,0.13819068965761655,0.89,0.7334447199193829,200 +Linear,Linear,observational,True,1,0.95,0.945,0.6835632143787673,0.13819068965761655,0.93,0.8284727058268883,200 Linear,Linear,observational,True,4,0.9,0.7016666666666667,3.135225381339414,1.0623341589035538,0.66,3.525109938704791,200 +Linear,Linear,observational,True,4,0.95,0.7783333333333333,3.7358514643214518,1.0623341589035538,0.77,4.10980058127257,200 Linear,Linear,observational,True,6,0.9,0.8816666666666667,2.6295968848181595,0.7121484510464997,0.87,3.011021831651718,200 +Linear,Linear,observational,True,6,0.95,0.935,3.1333579497006316,0.7121484510464997,0.95,3.4966663250213488,200 From 07968eea9369896640242ceb250eff03e953e9b7 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Wed, 19 Mar 2025 18:07:00 +0100 Subject: [PATCH 16/60] add aggregation sim to website --- doc/did/did_multi.qmd | 189 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 187 insertions(+), 2 deletions(-) diff --git a/doc/did/did_multi.qmd b/doc/did/did_multi.qmd index e2fc2ae..ef05bda 100644 --- a/doc/did/did_multi.qmd +++ b/doc/did/did_multi.qmd @@ -68,7 +68,7 @@ The simulations are based on the the [make_did_SZ2020](https://docs.doubleml.or ```{python} #| echo: false -metadata_file = '../../results/did/did_pa_multi_coverage_metadata.csv' +metadata_file = '../../results/did/did_multi_metadata.csv' metadata_df = pd.read_csv(metadata_file) print(metadata_df.T.to_string(header=False)) ``` @@ -79,7 +79,7 @@ print(metadata_df.T.to_string(header=False)) #| echo: false # set up data -df = pd.read_csv("../../results/did/did_pa_multi_coverage.csv", index_col=None) +df = pd.read_csv("../../results/did/did_multi_detailed.csv", index_col=None) assert df["repetition"].nunique() == 1 n_rep = df["repetition"].unique()[0] @@ -106,3 +106,188 @@ level = 0.9 df_ate_9 = df[(df['level'] == level) & (df["Score"] == score)][display_columns] make_pretty(df_ate_9, level, n_rep) ``` + + +### Experimental Score + +```{python} +#| echo: false +score = "experimental" +level = 0.95 + +df_ate_95 = df[(df['level'] == level) & (df["Score"] == score)][display_columns] +make_pretty(df_ate_95, level, n_rep) +``` + +```{python} +#| echo: false +score = "experimental" +level = 0.9 + +df_ate_9 = df[(df['level'] == level) & (df["Score"] == score)][display_columns] +make_pretty(df_ate_9, level, n_rep) +``` + +## Aggregated Effects + +### Group Effects + +```{python} +#| echo: false + +# set up data +df = pd.read_csv("../../results/did/did_multi_group.csv", index_col=None) + +assert df["repetition"].nunique() == 1 +n_rep = df["repetition"].unique()[0] + +display_columns = ["Learner g", "Learner m", "DGP", "In-sample-norm.", "Bias", "CI Length", "Coverage", "Uniform CI Length", "Uniform Coverage"] +``` + +#### Observational Score + +```{python} +#| echo: false +score = "observational" +level = 0.95 + +df_ate_95 = df[(df['level'] == level) & (df["Score"] == score)][display_columns] +make_pretty(df_ate_95, level, n_rep) +``` + +```{python} +#| echo: false +score = "observational" +level = 0.9 + +df_ate_9 = df[(df['level'] == level) & (df["Score"] == score)][display_columns] +make_pretty(df_ate_9, level, n_rep) +``` + +#### Experimental Score + +```{python} +#| echo: false +score = "experimental" +level = 0.95 + +df_ate_95 = df[(df['level'] == level) & (df["Score"] == score)][display_columns] +make_pretty(df_ate_95, level, n_rep) +``` + +```{python} +#| echo: false +score = "experimental" +level = 0.9 + +df_ate_9 = df[(df['level'] == level) & (df["Score"] == score)][display_columns] +make_pretty(df_ate_9, level, n_rep) +``` + +### Time Effects + +```{python} +#| echo: false + +# set up data +df = pd.read_csv("../../results/did/did_multi_time.csv", index_col=None) + +assert df["repetition"].nunique() == 1 +n_rep = df["repetition"].unique()[0] + +display_columns = ["Learner g", "Learner m", "DGP", "In-sample-norm.", "Bias", "CI Length", "Coverage", "Uniform CI Length", "Uniform Coverage"] +``` + +#### Observational Score + +```{python} +#| echo: false +score = "observational" +level = 0.95 + +df_ate_95 = df[(df['level'] == level) & (df["Score"] == score)][display_columns] +make_pretty(df_ate_95, level, n_rep) +``` + +```{python} +#| echo: false +score = "observational" +level = 0.9 + +df_ate_9 = df[(df['level'] == level) & (df["Score"] == score)][display_columns] +make_pretty(df_ate_9, level, n_rep) +``` + +#### Experimental Score + +```{python} +#| echo: false +score = "experimental" +level = 0.95 + +df_ate_95 = df[(df['level'] == level) & (df["Score"] == score)][display_columns] +make_pretty(df_ate_95, level, n_rep) +``` + +```{python} +#| echo: false +score = "experimental" +level = 0.9 + +df_ate_9 = df[(df['level'] == level) & (df["Score"] == score)][display_columns] +make_pretty(df_ate_9, level, n_rep) +``` + +### Event Study Aggregation + +```{python} +#| echo: false + +# set up data +df = pd.read_csv("../../results/did/did_multi_eventstudy.csv", index_col=None) + +assert df["repetition"].nunique() == 1 +n_rep = df["repetition"].unique()[0] + +display_columns = ["Learner g", "Learner m", "DGP", "In-sample-norm.", "Bias", "CI Length", "Coverage", "Uniform CI Length", "Uniform Coverage"] +``` + +#### Observational Score + +```{python} +#| echo: false +score = "observational" +level = 0.95 + +df_ate_95 = df[(df['level'] == level) & (df["Score"] == score)][display_columns] +make_pretty(df_ate_95, level, n_rep) +``` + +```{python} +#| echo: false +score = "observational" +level = 0.9 + +df_ate_9 = df[(df['level'] == level) & (df["Score"] == score)][display_columns] +make_pretty(df_ate_9, level, n_rep) +``` + +#### Experimental Score + +```{python} +#| echo: false +score = "experimental" +level = 0.95 + +df_ate_95 = df[(df['level'] == level) & (df["Score"] == score)][display_columns] +make_pretty(df_ate_95, level, n_rep) +``` + +```{python} +#| echo: false +score = "experimental" +level = 0.9 + +df_ate_9 = df[(df['level'] == level) & (df["Score"] == score)][display_columns] +make_pretty(df_ate_9, level, n_rep) +``` \ No newline at end of file From 7953be6fdbc562c9ffaadd11a1adae44dd3ab490 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Thu, 20 Mar 2025 17:57:31 +0100 Subject: [PATCH 17/60] update compute coverage --- monte-cover/src/montecover/base.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/monte-cover/src/montecover/base.py b/monte-cover/src/montecover/base.py index 6eccc73..9ab9571 100644 --- a/monte-cover/src/montecover/base.py +++ b/monte-cover/src/montecover/base.py @@ -206,22 +206,23 @@ def save_config(self, output_path: str): @staticmethod def _compute_coverage(thetas, oracle_thetas, confint, joint_confint=None): """Compute coverage, CI length, and bias.""" + lower_bound = confint.iloc[:, 0] + upper_bound = confint.iloc[:, 1] + coverage_mask = (lower_bound < oracle_thetas) & (oracle_thetas < upper_bound) - coverage = np.mean((confint.iloc[:, 0] < oracle_thetas) & (oracle_thetas < confint.iloc[:, 1])) - ci_length = np.mean(confint.iloc[:, 1] - confint.iloc[:, 0]) - bias = np.mean(abs(thetas - oracle_thetas)) result_dict = { - "Coverage": coverage, - "CI Length": ci_length, - "Bias": bias, + "Coverage": np.mean(coverage_mask), + "CI Length": np.mean(upper_bound - lower_bound), + "Bias": np.mean(np.abs(thetas - oracle_thetas)), } if joint_confint is not None: - coverage_uniform = all((joint_confint.iloc[:, 0] < oracle_thetas) & (oracle_thetas < joint_confint.iloc[:, 1])) - ci_length_uniform = np.mean(joint_confint.iloc[:, 1] - joint_confint.iloc[:, 0]) + joint_lower_bound = joint_confint.iloc[:, 0] + joint_upper_bound = joint_confint.iloc[:, 1] + joint_coverage_mark = (joint_lower_bound < oracle_thetas) & (oracle_thetas < joint_upper_bound) - result_dict["Uniform Coverage"] = coverage_uniform - result_dict["Uniform CI Length"] = ci_length_uniform + result_dict["Uniform Coverage"] = np.all(joint_coverage_mark) + result_dict["Uniform CI Length"] = np.mean(joint_upper_bound - joint_lower_bound) return result_dict From 900f396e4e349245b60dd0c532376181a735ee37 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Thu, 20 Mar 2025 18:13:30 +0100 Subject: [PATCH 18/60] add initialize_simulation to run --- monte-cover/src/montecover/base.py | 88 ++++++++++++++++-------------- 1 file changed, 47 insertions(+), 41 deletions(-) diff --git a/monte-cover/src/montecover/base.py b/monte-cover/src/montecover/base.py index 9ab9571..bb8e694 100644 --- a/monte-cover/src/montecover/base.py +++ b/monte-cover/src/montecover/base.py @@ -78,23 +78,8 @@ def summarize_results(self) -> Dict[str, Any]: def run_simulation(self): """Run the full simulation.""" - self.start_time = time.time() - self.logger.info("Starting simulation") - - self.logger.info(f"DGP Parameters: {self.dgp_parameters}") - self.logger.info(f"DML Parameters: {self.dml_parameters}") - self.logger.info(f"Confidence Parameters: {self.confidence_parameters}") - - # Calculate total number of parameter combinations - dgp_combinations = [len(v) for v in self.dgp_parameters.values()] - dml_combinations = [len(v) for v in self.dml_parameters.values()] - total_combinations = np.prod(dgp_combinations + dml_combinations) - self.logger.info(f"Total parameter combinations: {total_combinations}") - - # Calculate expected total iterations - total_iterations = total_combinations * self.repetitions - self.logger.info(f"Expected total iterations: {total_iterations}") - + self._initialize_simulation() + # Loop through repetitions for i_rep in range(self.repetitions): rep_start_time = time.time() @@ -118,7 +103,7 @@ def run_simulation(self): param_combo += 1 # Log parameter combination self.logger.debug( - f"Rep {i_rep+1}, Combo {param_combo}/{total_combinations}: DGPs {dgp_params}, DML {dml_params}" + f"Rep {i_rep+1}, Combo {param_combo}/{self.total_combinations}: DGPs {dgp_params}, DML {dml_params}" ) param_start_time = time.time() @@ -166,6 +151,27 @@ def run_simulation(self): self.logger.info("Summarizing results") self.result_summary = self.summarize_results() + def _initialize_simulation(self): + """Initialize the simulation run.""" + self.start_time = time.time() + self.logger.info("Starting simulation") + self.logger.info(f"DGP Parameters: {self.dgp_parameters}") + self.logger.info(f"DML Parameters: {self.dml_parameters}") + self.logger.info(f"Confidence Parameters: {self.confidence_parameters}") + + # Calculate expected iterations + self._calculate_parameter_combinations() + + def _calculate_parameter_combinations(self): + """Calculate parameter combinations and expected iterations.""" + dgp_combinations = [len(v) for v in self.dgp_parameters.values()] + dml_combinations = [len(v) for v in self.dml_parameters.values()] + self.total_combinations = np.prod(dgp_combinations + dml_combinations) + self.total_iterations = self.total_combinations * self.repetitions + + self.logger.info(f"Total parameter combinations: {self.total_combinations}") + self.logger.info(f"Expected total iterations: {self.total_iterations}") + def save_results(self, output_path: str = "results", file_prefix: str = ""): """Save the simulation results.""" os.makedirs(output_path, exist_ok=True) @@ -203,29 +209,6 @@ def save_config(self, output_path: str): self.logger.info(f"Configuration saved to {output_path}") - @staticmethod - def _compute_coverage(thetas, oracle_thetas, confint, joint_confint=None): - """Compute coverage, CI length, and bias.""" - lower_bound = confint.iloc[:, 0] - upper_bound = confint.iloc[:, 1] - coverage_mask = (lower_bound < oracle_thetas) & (oracle_thetas < upper_bound) - - result_dict = { - "Coverage": np.mean(coverage_mask), - "CI Length": np.mean(upper_bound - lower_bound), - "Bias": np.mean(np.abs(thetas - oracle_thetas)), - } - - if joint_confint is not None: - joint_lower_bound = joint_confint.iloc[:, 0] - joint_upper_bound = joint_confint.iloc[:, 1] - joint_coverage_mark = (joint_lower_bound < oracle_thetas) & (oracle_thetas < joint_upper_bound) - - result_dict["Uniform Coverage"] = np.all(joint_coverage_mark) - result_dict["Uniform CI Length"] = np.mean(joint_upper_bound - joint_lower_bound) - - return result_dict - def _load_config(self, config_path: str) -> Dict[str, Any]: """Load configuration from a YAML file.""" if not os.path.exists(config_path): @@ -270,3 +253,26 @@ def _setup_logging(self, log_level: str, log_file: Optional[str]): fh.setLevel(level) fh.setFormatter(formatter) self.logger.addHandler(fh) + + @staticmethod + def _compute_coverage(thetas, oracle_thetas, confint, joint_confint=None): + """Compute coverage, CI length, and bias.""" + lower_bound = confint.iloc[:, 0] + upper_bound = confint.iloc[:, 1] + coverage_mask = (lower_bound < oracle_thetas) & (oracle_thetas < upper_bound) + + result_dict = { + "Coverage": np.mean(coverage_mask), + "CI Length": np.mean(upper_bound - lower_bound), + "Bias": np.mean(np.abs(thetas - oracle_thetas)), + } + + if joint_confint is not None: + joint_lower_bound = joint_confint.iloc[:, 0] + joint_upper_bound = joint_confint.iloc[:, 1] + joint_coverage_mark = (joint_lower_bound < oracle_thetas) & (oracle_thetas < joint_upper_bound) + + result_dict["Uniform Coverage"] = np.all(joint_coverage_mark) + result_dict["Uniform CI Length"] = np.mean(joint_upper_bound - joint_lower_bound) + + return result_dict \ No newline at end of file From b23be4cfaaf949f8013915bee5fbc65573197027 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Thu, 20 Mar 2025 18:13:43 +0100 Subject: [PATCH 19/60] update log dir --- scripts/did/did_pa_multi_coverage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/did/did_pa_multi_coverage.py b/scripts/did/did_pa_multi_coverage.py index 22251f2..7d2a191 100644 --- a/scripts/did/did_pa_multi_coverage.py +++ b/scripts/did/did_pa_multi_coverage.py @@ -5,7 +5,7 @@ sim = DIDMultiCoverageSimulation( config_file="scripts/did/multi_config.yml", log_level="INFO", - log_file="logs/current_sim.log" + log_file="logs/did/multi_sim.log" ) sim.run_simulation() sim.save_results(output_path="results/did/", file_prefix="did_multi") From 3f60e257ced64d95b2213e01aac3175ed3aeb014 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Thu, 20 Mar 2025 18:46:17 +0100 Subject: [PATCH 20/60] simplify base simulation logic --- monte-cover/src/montecover/base.py | 36 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/monte-cover/src/montecover/base.py b/monte-cover/src/montecover/base.py index bb8e694..1a4d5b9 100644 --- a/monte-cover/src/montecover/base.py +++ b/monte-cover/src/montecover/base.py @@ -78,7 +78,7 @@ def summarize_results(self) -> Dict[str, Any]: def run_simulation(self): """Run the full simulation.""" - self._initialize_simulation() + self._setup_simulation_metrics() # Loop through repetitions for i_rep in range(self.repetitions): @@ -139,20 +139,10 @@ def run_simulation(self): rep_duration = rep_end_time - rep_start_time self.logger.info(f"Repetition {i_rep+1} completed in {rep_duration:.2f}s") - # convert results to dataframes - for key, value in self.results.items(): - self.results[key] = pd.DataFrame(value) - - self.end_time = time.time() - self.total_runtime = self.end_time - self.start_time - self.logger.info(f"Simulation completed in {self.total_runtime:.2f}s") + self._process_results() - # Summarize & save results - self.logger.info("Summarizing results") - self.result_summary = self.summarize_results() - - def _initialize_simulation(self): - """Initialize the simulation run.""" + def _setup_simulation_metrics(self): + """Initialize timing and calculate parameter combination metrics.""" self.start_time = time.time() self.logger.info("Starting simulation") self.logger.info(f"DGP Parameters: {self.dgp_parameters}") @@ -160,10 +150,6 @@ def _initialize_simulation(self): self.logger.info(f"Confidence Parameters: {self.confidence_parameters}") # Calculate expected iterations - self._calculate_parameter_combinations() - - def _calculate_parameter_combinations(self): - """Calculate parameter combinations and expected iterations.""" dgp_combinations = [len(v) for v in self.dgp_parameters.values()] dml_combinations = [len(v) for v in self.dml_parameters.values()] self.total_combinations = np.prod(dgp_combinations + dml_combinations) @@ -171,7 +157,21 @@ def _calculate_parameter_combinations(self): self.logger.info(f"Total parameter combinations: {self.total_combinations}") self.logger.info(f"Expected total iterations: {self.total_iterations}") + + def _process_results(self): + """Process collected results and log completion metrics.""" + # Convert results to dataframes incrementally + for key, value in self.results.items(): + self.results[key] = pd.DataFrame(value) + + self.end_time = time.time() + self.total_runtime = self.end_time - self.start_time + self.logger.info(f"Simulation completed in {self.total_runtime:.2f}s") + # Summarize results + self.logger.info("Summarizing results") + self.result_summary = self.summarize_results() + def save_results(self, output_path: str = "results", file_prefix: str = ""): """Save the simulation results.""" os.makedirs(output_path, exist_ok=True) From fcd262f4bff6dc74810b8b21e26995723aebe37d Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Fri, 21 Mar 2025 07:32:16 +0100 Subject: [PATCH 21/60] formatting --- monte-cover/src/montecover/base.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/monte-cover/src/montecover/base.py b/monte-cover/src/montecover/base.py index 1a4d5b9..6492486 100644 --- a/monte-cover/src/montecover/base.py +++ b/monte-cover/src/montecover/base.py @@ -79,7 +79,7 @@ def summarize_results(self) -> Dict[str, Any]: def run_simulation(self): """Run the full simulation.""" self._setup_simulation_metrics() - + # Loop through repetitions for i_rep in range(self.repetitions): rep_start_time = time.time() @@ -148,13 +148,13 @@ def _setup_simulation_metrics(self): self.logger.info(f"DGP Parameters: {self.dgp_parameters}") self.logger.info(f"DML Parameters: {self.dml_parameters}") self.logger.info(f"Confidence Parameters: {self.confidence_parameters}") - + # Calculate expected iterations dgp_combinations = [len(v) for v in self.dgp_parameters.values()] dml_combinations = [len(v) for v in self.dml_parameters.values()] self.total_combinations = np.prod(dgp_combinations + dml_combinations) self.total_iterations = self.total_combinations * self.repetitions - + self.logger.info(f"Total parameter combinations: {self.total_combinations}") self.logger.info(f"Expected total iterations: {self.total_iterations}") @@ -163,11 +163,11 @@ def _process_results(self): # Convert results to dataframes incrementally for key, value in self.results.items(): self.results[key] = pd.DataFrame(value) - + self.end_time = time.time() self.total_runtime = self.end_time - self.start_time self.logger.info(f"Simulation completed in {self.total_runtime:.2f}s") - + # Summarize results self.logger.info("Summarizing results") self.result_summary = self.summarize_results() @@ -275,4 +275,4 @@ def _compute_coverage(thetas, oracle_thetas, confint, joint_confint=None): result_dict["Uniform Coverage"] = np.all(joint_coverage_mark) result_dict["Uniform CI Length"] = np.mean(joint_upper_bound - joint_lower_bound) - return result_dict \ No newline at end of file + return result_dict From 988548091189a6aee3cc5b22b170eda6ac2ae9a2 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Fri, 21 Mar 2025 07:45:49 +0100 Subject: [PATCH 22/60] rename parameter logging --- monte-cover/src/montecover/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monte-cover/src/montecover/base.py b/monte-cover/src/montecover/base.py index 6492486..00a934d 100644 --- a/monte-cover/src/montecover/base.py +++ b/monte-cover/src/montecover/base.py @@ -78,7 +78,7 @@ def summarize_results(self) -> Dict[str, Any]: def run_simulation(self): """Run the full simulation.""" - self._setup_simulation_metrics() + self._log_parameters() # Loop through repetitions for i_rep in range(self.repetitions): @@ -141,7 +141,7 @@ def run_simulation(self): self._process_results() - def _setup_simulation_metrics(self): + def _log_parameters(self): """Initialize timing and calculate parameter combination metrics.""" self.start_time = time.time() self.logger.info("Starting simulation") From 7b6402986ea35f8289c4df0fc50c2d95f395679a Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Fri, 21 Mar 2025 07:57:29 +0100 Subject: [PATCH 23/60] add stop simulation method --- monte-cover/src/montecover/base.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/monte-cover/src/montecover/base.py b/monte-cover/src/montecover/base.py index 00a934d..e221d55 100644 --- a/monte-cover/src/montecover/base.py +++ b/monte-cover/src/montecover/base.py @@ -85,10 +85,7 @@ def run_simulation(self): rep_start_time = time.time() self.logger.info(f"Starting repetition {i_rep + 1}/{self.repetitions}") - # Check elapsed time - elapsed_time = time.time() - self.start_time - if elapsed_time > self.max_runtime: - self.logger.warning("Maximum runtime exceeded. Stopping the simulation.") + if self._stop_simulation(): break param_combo = 0 @@ -158,6 +155,14 @@ def _log_parameters(self): self.logger.info(f"Total parameter combinations: {self.total_combinations}") self.logger.info(f"Expected total iterations: {self.total_iterations}") + def _stop_simulation(self) -> bool: + """Check if simulation should be stopped based on criteria like runtime.""" + # Check if maximum runtime is exceeded + if self.max_runtime and time.time() - self.start_time > self.max_runtime: + self.logger.warning("Maximum runtime exceeded. Stopping the simulation.") + return True + return False + def _process_results(self): """Process collected results and log completion metrics.""" # Convert results to dataframes incrementally From d538131b9eb3677abdc1d29e2ff6636c20e60215 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Fri, 21 Mar 2025 08:07:12 +0100 Subject: [PATCH 24/60] simplify run_simulation --- monte-cover/src/montecover/base.py | 185 ++++++++++++++++------------- 1 file changed, 103 insertions(+), 82 deletions(-) diff --git a/monte-cover/src/montecover/base.py b/monte-cover/src/montecover/base.py index e221d55..d7c3d69 100644 --- a/monte-cover/src/montecover/base.py +++ b/monte-cover/src/montecover/base.py @@ -88,49 +88,8 @@ def run_simulation(self): if self._stop_simulation(): break - param_combo = 0 - # loop through all - for dgp_param_values in product(*self.dgp_parameters.values()): - dgp_params = dict(zip(self.dgp_parameters.keys(), dgp_param_values)) - dml_data = self._generate_dml_data(dgp_params) - - for dml_param_values in product(*self.dml_parameters.values()): - dml_params = dict(zip(self.dml_parameters.keys(), dml_param_values)) - - param_combo += 1 - # Log parameter combination - self.logger.debug( - f"Rep {i_rep+1}, Combo {param_combo}/{self.total_combinations}: DGPs {dgp_params}, DML {dml_params}" - ) - param_start_time = time.time() - - try: - repetition_results = self.run_single_rep(dml_data, dml_params) - param_end_time = time.time() - param_duration = param_end_time - param_start_time - - if repetition_results is not None: - assert isinstance(repetition_results, dict), "The result must be a dictionary." - # Process each dataframe in the result dictionary - for result_name, repetition_result in repetition_results.items(): - assert isinstance(repetition_result, list), "Each repetition_result must be a list." - for res in repetition_result: - assert isinstance(res, dict), "Each res must be a dictionary." - res["repetition"] = i_rep - # add dgp parameters to the result - res.update(dgp_params) - - # Initialize key in results dict if not exists - if result_name not in self.results: - self.results[result_name] = [] - self.results[result_name].extend(repetition_result) - - self.logger.debug(f"Parameter combination completed in {param_duration:.2f}s") - except Exception as e: - self.logger.error( - f"Error: repetition {i_rep+1}, DGP parameters {dgp_params}, DML parameters {dml_params}: {str(e)}" - ) - self.logger.exception("Exception details:") + # Running actual simulation + self._process_repetition(i_rep) rep_end_time = time.time() rep_duration = rep_end_time - rep_start_time @@ -138,45 +97,6 @@ def run_simulation(self): self._process_results() - def _log_parameters(self): - """Initialize timing and calculate parameter combination metrics.""" - self.start_time = time.time() - self.logger.info("Starting simulation") - self.logger.info(f"DGP Parameters: {self.dgp_parameters}") - self.logger.info(f"DML Parameters: {self.dml_parameters}") - self.logger.info(f"Confidence Parameters: {self.confidence_parameters}") - - # Calculate expected iterations - dgp_combinations = [len(v) for v in self.dgp_parameters.values()] - dml_combinations = [len(v) for v in self.dml_parameters.values()] - self.total_combinations = np.prod(dgp_combinations + dml_combinations) - self.total_iterations = self.total_combinations * self.repetitions - - self.logger.info(f"Total parameter combinations: {self.total_combinations}") - self.logger.info(f"Expected total iterations: {self.total_iterations}") - - def _stop_simulation(self) -> bool: - """Check if simulation should be stopped based on criteria like runtime.""" - # Check if maximum runtime is exceeded - if self.max_runtime and time.time() - self.start_time > self.max_runtime: - self.logger.warning("Maximum runtime exceeded. Stopping the simulation.") - return True - return False - - def _process_results(self): - """Process collected results and log completion metrics.""" - # Convert results to dataframes incrementally - for key, value in self.results.items(): - self.results[key] = pd.DataFrame(value) - - self.end_time = time.time() - self.total_runtime = self.end_time - self.start_time - self.logger.info(f"Simulation completed in {self.total_runtime:.2f}s") - - # Summarize results - self.logger.info("Summarizing results") - self.result_summary = self.summarize_results() - def save_results(self, output_path: str = "results", file_prefix: str = ""): """Save the simulation results.""" os.makedirs(output_path, exist_ok=True) @@ -259,6 +179,107 @@ def _setup_logging(self, log_level: str, log_file: Optional[str]): fh.setFormatter(formatter) self.logger.addHandler(fh) + def _log_parameters(self): + """Initialize timing and calculate parameter combination metrics.""" + self.start_time = time.time() + self.logger.info("Starting simulation") + self.logger.info(f"DGP Parameters: {self.dgp_parameters}") + self.logger.info(f"DML Parameters: {self.dml_parameters}") + self.logger.info(f"Confidence Parameters: {self.confidence_parameters}") + + # Calculate expected iterations + dgp_combinations = [len(v) for v in self.dgp_parameters.values()] + dml_combinations = [len(v) for v in self.dml_parameters.values()] + self.total_combinations = np.prod(dgp_combinations + dml_combinations) + self.total_iterations = self.total_combinations * self.repetitions + + self.logger.info(f"Total parameter combinations: {self.total_combinations}") + self.logger.info(f"Expected total iterations: {self.total_iterations}") + + def _stop_simulation(self) -> bool: + """Check if simulation should be stopped based on criteria like runtime.""" + # Check if maximum runtime is exceeded + if self.max_runtime and time.time() - self.start_time > self.max_runtime: + self.logger.warning("Maximum runtime exceeded. Stopping the simulation.") + return True + return False + + def _process_repetition(self, i_rep): + """Process a single repetition with all parameter combinations.""" + i_param_combo = 0 + + # loop through all parameter combinations + for dgp_param_values in product(*self.dgp_parameters.values()): + dgp_params = dict(zip(self.dgp_parameters.keys(), dgp_param_values)) + dml_data = self._generate_dml_data(dgp_params) + + for dml_param_values in product(*self.dml_parameters.values()): + dml_params = dict(zip(self.dml_parameters.keys(), dml_param_values)) + i_param_combo += 1 + + self._process_parameter_combination(i_rep, i_param_combo, dgp_params, dml_params, dml_data) + + def _process_parameter_combination(self, i_rep, param_combo, dgp_params, dml_params, dml_data): + """Process a single parameter combination.""" + # Log parameter combination + self.logger.debug( + f"Rep {i_rep+1}, Combo {param_combo}/{self.total_combinations}: " f"DGPs {dgp_params}, DML {dml_params}" + ) + param_start_time = time.time() + + try: + repetition_results = self.run_single_rep(dml_data, dml_params) + + # Log timing + param_duration = time.time() - param_start_time + self.logger.debug(f"Parameter combination completed in {param_duration:.2f}s") + + # Store results + self._store_results(repetition_results, i_rep, dgp_params) + + except Exception as e: + self.logger.error( + f"Error: repetition {i_rep+1}, DGP parameters {dgp_params}, " f"DML parameters {dml_params}: {str(e)}" + ) + self.logger.exception("Exception details:") + + def _store_results(self, repetition_results, i_rep, dgp_params): + """Store the results of a repetition.""" + if repetition_results is None: + return + + assert isinstance(repetition_results, dict), "The result must be a dictionary." + + # Process each dataframe in the result dictionary + for result_name, repetition_result in repetition_results.items(): + assert isinstance(repetition_result, list), "Each repetition_result must be a list." + + for res in repetition_result: + assert isinstance(res, dict), "Each res must be a dictionary." + res["repetition"] = i_rep + # add dgp parameters to the result + res.update(dgp_params) + + # Initialize key in results dict if not exists + if result_name not in self.results: + self.results[result_name] = [] + + self.results[result_name].extend(repetition_result) + + def _process_results(self): + """Process collected results and log completion metrics.""" + # Convert results to dataframes incrementally + for key, value in self.results.items(): + self.results[key] = pd.DataFrame(value) + + self.end_time = time.time() + self.total_runtime = self.end_time - self.start_time + self.logger.info(f"Simulation completed in {self.total_runtime:.2f}s") + + # Summarize results + self.logger.info("Summarizing results") + self.result_summary = self.summarize_results() + @staticmethod def _compute_coverage(thetas, oracle_thetas, confint, joint_confint=None): """Compute coverage, CI length, and bias.""" From a01ee8c2321ee2d96d83065c43fdc81af4ad70d8 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Fri, 21 Mar 2025 08:49:41 +0100 Subject: [PATCH 25/60] allow parallel simulations --- monte-cover/src/montecover/base.py | 130 ++++++++++++++++++----------- 1 file changed, 83 insertions(+), 47 deletions(-) diff --git a/monte-cover/src/montecover/base.py b/monte-cover/src/montecover/base.py index d7c3d69..19ac623 100644 --- a/monte-cover/src/montecover/base.py +++ b/monte-cover/src/montecover/base.py @@ -12,6 +12,7 @@ import numpy as np import pandas as pd import yaml +from joblib import Parallel, delayed class BaseSimulation(ABC): @@ -33,6 +34,7 @@ def __init__( self.repetitions = self.simulation_parameters.get("repetitions", 20) self.max_runtime = self.simulation_parameters.get("max_runtime", 5.5 * 3600) self.random_seed = self.simulation_parameters.get("random_seed", 42) + self.default_n_jobs = self.simulation_parameters.get("n_jobs", 1) self.suppress_warnings = suppress_warnings # Set up logging @@ -76,24 +78,55 @@ def summarize_results(self) -> Dict[str, Any]: """Summarize the simulation results.""" pass - def run_simulation(self): - """Run the full simulation.""" - self._log_parameters() - - # Loop through repetitions - for i_rep in range(self.repetitions): - rep_start_time = time.time() - self.logger.info(f"Starting repetition {i_rep + 1}/{self.repetitions}") - - if self._stop_simulation(): - break + def run_simulation(self, n_jobs=None): + """ + Run the full simulation. + + Parameters: + ----------- + n_jobs : int, optional (default=None) + Number of jobs to run in parallel. If None, uses the value from the configuration file. + If 1, runs sequentially. If > 1, runs in parallel with the specified number of workers. + If -1, uses all available CPU cores (except one). + """ + # Use n_jobs from parameter, or fall back to config value + n_jobs = n_jobs if n_jobs is not None else self.default_n_jobs + if n_jobs == -1: + n_jobs = os.cpu_count() - 1 + self._log_parameters(n_jobs=n_jobs) + + if n_jobs <= 1: + for i_rep in range(self.repetitions): + rep_start_time = time.time() + self.logger.info(f"Starting repetition {i_rep + 1}/{self.repetitions}") + + if self._stop_simulation(): + break + + # Running actual simulation + self._process_repetition(i_rep) + + rep_end_time = time.time() + rep_duration = rep_end_time - rep_start_time + self.logger.info(f"Repetition {i_rep+1} completed in {rep_duration:.2f}s") + else: - # Running actual simulation - self._process_repetition(i_rep) + repetitions_to_run = list(range(self.repetitions)) + + self.logger.info(f"Starting parallel execution with {n_jobs} workers") + results = Parallel(n_jobs=n_jobs, verbose=10)( + delayed(self._process_repetition)(i_rep) + for i_rep in repetitions_to_run + if not self._stop_simulation() + ) - rep_end_time = time.time() - rep_duration = rep_end_time - rep_start_time - self.logger.info(f"Repetition {i_rep+1} completed in {rep_duration:.2f}s") + # Process results from parallel execution + for worker_results in results: + if worker_results: # Check if we have results + for result_name, result_list in worker_results.items(): + if result_name not in self.results: + self.results[result_name] = [] + self.results[result_name].extend(result_list) self._process_results() @@ -179,7 +212,7 @@ def _setup_logging(self, log_level: str, log_file: Optional[str]): fh.setFormatter(formatter) self.logger.addHandler(fh) - def _log_parameters(self): + def _log_parameters(self, n_jobs): """Initialize timing and calculate parameter combination metrics.""" self.start_time = time.time() self.logger.info("Starting simulation") @@ -195,6 +228,10 @@ def _log_parameters(self): self.logger.info(f"Total parameter combinations: {self.total_combinations}") self.logger.info(f"Expected total iterations: {self.total_iterations}") + if n_jobs <= 1: + self.logger.info("Running simulation sequentially") + else: + self.logger.info(f"Running simulation in parallel with {n_jobs} workers") def _stop_simulation(self) -> bool: """Check if simulation should be stopped based on criteria like runtime.""" @@ -206,7 +243,8 @@ def _stop_simulation(self) -> bool: def _process_repetition(self, i_rep): """Process a single repetition with all parameter combinations.""" - i_param_combo = 0 + i_param_comb = 0 + rep_results = {} # loop through all parameter combinations for dgp_param_values in product(*self.dgp_parameters.values()): @@ -215,15 +253,23 @@ def _process_repetition(self, i_rep): for dml_param_values in product(*self.dml_parameters.values()): dml_params = dict(zip(self.dml_parameters.keys(), dml_param_values)) - i_param_combo += 1 + i_param_comb += 1 - self._process_parameter_combination(i_rep, i_param_combo, dgp_params, dml_params, dml_data) + comb_results = self._process_parameter_combination(i_rep, i_param_comb, dgp_params, dml_params, dml_data) - def _process_parameter_combination(self, i_rep, param_combo, dgp_params, dml_params, dml_data): + # Merge results + for result_name, result_list in comb_results.items(): + if result_name not in rep_results: + rep_results[result_name] = [] + rep_results[result_name].extend(result_list) + + return rep_results + + def _process_parameter_combination(self, i_rep, i_param_comb, dgp_params, dml_params, dml_data): """Process a single parameter combination.""" # Log parameter combination self.logger.debug( - f"Rep {i_rep+1}, Combo {param_combo}/{self.total_combinations}: " f"DGPs {dgp_params}, DML {dml_params}" + f"Rep {i_rep+1}, Combo {i_param_comb}/{self.total_combinations}: " f"DGPs {dgp_params}, DML {dml_params}" ) param_start_time = time.time() @@ -234,37 +280,27 @@ def _process_parameter_combination(self, i_rep, param_combo, dgp_params, dml_par param_duration = time.time() - param_start_time self.logger.debug(f"Parameter combination completed in {param_duration:.2f}s") - # Store results - self._store_results(repetition_results, i_rep, dgp_params) + # Process results + if repetition_results is None: + return {} + + # Add metadata to results + processed_results = {} + for result_name, repetition_result in repetition_results.items(): + processed_results[result_name] = [] + for res in repetition_result: + res["repetition"] = i_rep + res.update(dgp_params) + processed_results[result_name].append(res) + + return processed_results except Exception as e: self.logger.error( f"Error: repetition {i_rep+1}, DGP parameters {dgp_params}, " f"DML parameters {dml_params}: {str(e)}" ) self.logger.exception("Exception details:") - - def _store_results(self, repetition_results, i_rep, dgp_params): - """Store the results of a repetition.""" - if repetition_results is None: - return - - assert isinstance(repetition_results, dict), "The result must be a dictionary." - - # Process each dataframe in the result dictionary - for result_name, repetition_result in repetition_results.items(): - assert isinstance(repetition_result, list), "Each repetition_result must be a list." - - for res in repetition_result: - assert isinstance(res, dict), "Each res must be a dictionary." - res["repetition"] = i_rep - # add dgp parameters to the result - res.update(dgp_params) - - # Initialize key in results dict if not exists - if result_name not in self.results: - self.results[result_name] = [] - - self.results[result_name].extend(repetition_result) + return {} def _process_results(self): """Process collected results and log completion metrics.""" From e6feb4824952665b42fe0927d3f7d9a1ce3ed361 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Fri, 21 Mar 2025 08:51:00 +0100 Subject: [PATCH 26/60] remove parallel fold fit --- monte-cover/src/montecover/did/did_multi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monte-cover/src/montecover/did/did_multi.py b/monte-cover/src/montecover/did/did_multi.py index 4eb6af0..b10f6ce 100644 --- a/monte-cover/src/montecover/did/did_multi.py +++ b/monte-cover/src/montecover/did/did_multi.py @@ -98,7 +98,7 @@ def run_single_rep(self, dml_data, dml_params) -> Dict[str, Any]: score=score, in_sample_normalization=in_sample_normalization, ) - dml_model.fit(n_jobs_cv=5) + dml_model.fit() dml_model.bootstrap(n_rep_boot=2000) # Oracle values for this model From 55494bfd145ae75172adbbdd06ed1d8c99c9c519 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Fri, 21 Mar 2025 11:58:19 +0100 Subject: [PATCH 27/60] handle warnings and jobs --- monte-cover/src/montecover/base.py | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/monte-cover/src/montecover/base.py b/monte-cover/src/montecover/base.py index 19ac623..8cbadf4 100644 --- a/monte-cover/src/montecover/base.py +++ b/monte-cover/src/montecover/base.py @@ -87,15 +87,14 @@ def run_simulation(self, n_jobs=None): n_jobs : int, optional (default=None) Number of jobs to run in parallel. If None, uses the value from the configuration file. If 1, runs sequentially. If > 1, runs in parallel with the specified number of workers. - If -1, uses all available CPU cores (except one). + If -1, uses all available CPU cores . + If -2, uses all available CPU cores except one. """ # Use n_jobs from parameter, or fall back to config value n_jobs = n_jobs if n_jobs is not None else self.default_n_jobs - if n_jobs == -1: - n_jobs = os.cpu_count() - 1 self._log_parameters(n_jobs=n_jobs) - if n_jobs <= 1: + if n_jobs == 1: for i_rep in range(self.repetitions): rep_start_time = time.time() self.logger.info(f"Starting repetition {i_rep + 1}/{self.repetitions}") @@ -109,15 +108,11 @@ def run_simulation(self, n_jobs=None): rep_end_time = time.time() rep_duration = rep_end_time - rep_start_time self.logger.info(f"Repetition {i_rep+1} completed in {rep_duration:.2f}s") - else: - repetitions_to_run = list(range(self.repetitions)) - - self.logger.info(f"Starting parallel execution with {n_jobs} workers") + else: + self.logger.info(f"Starting parallel execution with n_jobs={n_jobs}") results = Parallel(n_jobs=n_jobs, verbose=10)( - delayed(self._process_repetition)(i_rep) - for i_rep in repetitions_to_run - if not self._stop_simulation() + delayed(self._process_repetition)(i_rep) for i_rep in range(self.repetitions) if not self._stop_simulation() ) # Process results from parallel execution @@ -243,6 +238,9 @@ def _stop_simulation(self) -> bool: def _process_repetition(self, i_rep): """Process a single repetition with all parameter combinations.""" + if self.suppress_warnings: + warnings.simplefilter(action="ignore", category=UserWarning) + i_param_comb = 0 rep_results = {} @@ -262,7 +260,7 @@ def _process_repetition(self, i_rep): if result_name not in rep_results: rep_results[result_name] = [] rep_results[result_name].extend(result_list) - + return rep_results def _process_parameter_combination(self, i_rep, i_param_comb, dgp_params, dml_params, dml_data): @@ -283,7 +281,7 @@ def _process_parameter_combination(self, i_rep, i_param_comb, dgp_params, dml_pa # Process results if repetition_results is None: return {} - + # Add metadata to results processed_results = {} for result_name, repetition_result in repetition_results.items(): @@ -292,7 +290,7 @@ def _process_parameter_combination(self, i_rep, i_param_comb, dgp_params, dml_pa res["repetition"] = i_rep res.update(dgp_params) processed_results[result_name].append(res) - + return processed_results except Exception as e: From dbc092e73826bad596a1786466316cf99819642d Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Fri, 21 Mar 2025 12:57:59 +0100 Subject: [PATCH 28/60] add inner_max_num_threads=1 --- monte-cover/src/montecover/base.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/monte-cover/src/montecover/base.py b/monte-cover/src/montecover/base.py index 8cbadf4..c312e0a 100644 --- a/monte-cover/src/montecover/base.py +++ b/monte-cover/src/montecover/base.py @@ -12,7 +12,7 @@ import numpy as np import pandas as pd import yaml -from joblib import Parallel, delayed +from joblib import Parallel, delayed, parallel_backend class BaseSimulation(ABC): @@ -111,9 +111,10 @@ def run_simulation(self, n_jobs=None): else: self.logger.info(f"Starting parallel execution with n_jobs={n_jobs}") - results = Parallel(n_jobs=n_jobs, verbose=10)( - delayed(self._process_repetition)(i_rep) for i_rep in range(self.repetitions) if not self._stop_simulation() - ) + with parallel_backend("loky", inner_max_num_threads=1): + results = Parallel(n_jobs=n_jobs, verbose=10)( + delayed(self._process_repetition)(i_rep) for i_rep in range(self.repetitions) if not self._stop_simulation() + ) # Process results from parallel execution for worker_results in results: From 79320ed96f746364c72e11fe44f5ff92b8dcd4c8 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Fri, 21 Mar 2025 13:04:00 +0100 Subject: [PATCH 29/60] update did simulation --- results/did/did_multi_detailed.csv | 48 ++++++++++++++-------------- results/did/did_multi_eventstudy.csv | 48 ++++++++++++++-------------- results/did/did_multi_group.csv | 48 ++++++++++++++-------------- results/did/did_multi_metadata.csv | 2 +- results/did/did_multi_time.csv | 48 ++++++++++++++-------------- results/did/multi_config.yml | 3 +- scripts/did/did_pa_multi_coverage.py | 2 +- scripts/did/multi_config.yml | 3 +- 8 files changed, 102 insertions(+), 100 deletions(-) diff --git a/results/did/did_multi_detailed.csv b/results/did/did_multi_detailed.csv index f37be82..3d0b81a 100644 --- a/results/did/did_multi_detailed.csv +++ b/results/did/did_multi_detailed.csv @@ -1,25 +1,25 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -Linear,Linear,experimental,False,1,0.9,0.8770833333333333,0.5957148258014461,0.15382974604923927,0.82,0.9277609206218338,200 -Linear,Linear,experimental,False,1,0.95,0.9329166666666667,0.709837996826105,0.15382974604923927,0.9,1.0183441020334203,200 -Linear,Linear,experimental,False,4,0.9,0.6683333333333333,1.9698836561519315,0.8284907405553992,0.525,2.863183256412114,200 -Linear,Linear,experimental,False,4,0.95,0.7670833333333333,2.347261152317584,0.8284907405553992,0.64,3.1905243140809945,200 -Linear,Linear,experimental,False,6,0.9,0.89375,2.012015821768593,0.4972286199594851,0.9,2.910046927597859,200 -Linear,Linear,experimental,False,6,0.95,0.9441666666666667,2.3974647241407983,0.4972286199594851,0.935,3.246758702976773,200 -Linear,Linear,experimental,True,1,0.9,0.8745833333333333,0.5956334541132615,0.1540676164908103,0.82,0.929071986266196,200 -Linear,Linear,experimental,True,1,0.95,0.9333333333333332,0.7097410364792451,0.1540676164908103,0.895,1.0214045871405517,200 -Linear,Linear,experimental,True,4,0.9,0.6695833333333333,1.9690878328880732,0.8280711666335188,0.515,2.8592795655154974,200 -Linear,Linear,experimental,True,4,0.95,0.7670833333333333,2.346312870409903,0.8280711666335188,0.645,3.184749486936283,200 -Linear,Linear,experimental,True,6,0.9,0.8954166666666667,2.012277261422281,0.4972240370172027,0.905,2.910046165626694,200 -Linear,Linear,experimental,True,6,0.95,0.9433333333333332,2.3977762487025966,0.4972240370172027,0.93,3.2443247059312212,200 -Linear,Linear,observational,False,1,0.9,0.89625,0.686900650227242,0.16556887731250863,0.905,1.0684577495769967,200 -Linear,Linear,observational,False,1,0.95,0.9441666666666667,0.8184926083044464,0.16556887731250863,0.93,1.1743444720583638,200 -Linear,Linear,observational,False,4,0.9,0.7866666666666667,3.124729480506762,0.9502826142586591,0.735,4.394633218514321,200 -Linear,Linear,observational,False,4,0.95,0.8541666666666667,3.7233448270862413,0.9502826142586591,0.8,4.923945197030173,200 -Linear,Linear,observational,False,6,0.9,0.8970833333333332,2.773055872422081,0.7355132665655921,0.915,3.9680250024995116,200 -Linear,Linear,observational,False,6,0.95,0.9541666666666667,3.304299876906268,0.7355132665655921,0.95,4.437925510709768,200 -Linear,Linear,observational,True,1,0.9,0.88875,0.6660387052074566,0.16288234355298709,0.875,1.03599720010251,200 -Linear,Linear,observational,True,1,0.95,0.9408333333333333,0.7936340675709367,0.16288234355298709,0.925,1.1385204090656658,200 -Linear,Linear,observational,True,4,0.9,0.7770833333333332,2.832512839406202,0.8935845118739927,0.72,4.034877974695546,200 -Linear,Linear,observational,True,4,0.95,0.8545833333333333,3.375147222839926,0.8935845118739927,0.78,4.5253801160151035,200 -Linear,Linear,observational,True,6,0.9,0.8975,2.5644621837469375,0.675326608841152,0.9,3.688249907793509,200 -Linear,Linear,observational,True,6,0.95,0.9470833333333333,3.055745166318817,0.675326608841152,0.94,4.115336505261702,200 +Linear,Linear,experimental,False,1,0.9,0.8813333333333334,0.5961686505266492,0.15102133299318632,0.834,0.9296789699097547,1000 +Linear,Linear,experimental,False,1,0.95,0.9350833333333334,0.7103787623398975,0.15102133299318632,0.908,1.0206042134000024,1000 +Linear,Linear,experimental,False,4,0.9,0.6619166666666666,1.986651429023609,0.8637379841284726,0.52,2.882026229739649,1000 +Linear,Linear,experimental,False,4,0.95,0.7520833333333333,2.3672411860366602,0.8637379841284726,0.617,3.2128015018838694,1000 +Linear,Linear,experimental,False,6,0.9,0.902,2.00497022725443,0.4810970023674208,0.911,2.9031760219044904,1000 +Linear,Linear,experimental,False,6,0.95,0.9528333333333334,2.3890693804633027,0.4810970023674208,0.951,3.238600319213653,1000 +Linear,Linear,experimental,True,1,0.9,0.8800833333333333,0.5960959285920073,0.15123045002955704,0.833,0.928366902428871,1000 +Linear,Linear,experimental,True,1,0.95,0.9353333333333333,0.7102921088100949,0.15123045002955704,0.913,1.0197692316323934,1000 +Linear,Linear,experimental,True,4,0.9,0.6590833333333334,1.9857772419115973,0.8626296646616975,0.52,2.8815675975045956,1000 +Linear,Linear,experimental,True,4,0.95,0.7531666666666667,2.3661995278445764,0.8626296646616975,0.619,3.2112254886896605,1000 +Linear,Linear,experimental,True,6,0.9,0.9019166666666666,2.004527154284187,0.4808213402748324,0.905,2.9011439332421705,1000 +Linear,Linear,experimental,True,6,0.95,0.952,2.3885414264557423,0.4808213402748324,0.949,3.237049999080413,1000 +Linear,Linear,observational,False,1,0.9,0.90575,0.6906210074073058,0.16339132921843413,0.897,1.0727694533982786,1000 +Linear,Linear,observational,False,1,0.95,0.9518333333333334,0.8229256873110352,0.16339132921843413,0.946,1.1792381527650921,1000 +Linear,Linear,observational,False,4,0.9,0.7795,2.9571361297998364,0.9287818108191471,0.691,4.19740184270945,1000 +Linear,Linear,observational,False,4,0.95,0.8571666666666666,3.5236450324955486,0.9287818108191471,0.78,4.697698545475343,1000 +Linear,Linear,observational,False,6,0.9,0.9076666666666666,2.5544833881976365,0.6416394592068319,0.907,3.6632944671996808,1000 +Linear,Linear,observational,False,6,0.95,0.9550833333333334,3.0438546980332184,0.6416394592068319,0.958,4.0959649390037125,1000 +Linear,Linear,observational,True,1,0.9,0.8973333333333333,0.668426359641987,0.16249117038954014,0.895,1.038888800002171,1000 +Linear,Linear,observational,True,1,0.95,0.9465833333333333,0.7964791333096312,0.16249117038954014,0.939,1.1417719060066087,1000 +Linear,Linear,observational,True,4,0.9,0.7675,2.823122727518332,0.9146880810616262,0.686,4.025190417054882,1000 +Linear,Linear,observational,True,4,0.95,0.8508333333333333,3.3639582144020532,0.9146880810616262,0.768,4.499697598146944,1000 +Linear,Linear,observational,True,6,0.9,0.89775,2.4371258648326704,0.6190705910995143,0.893,3.5036401350107074,1000 +Linear,Linear,observational,True,6,0.95,0.9521666666666666,2.9040145837876374,0.6190705910995143,0.955,3.9130910221754434,1000 diff --git a/results/did/did_multi_eventstudy.csv b/results/did/did_multi_eventstudy.csv index 5d8b92f..78a9bb7 100644 --- a/results/did/did_multi_eventstudy.csv +++ b/results/did/did_multi_eventstudy.csv @@ -1,25 +1,25 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -Linear,Linear,experimental,False,1,0.9,0.8833333333333333,0.42565718743306286,0.10936767904635211,0.835,0.6077012485542163,200 -Linear,Linear,experimental,False,1,0.95,0.9358333333333333,0.507201822374698,0.10936767904635211,0.905,0.6747323911476379,200 -Linear,Linear,experimental,False,4,0.9,0.6125,1.9569891887347262,0.9196943825351817,0.545,2.5358161709127596,200 -Linear,Linear,experimental,False,4,0.95,0.7141666666666667,2.3318964467149415,0.9196943825351817,0.635,2.8827181581319787,200 -Linear,Linear,experimental,False,6,0.9,0.8975,2.0153850665398654,0.5111684848078778,0.88,2.5922545970785786,200 -Linear,Linear,experimental,False,6,0.95,0.9441666666666667,2.40147942690741,0.5111684848078778,0.94,2.9541718057018187,200 -Linear,Linear,experimental,True,1,0.9,0.8791666666666668,0.4255897490005149,0.10926516710603056,0.845,0.6066297468359033,200 -Linear,Linear,experimental,True,1,0.95,0.9358333333333333,0.5071214645259496,0.10926516710603056,0.915,0.6750610192677344,200 -Linear,Linear,experimental,True,4,0.9,0.605,1.9564893215757844,0.9195779385934096,0.55,2.5307678617965537,200 -Linear,Linear,experimental,True,4,0.95,0.7158333333333333,2.3313008182574744,0.9195779385934096,0.65,2.872282262053714,200 -Linear,Linear,experimental,True,6,0.9,0.8941666666666667,2.015463986254987,0.5113312788664856,0.89,2.5944084708379807,200 -Linear,Linear,experimental,True,6,0.95,0.9466666666666668,2.401573465548158,0.5113312788664856,0.93,2.9505612073229464,200 -Linear,Linear,observational,False,1,0.9,0.9083333333333333,0.4882437838128583,0.11428563471509198,0.9,0.6956288268269425,200 -Linear,Linear,observational,False,1,0.95,0.9533333333333333,0.5817783517444832,0.11428563471509198,0.945,0.7729973931119418,200 -Linear,Linear,observational,False,4,0.9,0.7691666666666667,3.3932130254913604,1.0549489318868936,0.755,4.223665366280769,200 -Linear,Linear,observational,False,4,0.95,0.8408333333333333,4.043262703053558,1.0549489318868936,0.81,4.8262642311066015,200 -Linear,Linear,observational,False,6,0.9,0.8958333333333333,2.8512971267032157,0.7733310576205062,0.895,3.607707492218858,200 -Linear,Linear,observational,False,6,0.95,0.955,3.397530081699918,0.7733310576205062,0.955,4.122679418390554,200 -Linear,Linear,observational,True,1,0.9,0.8975,0.4745126476352591,0.11192315736615333,0.895,0.6757224816274575,200 -Linear,Linear,observational,True,1,0.95,0.945,0.5654166938231102,0.11192315736615333,0.925,0.7517329711375669,200 -Linear,Linear,observational,True,4,0.9,0.7566666666666667,3.005791111628938,0.9858031123253609,0.71,3.794083607223553,200 -Linear,Linear,observational,True,4,0.95,0.8341666666666667,3.581621019228321,0.9858031123253609,0.78,4.334336049644241,200 -Linear,Linear,observational,True,6,0.9,0.8933333333333333,2.6626861416696204,0.7105550768719945,0.895,3.3880858319786715,200 -Linear,Linear,observational,True,6,0.95,0.9433333333333332,3.172786231124224,0.7105550768719945,0.935,3.871664400590925,200 +Linear,Linear,experimental,False,1,0.9,0.8746666666666666,0.42536022351351016,0.11129964461197367,0.856,0.6065601425726624,1000 +Linear,Linear,experimental,False,1,0.95,0.9343333333333333,0.5068479680392762,0.11129964461197367,0.923,0.6740692167988962,1000 +Linear,Linear,experimental,False,4,0.9,0.6018333333333333,1.9789774969843743,0.9612815234569009,0.504,2.557725621904857,1000 +Linear,Linear,experimental,False,4,0.95,0.6915,2.3580971320185626,0.9612815234569009,0.606,2.9077454096108863,1000 +Linear,Linear,experimental,False,6,0.9,0.9026666666666666,2.0021783896522174,0.475645152957695,0.913,2.5813810385024185,1000 +Linear,Linear,experimental,False,6,0.95,0.9546666666666667,2.3857427007749936,0.475645152957695,0.954,2.939126540032628,1000 +Linear,Linear,experimental,True,1,0.9,0.8736666666666666,0.4252780101030476,0.11135661295209692,0.855,0.6067206852239997,1000 +Linear,Linear,experimental,True,1,0.95,0.9338333333333334,0.50675000471846,0.11135661295209692,0.919,0.6737727543313963,1000 +Linear,Linear,experimental,True,4,0.9,0.604,1.9778347169116364,0.9610017220191109,0.506,2.5570866190887442,1000 +Linear,Linear,experimental,True,4,0.95,0.69,2.356735425573614,0.9610017220191109,0.614,2.906700104748762,1000 +Linear,Linear,experimental,True,6,0.9,0.9028333333333334,2.001368819203873,0.47488976645105485,0.91,2.5788107797213202,1000 +Linear,Linear,experimental,True,6,0.95,0.9543333333333334,2.3847780380866523,0.47488976645105485,0.954,2.9346744455419307,1000 +Linear,Linear,observational,False,1,0.9,0.9048333333333334,0.4936490463630555,0.11703447731264664,0.911,0.7026803919052239,1000 +Linear,Linear,observational,False,1,0.95,0.9523333333333334,0.5882191193312043,0.11703447731264664,0.953,0.7817258159201687,1000 +Linear,Linear,observational,False,4,0.9,0.7483333333333334,3.110852841424021,1.0162956359155522,0.691,3.927457336373739,1000 +Linear,Linear,observational,False,4,0.95,0.8321666666666666,3.7068097917596994,1.0162956359155522,0.775,4.489588602429944,1000 +Linear,Linear,observational,False,6,0.9,0.908,2.6065175455108682,0.657901837298179,0.912,3.319528013865773,1000 +Linear,Linear,observational,False,6,0.95,0.9611666666666666,3.1058572207068265,0.657901837298179,0.96,3.78925559700768,1000 +Linear,Linear,observational,True,1,0.9,0.8983333333333333,0.478045989951027,0.1165385646041097,0.898,0.6810014878305387,1000 +Linear,Linear,observational,True,1,0.95,0.9476666666666667,0.5696269308742887,0.1165385646041097,0.951,0.7570193996194396,1000 +Linear,Linear,observational,True,4,0.9,0.7318333333333333,2.961887231450272,1.0118391967276548,0.664,3.755668505865932,1000 +Linear,Linear,observational,True,4,0.95,0.8186666666666667,3.5293063192928438,1.0118391967276548,0.771,4.287491165909032,1000 +Linear,Linear,observational,True,6,0.9,0.8983333333333333,2.4694251965466845,0.6253200792538618,0.908,3.1600238226116533,1000 +Linear,Linear,observational,True,6,0.95,0.9541666666666666,2.9425016113546496,0.6253200792538618,0.955,3.596198019745218,1000 diff --git a/results/did/did_multi_group.csv b/results/did/did_multi_group.csv index db6a426..d9fa94b 100644 --- a/results/did/did_multi_group.csv +++ b/results/did/did_multi_group.csv @@ -1,25 +1,25 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -Linear,Linear,experimental,False,1,0.9,0.8666666666666667,0.533698038133595,0.14197945807093054,0.85,0.6861047473750901,200 -Linear,Linear,experimental,False,1,0.95,0.935,0.6359404364145231,0.14197945807093054,0.9,0.7748893935196418,200 -Linear,Linear,experimental,False,4,0.9,0.66,2.1748653096663464,0.9342553462922274,0.525,2.745378335374161,200 -Linear,Linear,experimental,False,4,0.95,0.7633333333333333,2.5915118575455782,0.9342553462922274,0.655,3.1210909517446286,200 -Linear,Linear,experimental,False,6,0.9,0.8883333333333333,2.217594064950379,0.5525144231877022,0.875,2.791344195057897,200 -Linear,Linear,experimental,False,6,0.95,0.9366666666666668,2.642426309803645,0.5525144231877022,0.92,3.170576857891774,200 -Linear,Linear,experimental,True,1,0.9,0.87,0.5335807495502426,0.14168060865880763,0.865,0.6849043629713572,200 -Linear,Linear,experimental,True,1,0.95,0.9366666666666668,0.6358006784473694,0.14168060865880763,0.89,0.7736693416127448,200 -Linear,Linear,experimental,True,4,0.9,0.6633333333333333,2.173005344301668,0.9333928409584715,0.51,2.7419250872101033,200 -Linear,Linear,experimental,True,4,0.95,0.76,2.5892955721159634,0.9333928409584715,0.65,3.1048660668399184,200 -Linear,Linear,experimental,True,6,0.9,0.8933333333333333,2.2188654092146014,0.5513512630008591,0.85,2.790603998972855,200 -Linear,Linear,experimental,True,6,0.95,0.9366666666666668,2.6439412099315343,0.5513512630008591,0.93,3.172214838426176,200 -Linear,Linear,observational,False,1,0.9,0.8966666666666667,0.6108816472728611,0.145895094484495,0.87,0.783552984172717,200 -Linear,Linear,observational,False,1,0.95,0.9466666666666668,0.7279103792903224,0.145895094484495,0.92,0.8844690424185709,200 -Linear,Linear,observational,False,4,0.9,0.78,3.5092375556264455,1.0649254128150685,0.73,4.316704955507763,200 -Linear,Linear,observational,False,4,0.95,0.8466666666666667,4.181514457897795,1.0649254128150685,0.82,4.930150821324148,200 -Linear,Linear,observational,False,6,0.9,0.895,2.9637734181525097,0.7818480925391569,0.9,3.6693459962202515,200 -Linear,Linear,observational,False,6,0.95,0.9483333333333333,3.53155384937329,0.7818480925391569,0.96,4.202951707840176,200 -Linear,Linear,observational,True,1,0.9,0.895,0.5920636535297172,0.1408811699533362,0.885,0.7597493231438954,200 -Linear,Linear,observational,True,1,0.95,0.945,0.7054873567225215,0.1408811699533362,0.93,0.8582671047974608,200 -Linear,Linear,observational,True,4,0.9,0.7633333333333333,3.124012529892269,0.9973634763359689,0.72,3.880323357977367,200 -Linear,Linear,observational,True,4,0.95,0.84,3.7224905277370017,0.9973634763359689,0.81,4.430132897406105,200 -Linear,Linear,observational,True,6,0.9,0.8966666666666667,2.823741863032981,0.7474950667730065,0.88,3.5108185024043683,200 -Linear,Linear,observational,True,6,0.95,0.9466666666666668,3.3646959598709376,0.7474950667730065,0.945,4.0073726417113,200 +Linear,Linear,experimental,False,1,0.9,0.876,0.5329948975220807,0.13579236732447947,0.846,0.683878514526821,1000 +Linear,Linear,experimental,False,1,0.95,0.9296666666666666,0.6351025926987942,0.13579236732447947,0.917,0.7732276242829601,1000 +Linear,Linear,experimental,False,4,0.9,0.658,2.1938722973937375,0.9674173487082218,0.525,2.767821034152252,1000 +Linear,Linear,experimental,False,4,0.95,0.746,2.614160080335666,0.9674173487082218,0.619,3.1440243876915375,1000 +Linear,Linear,experimental,False,6,0.9,0.9006666666666666,2.211125648458694,0.5338317649415134,0.919,2.783739324710087,1000 +Linear,Linear,experimental,False,6,0.95,0.9543333333333334,2.6347187161594587,0.5338317649415134,0.957,3.1662952947465888,1000 +Linear,Linear,experimental,True,1,0.9,0.8766666666666666,0.5328699306003187,0.1358281841054489,0.848,0.6847832796423149,1000 +Linear,Linear,experimental,True,1,0.95,0.9263333333333333,0.6349536854271081,0.1358281841054489,0.911,0.7727182150404185,1000 +Linear,Linear,experimental,True,4,0.9,0.6586666666666666,2.1921756345553276,0.9652578245005206,0.525,2.7628627454822605,1000 +Linear,Linear,experimental,True,4,0.95,0.7473333333333334,2.6121383818679704,0.9652578245005206,0.624,3.144606886076096,1000 +Linear,Linear,experimental,True,6,0.9,0.8993333333333333,2.2104603719936415,0.5344678450501394,0.912,2.784794352421448,1000 +Linear,Linear,experimental,True,6,0.95,0.954,2.6339259903570538,0.5344678450501394,0.957,3.164126890302782,1000 +Linear,Linear,observational,False,1,0.9,0.9026666666666666,0.6123404760096205,0.1438612793224918,0.904,0.7860078542582829,1000 +Linear,Linear,observational,False,1,0.95,0.9546666666666667,0.7296486809463548,0.1438612793224918,0.952,0.8872672286776676,1000 +Linear,Linear,observational,False,4,0.9,0.781,3.3074883394733083,1.0352240102334336,0.719,4.086258476471432,1000 +Linear,Linear,observational,False,4,0.95,0.8563333333333334,3.9411154393527843,1.0352240102334336,0.813,4.663160227096469,1000 +Linear,Linear,observational,False,6,0.9,0.899,2.789010379110977,0.6998566663431153,0.912,3.4660289192044,1000 +Linear,Linear,observational,False,6,0.95,0.9553333333333334,3.323310844197804,0.6998566663431153,0.96,3.9528394153130857,1000 +Linear,Linear,observational,True,1,0.9,0.9023333333333333,0.5949231101949434,0.1440501200808088,0.897,0.763308057016272,1000 +Linear,Linear,observational,True,1,0.95,0.9486666666666667,0.7088946094940543,0.1440501200808088,0.936,0.8623401634425215,1000 +Linear,Linear,observational,True,4,0.9,0.7643333333333334,3.142810509409861,1.0233709921822023,0.706,3.8984668952364427,1000 +Linear,Linear,observational,True,4,0.95,0.8463333333333334,3.7448897018841176,1.0233709921822023,0.804,4.447829548666937,1000 +Linear,Linear,observational,True,6,0.9,0.8976666666666666,2.6701046408964046,0.6759660173055291,0.902,3.329342240927625,1000 +Linear,Linear,observational,True,6,0.95,0.9526666666666667,3.181625918173329,0.6759660173055291,0.953,3.7967419653105576,1000 diff --git a/results/did/did_multi_metadata.csv b/results/did/did_multi_metadata.csv index 0e83932..2f67ace 100644 --- a/results/did/did_multi_metadata.csv +++ b/results/did/did_multi_metadata.csv @@ -1,2 +1,2 @@ DoubleML Version,Script,Date,Total Runtime (minutes),Python Version,Config File -0.10.dev0,DIDMultiCoverageSimulation,2025-03-19 17:35,27.171297589937847,3.12.9,scripts/did/multi_config.yml +0.10.dev0,DIDMultiCoverageSimulation,2025-03-21 13:02,3.9300304452578225,3.12.9,scripts/did/multi_config.yml diff --git a/results/did/did_multi_time.csv b/results/did/did_multi_time.csv index 0e8a662..7182d05 100644 --- a/results/did/did_multi_time.csv +++ b/results/did/did_multi_time.csv @@ -1,25 +1,25 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -Linear,Linear,experimental,False,1,0.9,0.85,0.49360461245245374,0.13317137989658068,0.805,0.6319610870324371,200 -Linear,Linear,experimental,False,1,0.95,0.9083333333333333,0.5881661730610652,0.13317137989658068,0.89,0.7144940237492544,200 -Linear,Linear,experimental,False,4,0.9,0.495,1.943482564791512,1.0099967068690494,0.475,2.237010089005512,200 -Linear,Linear,experimental,False,4,0.95,0.6183333333333334,2.315802311621298,1.0099967068690494,0.58,2.5967352695471275,200 -Linear,Linear,experimental,False,6,0.9,0.885,1.973586708219856,0.5137628285676683,0.875,2.269948492397086,200 -Linear,Linear,experimental,False,6,0.95,0.935,2.351673611011224,0.5137628285676683,0.93,2.6378921840020486,200 -Linear,Linear,experimental,True,1,0.9,0.8533333333333333,0.4936441210979332,0.13386449414919313,0.815,0.6316313581946184,200 -Linear,Linear,experimental,True,1,0.95,0.9083333333333333,0.5882132505158301,0.13386449414919313,0.89,0.7144700680586031,200 -Linear,Linear,experimental,True,4,0.9,0.495,1.9419691602716298,1.0073536527153972,0.485,2.233138294309388,200 -Linear,Linear,experimental,True,4,0.95,0.6033333333333334,2.313998978908644,1.0073536527153972,0.6,2.590827144962406,200 -Linear,Linear,experimental,True,6,0.9,0.8916666666666667,1.9743669935047528,0.5111362751423758,0.895,2.2727934396360774,200 -Linear,Linear,experimental,True,6,0.95,0.935,2.3526033782750138,0.5111362751423758,0.93,2.64045763785583,200 -Linear,Linear,observational,False,1,0.9,0.905,0.5957890718380163,0.14322442977409994,0.905,0.7621516555071253,200 -Linear,Linear,observational,False,1,0.95,0.9483333333333333,0.7099264664353688,0.14322442977409994,0.94,0.8622889926115689,200 -Linear,Linear,observational,False,4,0.9,0.7166666666666667,3.587198674078982,1.1518798523193952,0.695,4.005822809393348,200 -Linear,Linear,observational,False,4,0.95,0.7983333333333333,4.274410860263171,1.1518798523193952,0.785,4.68127664058613,200 -Linear,Linear,observational,False,6,0.9,0.8966666666666667,2.8422258436545302,0.7656607981855843,0.9,3.235109337869692,200 -Linear,Linear,observational,False,6,0.95,0.9466666666666668,3.386720981256164,0.7656607981855843,0.935,3.77638226426171,200 -Linear,Linear,observational,True,1,0.9,0.8966666666666667,0.5736643332685405,0.13819068965761655,0.89,0.7334447199193829,200 -Linear,Linear,observational,True,1,0.95,0.945,0.6835632143787673,0.13819068965761655,0.93,0.8284727058268883,200 -Linear,Linear,observational,True,4,0.9,0.7016666666666667,3.135225381339414,1.0623341589035538,0.66,3.525109938704791,200 -Linear,Linear,observational,True,4,0.95,0.7783333333333333,3.7358514643214518,1.0623341589035538,0.77,4.10980058127257,200 -Linear,Linear,observational,True,6,0.9,0.8816666666666667,2.6295968848181595,0.7121484510464997,0.87,3.011021831651718,200 -Linear,Linear,observational,True,6,0.95,0.935,3.1333579497006316,0.7121484510464997,0.95,3.4966663250213488,200 +Linear,Linear,experimental,False,1,0.9,0.862,0.4928810792988786,0.13124379587670076,0.839,0.6315410055040674,1000 +Linear,Linear,experimental,False,1,0.95,0.9253333333333333,0.5873040301327268,0.13124379587670076,0.905,0.7136054232732442,1000 +Linear,Linear,experimental,False,4,0.9,0.5016666666666667,1.9657848813119838,1.0502850008012623,0.473,2.259694817907404,1000 +Linear,Linear,experimental,False,4,0.95,0.5956666666666667,2.34237716085755,1.0502850008012623,0.576,2.6247319895995456,1000 +Linear,Linear,experimental,False,6,0.9,0.915,1.9600200144024984,0.46223102289234697,0.913,2.2566500717930382,1000 +Linear,Linear,experimental,False,6,0.95,0.9573333333333334,2.3355078982477218,0.46223102289234697,0.955,2.6243904341111817,1000 +Linear,Linear,experimental,True,1,0.9,0.86,0.49279866312558346,0.13118024657417612,0.835,0.6314273700892165,1000 +Linear,Linear,experimental,True,1,0.95,0.9256666666666666,0.5872058252050936,0.13118024657417612,0.903,0.7135421188498914,1000 +Linear,Linear,experimental,True,4,0.9,0.4956666666666667,1.9645783402752341,1.048403876833638,0.482,2.257895538601638,1000 +Linear,Linear,experimental,True,4,0.95,0.6013333333333334,2.340939478537888,1.048403876833638,0.576,2.623735792365416,1000 +Linear,Linear,experimental,True,6,0.9,0.916,1.9596368430072597,0.4616670580420602,0.917,2.258846499216311,1000 +Linear,Linear,experimental,True,6,0.95,0.9583333333333334,2.335051321369227,0.4616670580420602,0.957,2.619661989243463,1000 +Linear,Linear,observational,False,1,0.9,0.9046666666666666,0.6029754636773904,0.14420577130973078,0.91,0.7706892509169176,1000 +Linear,Linear,observational,False,1,0.95,0.9546666666666667,0.7184895804737107,0.14420577130973078,0.954,0.8719065946335489,1000 +Linear,Linear,observational,False,4,0.9,0.682,3.3042482077466073,1.1219461153182708,0.651,3.7179171164272695,1000 +Linear,Linear,observational,False,4,0.95,0.7726666666666666,3.937254584267904,1.1219461153182708,0.738,4.337439826876367,1000 +Linear,Linear,observational,False,6,0.9,0.914,2.5295434432500326,0.631825915195643,0.917,2.9157792155421123,1000 +Linear,Linear,observational,False,6,0.95,0.9626666666666667,3.014136920674323,0.631825915195643,0.967,3.386519653775383,1000 +Linear,Linear,observational,True,1,0.9,0.8916666666666666,0.5764292428073284,0.14270494869961284,0.893,0.7373182480398929,1000 +Linear,Linear,observational,True,1,0.95,0.9456666666666667,0.6868578073004362,0.14270494869961284,0.943,0.8337504767047077,1000 +Linear,Linear,observational,True,4,0.9,0.6606666666666666,3.110533543222582,1.1123478588300635,0.623,3.5061830916939076,1000 +Linear,Linear,observational,True,4,0.95,0.7673333333333334,3.7064293244859585,1.1123478588300635,0.727,4.084196858643447,1000 +Linear,Linear,observational,True,6,0.9,0.9073333333333333,2.4168915264549797,0.611462867914882,0.895,2.7838277996862724,1000 +Linear,Linear,observational,True,6,0.95,0.9533333333333334,2.879903882493947,0.611462867914882,0.953,3.2317290279843696,1000 diff --git a/results/did/multi_config.yml b/results/did/multi_config.yml index b53271c..f7579ad 100644 --- a/results/did/multi_config.yml +++ b/results/did/multi_config.yml @@ -46,5 +46,6 @@ dml_parameters: - experimental simulation_parameters: max_runtime: 19800 + n_jobs: -2 random_seed: 42 - repetitions: 200 + repetitions: 1000 diff --git a/scripts/did/did_pa_multi_coverage.py b/scripts/did/did_pa_multi_coverage.py index 7d2a191..af28d1c 100644 --- a/scripts/did/did_pa_multi_coverage.py +++ b/scripts/did/did_pa_multi_coverage.py @@ -4,7 +4,7 @@ # Create and run simulation with config file sim = DIDMultiCoverageSimulation( config_file="scripts/did/multi_config.yml", - log_level="INFO", + log_level="DEBUG", log_file="logs/did/multi_sim.log" ) sim.run_simulation() diff --git a/scripts/did/multi_config.yml b/scripts/did/multi_config.yml index de4d854..396085c 100644 --- a/scripts/did/multi_config.yml +++ b/scripts/did/multi_config.yml @@ -1,9 +1,10 @@ # Simulation parameters for DID Multi Coverage simulation_parameters: - repetitions: 200 + repetitions: 1000 max_runtime: 19800 # 5.5 hours in seconds random_seed: 42 + n_jobs: -2 dgp_parameters: DGP: [1, 4, 6] # Different DGP specifications From 0abb329e7a7ceae299bf63acba1ab9491bd4308e Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Fri, 21 Mar 2025 13:09:16 +0100 Subject: [PATCH 30/60] formatting --- monte-cover/src/montecover/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/monte-cover/src/montecover/base.py b/monte-cover/src/montecover/base.py index c312e0a..957f0fe 100644 --- a/monte-cover/src/montecover/base.py +++ b/monte-cover/src/montecover/base.py @@ -113,7 +113,9 @@ def run_simulation(self, n_jobs=None): self.logger.info(f"Starting parallel execution with n_jobs={n_jobs}") with parallel_backend("loky", inner_max_num_threads=1): results = Parallel(n_jobs=n_jobs, verbose=10)( - delayed(self._process_repetition)(i_rep) for i_rep in range(self.repetitions) if not self._stop_simulation() + delayed(self._process_repetition)(i_rep) + for i_rep in range(self.repetitions) + if not self._stop_simulation() ) # Process results from parallel execution From 06ab4538e913ae4e0bdd8d29ae564defaebc524b Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Fri, 21 Mar 2025 13:46:56 +0100 Subject: [PATCH 31/60] rename did multi files for consistency --- monte-cover/src/montecover/did/__init__.py | 2 +- .../did/{did_multi.py => did_pa_multi.py} | 0 results/did/did_multi_detailed.csv | 48 ++++++++--------- results/did/did_multi_eventstudy.csv | 48 ++++++++--------- results/did/did_multi_group.csv | 48 ++++++++--------- results/did/did_multi_metadata.csv | 2 +- results/did/did_multi_time.csv | 48 ++++++++--------- results/did/multi_config.yml | 51 ------------------- ...d_pa_multi_coverage.py => did_pa_multi.py} | 8 +-- ...lti_config.yml => did_pa_multi_config.yml} | 0 10 files changed, 102 insertions(+), 153 deletions(-) rename monte-cover/src/montecover/did/{did_multi.py => did_pa_multi.py} (100%) delete mode 100644 results/did/multi_config.yml rename scripts/did/{did_pa_multi_coverage.py => did_pa_multi.py} (53%) rename scripts/did/{multi_config.yml => did_pa_multi_config.yml} (100%) diff --git a/monte-cover/src/montecover/did/__init__.py b/monte-cover/src/montecover/did/__init__.py index 24967e6..5aecac3 100644 --- a/monte-cover/src/montecover/did/__init__.py +++ b/monte-cover/src/montecover/did/__init__.py @@ -1,5 +1,5 @@ """Monte Carlo coverage simulations for DiD.""" -from montecover.did.did_multi import DIDMultiCoverageSimulation +from montecover.did.did_pa_multi import DIDMultiCoverageSimulation __all__ = ["DIDMultiCoverageSimulation"] diff --git a/monte-cover/src/montecover/did/did_multi.py b/monte-cover/src/montecover/did/did_pa_multi.py similarity index 100% rename from monte-cover/src/montecover/did/did_multi.py rename to monte-cover/src/montecover/did/did_pa_multi.py diff --git a/results/did/did_multi_detailed.csv b/results/did/did_multi_detailed.csv index 3d0b81a..b985bdb 100644 --- a/results/did/did_multi_detailed.csv +++ b/results/did/did_multi_detailed.csv @@ -1,25 +1,25 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -Linear,Linear,experimental,False,1,0.9,0.8813333333333334,0.5961686505266492,0.15102133299318632,0.834,0.9296789699097547,1000 -Linear,Linear,experimental,False,1,0.95,0.9350833333333334,0.7103787623398975,0.15102133299318632,0.908,1.0206042134000024,1000 -Linear,Linear,experimental,False,4,0.9,0.6619166666666666,1.986651429023609,0.8637379841284726,0.52,2.882026229739649,1000 -Linear,Linear,experimental,False,4,0.95,0.7520833333333333,2.3672411860366602,0.8637379841284726,0.617,3.2128015018838694,1000 -Linear,Linear,experimental,False,6,0.9,0.902,2.00497022725443,0.4810970023674208,0.911,2.9031760219044904,1000 -Linear,Linear,experimental,False,6,0.95,0.9528333333333334,2.3890693804633027,0.4810970023674208,0.951,3.238600319213653,1000 -Linear,Linear,experimental,True,1,0.9,0.8800833333333333,0.5960959285920073,0.15123045002955704,0.833,0.928366902428871,1000 -Linear,Linear,experimental,True,1,0.95,0.9353333333333333,0.7102921088100949,0.15123045002955704,0.913,1.0197692316323934,1000 -Linear,Linear,experimental,True,4,0.9,0.6590833333333334,1.9857772419115973,0.8626296646616975,0.52,2.8815675975045956,1000 -Linear,Linear,experimental,True,4,0.95,0.7531666666666667,2.3661995278445764,0.8626296646616975,0.619,3.2112254886896605,1000 -Linear,Linear,experimental,True,6,0.9,0.9019166666666666,2.004527154284187,0.4808213402748324,0.905,2.9011439332421705,1000 -Linear,Linear,experimental,True,6,0.95,0.952,2.3885414264557423,0.4808213402748324,0.949,3.237049999080413,1000 -Linear,Linear,observational,False,1,0.9,0.90575,0.6906210074073058,0.16339132921843413,0.897,1.0727694533982786,1000 -Linear,Linear,observational,False,1,0.95,0.9518333333333334,0.8229256873110352,0.16339132921843413,0.946,1.1792381527650921,1000 -Linear,Linear,observational,False,4,0.9,0.7795,2.9571361297998364,0.9287818108191471,0.691,4.19740184270945,1000 -Linear,Linear,observational,False,4,0.95,0.8571666666666666,3.5236450324955486,0.9287818108191471,0.78,4.697698545475343,1000 -Linear,Linear,observational,False,6,0.9,0.9076666666666666,2.5544833881976365,0.6416394592068319,0.907,3.6632944671996808,1000 -Linear,Linear,observational,False,6,0.95,0.9550833333333334,3.0438546980332184,0.6416394592068319,0.958,4.0959649390037125,1000 -Linear,Linear,observational,True,1,0.9,0.8973333333333333,0.668426359641987,0.16249117038954014,0.895,1.038888800002171,1000 -Linear,Linear,observational,True,1,0.95,0.9465833333333333,0.7964791333096312,0.16249117038954014,0.939,1.1417719060066087,1000 -Linear,Linear,observational,True,4,0.9,0.7675,2.823122727518332,0.9146880810616262,0.686,4.025190417054882,1000 -Linear,Linear,observational,True,4,0.95,0.8508333333333333,3.3639582144020532,0.9146880810616262,0.768,4.499697598146944,1000 -Linear,Linear,observational,True,6,0.9,0.89775,2.4371258648326704,0.6190705910995143,0.893,3.5036401350107074,1000 -Linear,Linear,observational,True,6,0.95,0.9521666666666666,2.9040145837876374,0.6190705910995143,0.955,3.9130910221754434,1000 +Linear,Linear,experimental,False,1,0.9,0.8770833333333333,0.5956631078920439,0.15393126826790132,0.846,0.9280642120939564,1000 +Linear,Linear,experimental,False,1,0.95,0.9353333333333333,0.70977637113606,0.15393126826790132,0.907,1.01868658603788,1000 +Linear,Linear,experimental,False,4,0.9,0.6671666666666666,1.9827195149925345,0.8550657449695865,0.505,2.8772921242320737,1000 +Linear,Linear,experimental,False,4,0.95,0.758,2.362556021493784,0.8550657449695865,0.628,3.2083215653145722,1000 +Linear,Linear,experimental,False,6,0.9,0.9025,2.00173937868972,0.49027975353015657,0.903,2.8952108652661397,1000 +Linear,Linear,experimental,False,6,0.95,0.9499166666666666,2.385219586948198,0.49027975353015657,0.939,3.230482678959989,1000 +Linear,Linear,experimental,True,1,0.9,0.8771666666666667,0.5956064011739037,0.15426338756081115,0.842,0.9278381417397478,1000 +Linear,Linear,experimental,True,1,0.95,0.9339166666666666,0.7097088009137527,0.15426338756081115,0.912,1.0187258089279716,1000 +Linear,Linear,experimental,True,4,0.9,0.6675,1.9828114892881032,0.8559251553294747,0.507,2.8761724678009353,1000 +Linear,Linear,experimental,True,4,0.95,0.7571666666666667,2.362665615626578,0.8559251553294747,0.618,3.204786768191425,1000 +Linear,Linear,experimental,True,6,0.9,0.9008333333333334,2.002017704071254,0.4900985674785569,0.904,2.897432562708396,1000 +Linear,Linear,experimental,True,6,0.95,0.9494166666666666,2.3855512320957373,0.4900985674785569,0.945,3.231599891589011,1000 +Linear,Linear,observational,False,1,0.9,0.9048333333333334,0.6855202939670088,0.16429464571110677,0.905,1.0652155650078814,1000 +Linear,Linear,observational,False,1,0.95,0.9518333333333334,0.8168478123715063,0.16429464571110677,0.951,1.1708094409885172,1000 +Linear,Linear,observational,False,4,0.9,0.7851666666666667,2.7948549075952385,0.8941603312052668,0.689,4.003170404405238,1000 +Linear,Linear,observational,False,4,0.95,0.8580833333333334,3.3302750294286816,0.8941603312052668,0.786,4.4764083966934205,1000 +Linear,Linear,observational,False,6,0.9,0.8918333333333334,2.540792582093424,0.6659145487088738,0.893,3.64735417288717,1000 +Linear,Linear,observational,False,6,0.95,0.9475,3.0275410963583322,0.6659145487088738,0.941,4.076810932574564,1000 +Linear,Linear,observational,True,1,0.9,0.8975,0.6634200132755311,0.16175894761877385,0.888,1.0319404210431198,1000 +Linear,Linear,observational,True,1,0.95,0.94725,0.790513703674064,0.16175894761877385,0.94,1.1332864016074393,1000 +Linear,Linear,observational,True,4,0.9,0.7758333333333334,2.7290002317619733,0.8973641897321528,0.674,3.912420538282281,1000 +Linear,Linear,observational,True,4,0.95,0.8505833333333334,3.2518043432035615,0.8973641897321528,0.792,4.369245108445732,1000 +Linear,Linear,observational,True,6,0.9,0.8846666666666666,2.4411244723625476,0.6398322462292214,0.892,3.513044851639997,1000 +Linear,Linear,observational,True,6,0.95,0.9423333333333334,2.9087792185359564,0.6398322462292214,0.945,3.923376128802193,1000 diff --git a/results/did/did_multi_eventstudy.csv b/results/did/did_multi_eventstudy.csv index 78a9bb7..909cde3 100644 --- a/results/did/did_multi_eventstudy.csv +++ b/results/did/did_multi_eventstudy.csv @@ -1,25 +1,25 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -Linear,Linear,experimental,False,1,0.9,0.8746666666666666,0.42536022351351016,0.11129964461197367,0.856,0.6065601425726624,1000 -Linear,Linear,experimental,False,1,0.95,0.9343333333333333,0.5068479680392762,0.11129964461197367,0.923,0.6740692167988962,1000 -Linear,Linear,experimental,False,4,0.9,0.6018333333333333,1.9789774969843743,0.9612815234569009,0.504,2.557725621904857,1000 -Linear,Linear,experimental,False,4,0.95,0.6915,2.3580971320185626,0.9612815234569009,0.606,2.9077454096108863,1000 -Linear,Linear,experimental,False,6,0.9,0.9026666666666666,2.0021783896522174,0.475645152957695,0.913,2.5813810385024185,1000 -Linear,Linear,experimental,False,6,0.95,0.9546666666666667,2.3857427007749936,0.475645152957695,0.954,2.939126540032628,1000 -Linear,Linear,experimental,True,1,0.9,0.8736666666666666,0.4252780101030476,0.11135661295209692,0.855,0.6067206852239997,1000 -Linear,Linear,experimental,True,1,0.95,0.9338333333333334,0.50675000471846,0.11135661295209692,0.919,0.6737727543313963,1000 -Linear,Linear,experimental,True,4,0.9,0.604,1.9778347169116364,0.9610017220191109,0.506,2.5570866190887442,1000 -Linear,Linear,experimental,True,4,0.95,0.69,2.356735425573614,0.9610017220191109,0.614,2.906700104748762,1000 -Linear,Linear,experimental,True,6,0.9,0.9028333333333334,2.001368819203873,0.47488976645105485,0.91,2.5788107797213202,1000 -Linear,Linear,experimental,True,6,0.95,0.9543333333333334,2.3847780380866523,0.47488976645105485,0.954,2.9346744455419307,1000 -Linear,Linear,observational,False,1,0.9,0.9048333333333334,0.4936490463630555,0.11703447731264664,0.911,0.7026803919052239,1000 -Linear,Linear,observational,False,1,0.95,0.9523333333333334,0.5882191193312043,0.11703447731264664,0.953,0.7817258159201687,1000 -Linear,Linear,observational,False,4,0.9,0.7483333333333334,3.110852841424021,1.0162956359155522,0.691,3.927457336373739,1000 -Linear,Linear,observational,False,4,0.95,0.8321666666666666,3.7068097917596994,1.0162956359155522,0.775,4.489588602429944,1000 -Linear,Linear,observational,False,6,0.9,0.908,2.6065175455108682,0.657901837298179,0.912,3.319528013865773,1000 -Linear,Linear,observational,False,6,0.95,0.9611666666666666,3.1058572207068265,0.657901837298179,0.96,3.78925559700768,1000 -Linear,Linear,observational,True,1,0.9,0.8983333333333333,0.478045989951027,0.1165385646041097,0.898,0.6810014878305387,1000 -Linear,Linear,observational,True,1,0.95,0.9476666666666667,0.5696269308742887,0.1165385646041097,0.951,0.7570193996194396,1000 -Linear,Linear,observational,True,4,0.9,0.7318333333333333,2.961887231450272,1.0118391967276548,0.664,3.755668505865932,1000 -Linear,Linear,observational,True,4,0.95,0.8186666666666667,3.5293063192928438,1.0118391967276548,0.771,4.287491165909032,1000 -Linear,Linear,observational,True,6,0.9,0.8983333333333333,2.4694251965466845,0.6253200792538618,0.908,3.1600238226116533,1000 -Linear,Linear,observational,True,6,0.95,0.9541666666666666,2.9425016113546496,0.6253200792538618,0.955,3.596198019745218,1000 +Linear,Linear,experimental,False,1,0.9,0.8676666666666666,0.42543423226976995,0.11378217794214893,0.82,0.607026998501089,1000 +Linear,Linear,experimental,False,1,0.95,0.921,0.5069361549116113,0.11378217794214893,0.893,0.6744173882852083,1000 +Linear,Linear,experimental,False,4,0.9,0.6021666666666666,1.9754395142835157,0.9518163003680035,0.488,2.5538078783006415,1000 +Linear,Linear,experimental,False,4,0.95,0.7053333333333334,2.353881365607505,0.9518163003680035,0.602,2.9021513463156756,1000 +Linear,Linear,experimental,False,6,0.9,0.8995,2.001327059411559,0.49627387221768626,0.899,2.5768571826106514,1000 +Linear,Linear,experimental,False,6,0.95,0.949,2.3847282782249866,0.49627387221768626,0.942,2.9364211171912067,1000 +Linear,Linear,experimental,True,1,0.9,0.8666666666666666,0.42531823168334737,0.1141016026224358,0.814,0.6067463378989032,1000 +Linear,Linear,experimental,True,1,0.95,0.9231666666666666,0.5067979316874602,0.1141016026224358,0.889,0.6733443239100646,1000 +Linear,Linear,experimental,True,4,0.9,0.5973333333333334,1.975365775525183,0.9534736795550611,0.491,2.5532803279562994,1000 +Linear,Linear,experimental,True,4,0.95,0.7055,2.353793500457543,0.9534736795550611,0.61,2.905573717129059,1000 +Linear,Linear,experimental,True,6,0.9,0.8978333333333334,2.0019957931284336,0.4959848232257912,0.9,2.579876093556324,1000 +Linear,Linear,experimental,True,6,0.95,0.9478333333333334,2.385525123597028,0.4959848232257912,0.944,2.9374235003380655,1000 +Linear,Linear,observational,False,1,0.9,0.9013333333333333,0.4873576971767433,0.11751015177996685,0.898,0.693580479033222,1000 +Linear,Linear,observational,False,1,0.95,0.9505,0.5807225143948788,0.11751015177996685,0.944,0.7712324745986096,1000 +Linear,Linear,observational,False,4,0.9,0.762,2.9253154914773845,0.972649026341708,0.692,3.7241194943689173,1000 +Linear,Linear,observational,False,4,0.95,0.8396666666666667,3.485728403286012,0.972649026341708,0.787,4.249241903518029,1000 +Linear,Linear,observational,False,6,0.9,0.8926666666666666,2.596496390444534,0.6912487923777589,0.89,3.308229651637506,1000 +Linear,Linear,observational,False,6,0.95,0.9455,3.0939162779434826,0.6912487923777589,0.948,3.7769009967220812,1000 +Linear,Linear,observational,True,1,0.9,0.8956666666666666,0.4727299379079462,0.11588912406999206,0.894,0.6735775257798401,1000 +Linear,Linear,observational,True,1,0.95,0.944,0.5632924641632966,0.11588912406999206,0.938,0.7483724833065163,1000 +Linear,Linear,observational,True,4,0.9,0.7468333333333333,2.8437612590899457,0.9776121628787491,0.682,3.627947639783714,1000 +Linear,Linear,observational,True,4,0.95,0.8328333333333334,3.3885505415923616,0.9776121628787491,0.775,4.133831167481912,1000 +Linear,Linear,observational,True,6,0.9,0.8851666666666667,2.4823044000101313,0.660809427159733,0.894,3.171860461977204,1000 +Linear,Linear,observational,True,6,0.95,0.9428333333333334,2.957848128834568,0.660809427159733,0.945,3.6158624454294848,1000 diff --git a/results/did/did_multi_group.csv b/results/did/did_multi_group.csv index d9fa94b..ab64a5f 100644 --- a/results/did/did_multi_group.csv +++ b/results/did/did_multi_group.csv @@ -1,25 +1,25 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -Linear,Linear,experimental,False,1,0.9,0.876,0.5329948975220807,0.13579236732447947,0.846,0.683878514526821,1000 -Linear,Linear,experimental,False,1,0.95,0.9296666666666666,0.6351025926987942,0.13579236732447947,0.917,0.7732276242829601,1000 -Linear,Linear,experimental,False,4,0.9,0.658,2.1938722973937375,0.9674173487082218,0.525,2.767821034152252,1000 -Linear,Linear,experimental,False,4,0.95,0.746,2.614160080335666,0.9674173487082218,0.619,3.1440243876915375,1000 -Linear,Linear,experimental,False,6,0.9,0.9006666666666666,2.211125648458694,0.5338317649415134,0.919,2.783739324710087,1000 -Linear,Linear,experimental,False,6,0.95,0.9543333333333334,2.6347187161594587,0.5338317649415134,0.957,3.1662952947465888,1000 -Linear,Linear,experimental,True,1,0.9,0.8766666666666666,0.5328699306003187,0.1358281841054489,0.848,0.6847832796423149,1000 -Linear,Linear,experimental,True,1,0.95,0.9263333333333333,0.6349536854271081,0.1358281841054489,0.911,0.7727182150404185,1000 -Linear,Linear,experimental,True,4,0.9,0.6586666666666666,2.1921756345553276,0.9652578245005206,0.525,2.7628627454822605,1000 -Linear,Linear,experimental,True,4,0.95,0.7473333333333334,2.6121383818679704,0.9652578245005206,0.624,3.144606886076096,1000 -Linear,Linear,experimental,True,6,0.9,0.8993333333333333,2.2104603719936415,0.5344678450501394,0.912,2.784794352421448,1000 -Linear,Linear,experimental,True,6,0.95,0.954,2.6339259903570538,0.5344678450501394,0.957,3.164126890302782,1000 -Linear,Linear,observational,False,1,0.9,0.9026666666666666,0.6123404760096205,0.1438612793224918,0.904,0.7860078542582829,1000 -Linear,Linear,observational,False,1,0.95,0.9546666666666667,0.7296486809463548,0.1438612793224918,0.952,0.8872672286776676,1000 -Linear,Linear,observational,False,4,0.9,0.781,3.3074883394733083,1.0352240102334336,0.719,4.086258476471432,1000 -Linear,Linear,observational,False,4,0.95,0.8563333333333334,3.9411154393527843,1.0352240102334336,0.813,4.663160227096469,1000 -Linear,Linear,observational,False,6,0.9,0.899,2.789010379110977,0.6998566663431153,0.912,3.4660289192044,1000 -Linear,Linear,observational,False,6,0.95,0.9553333333333334,3.323310844197804,0.6998566663431153,0.96,3.9528394153130857,1000 -Linear,Linear,observational,True,1,0.9,0.9023333333333333,0.5949231101949434,0.1440501200808088,0.897,0.763308057016272,1000 -Linear,Linear,observational,True,1,0.95,0.9486666666666667,0.7088946094940543,0.1440501200808088,0.936,0.8623401634425215,1000 -Linear,Linear,observational,True,4,0.9,0.7643333333333334,3.142810509409861,1.0233709921822023,0.706,3.8984668952364427,1000 -Linear,Linear,observational,True,4,0.95,0.8463333333333334,3.7448897018841176,1.0233709921822023,0.804,4.447829548666937,1000 -Linear,Linear,observational,True,6,0.9,0.8976666666666666,2.6701046408964046,0.6759660173055291,0.902,3.329342240927625,1000 -Linear,Linear,observational,True,6,0.95,0.9526666666666667,3.181625918173329,0.6759660173055291,0.953,3.7967419653105576,1000 +Linear,Linear,experimental,False,1,0.9,0.865,0.5332689974285741,0.14125883992697605,0.84,0.684967458838645,1000 +Linear,Linear,experimental,False,1,0.95,0.923,0.6354292028822721,0.14125883992697605,0.898,0.7737658489393863,1000 +Linear,Linear,experimental,False,4,0.9,0.6613333333333332,2.187885379540459,0.9604906586192218,0.498,2.7575340571302047,1000 +Linear,Linear,experimental,False,4,0.95,0.7556666666666666,2.607026227706741,0.9604906586192218,0.602,3.1362004034484614,1000 +Linear,Linear,experimental,False,6,0.9,0.8976666666666666,2.2072703099683895,0.5422311709957129,0.907,2.7789385342819997,1000 +Linear,Linear,experimental,False,6,0.95,0.9506666666666667,2.6301247970013075,0.5422311709957129,0.941,3.1616330454003854,1000 +Linear,Linear,experimental,True,1,0.9,0.8643333333333334,0.5331656474907569,0.1416028173409448,0.837,0.6848091387598605,1000 +Linear,Linear,experimental,True,1,0.95,0.9223333333333333,0.6353060538356899,0.1416028173409448,0.904,0.7729755854524409,1000 +Linear,Linear,experimental,True,4,0.9,0.6636666666666666,2.1871578881758738,0.9618357917015027,0.495,2.757365097655949,1000 +Linear,Linear,experimental,True,4,0.95,0.7556666666666666,2.606159368279076,0.9618357917015027,0.604,3.1339986032881795,1000 +Linear,Linear,experimental,True,6,0.9,0.8983333333333333,2.2070772542069657,0.5424515866558068,0.899,2.779655081198074,1000 +Linear,Linear,experimental,True,6,0.95,0.9513333333333334,2.629894756872995,0.5424515866558068,0.942,3.16003069657915,1000 +Linear,Linear,observational,False,1,0.9,0.902,0.6106049709052258,0.14629034271149396,0.89,0.7831902414227334,1000 +Linear,Linear,observational,False,1,0.95,0.947,0.727580699064038,0.14629034271149396,0.942,0.8844844476393456,1000 +Linear,Linear,observational,False,4,0.9,0.7813333333333333,3.0907797972605278,0.9943909423280353,0.706,3.8523704910840313,1000 +Linear,Linear,observational,False,4,0.95,0.8523333333333334,3.682891284376495,0.9943909423280353,0.809,4.39501177360628,1000 +Linear,Linear,observational,False,6,0.9,0.89,2.7865039885472247,0.7301188763670151,0.894,3.468312373428792,1000 +Linear,Linear,observational,False,6,0.95,0.95,3.3203242956346655,0.7301188763670151,0.945,3.9541003782057595,1000 +Linear,Linear,observational,True,1,0.9,0.8946666666666666,0.5896388541244254,0.14371827951522767,0.878,0.7568642372370822,1000 +Linear,Linear,observational,True,1,0.95,0.9423333333333334,0.7025980300212064,0.14371827951522767,0.936,0.8549636526386375,1000 +Linear,Linear,observational,True,4,0.9,0.777,3.0325048545897997,1.0070643044350587,0.698,3.7834488519755434,1000 +Linear,Linear,observational,True,4,0.95,0.8456666666666667,3.6134524072847696,1.0070643044350587,0.784,4.309691278217546,1000 +Linear,Linear,observational,True,6,0.9,0.8863333333333334,2.674147344485724,0.6969076659422232,0.89,3.3341905763684103,1000 +Linear,Linear,observational,True,6,0.95,0.9453333333333334,3.1864430966172987,0.6969076659422232,0.943,3.804017709516315,1000 diff --git a/results/did/did_multi_metadata.csv b/results/did/did_multi_metadata.csv index 2f67ace..4124b94 100644 --- a/results/did/did_multi_metadata.csv +++ b/results/did/did_multi_metadata.csv @@ -1,2 +1,2 @@ DoubleML Version,Script,Date,Total Runtime (minutes),Python Version,Config File -0.10.dev0,DIDMultiCoverageSimulation,2025-03-21 13:02,3.9300304452578225,3.12.9,scripts/did/multi_config.yml +0.10.dev0,DIDMultiCoverageSimulation,2025-03-21 13:46,3.4916115164756776,3.12.9,scripts/did/did_pa_multi_config.yml diff --git a/results/did/did_multi_time.csv b/results/did/did_multi_time.csv index 7182d05..06c3c22 100644 --- a/results/did/did_multi_time.csv +++ b/results/did/did_multi_time.csv @@ -1,25 +1,25 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -Linear,Linear,experimental,False,1,0.9,0.862,0.4928810792988786,0.13124379587670076,0.839,0.6315410055040674,1000 -Linear,Linear,experimental,False,1,0.95,0.9253333333333333,0.5873040301327268,0.13124379587670076,0.905,0.7136054232732442,1000 -Linear,Linear,experimental,False,4,0.9,0.5016666666666667,1.9657848813119838,1.0502850008012623,0.473,2.259694817907404,1000 -Linear,Linear,experimental,False,4,0.95,0.5956666666666667,2.34237716085755,1.0502850008012623,0.576,2.6247319895995456,1000 -Linear,Linear,experimental,False,6,0.9,0.915,1.9600200144024984,0.46223102289234697,0.913,2.2566500717930382,1000 -Linear,Linear,experimental,False,6,0.95,0.9573333333333334,2.3355078982477218,0.46223102289234697,0.955,2.6243904341111817,1000 -Linear,Linear,experimental,True,1,0.9,0.86,0.49279866312558346,0.13118024657417612,0.835,0.6314273700892165,1000 -Linear,Linear,experimental,True,1,0.95,0.9256666666666666,0.5872058252050936,0.13118024657417612,0.903,0.7135421188498914,1000 -Linear,Linear,experimental,True,4,0.9,0.4956666666666667,1.9645783402752341,1.048403876833638,0.482,2.257895538601638,1000 -Linear,Linear,experimental,True,4,0.95,0.6013333333333334,2.340939478537888,1.048403876833638,0.576,2.623735792365416,1000 -Linear,Linear,experimental,True,6,0.9,0.916,1.9596368430072597,0.4616670580420602,0.917,2.258846499216311,1000 -Linear,Linear,experimental,True,6,0.95,0.9583333333333334,2.335051321369227,0.4616670580420602,0.957,2.619661989243463,1000 -Linear,Linear,observational,False,1,0.9,0.9046666666666666,0.6029754636773904,0.14420577130973078,0.91,0.7706892509169176,1000 -Linear,Linear,observational,False,1,0.95,0.9546666666666667,0.7184895804737107,0.14420577130973078,0.954,0.8719065946335489,1000 -Linear,Linear,observational,False,4,0.9,0.682,3.3042482077466073,1.1219461153182708,0.651,3.7179171164272695,1000 -Linear,Linear,observational,False,4,0.95,0.7726666666666666,3.937254584267904,1.1219461153182708,0.738,4.337439826876367,1000 -Linear,Linear,observational,False,6,0.9,0.914,2.5295434432500326,0.631825915195643,0.917,2.9157792155421123,1000 -Linear,Linear,observational,False,6,0.95,0.9626666666666667,3.014136920674323,0.631825915195643,0.967,3.386519653775383,1000 -Linear,Linear,observational,True,1,0.9,0.8916666666666666,0.5764292428073284,0.14270494869961284,0.893,0.7373182480398929,1000 -Linear,Linear,observational,True,1,0.95,0.9456666666666667,0.6868578073004362,0.14270494869961284,0.943,0.8337504767047077,1000 -Linear,Linear,observational,True,4,0.9,0.6606666666666666,3.110533543222582,1.1123478588300635,0.623,3.5061830916939076,1000 -Linear,Linear,observational,True,4,0.95,0.7673333333333334,3.7064293244859585,1.1123478588300635,0.727,4.084196858643447,1000 -Linear,Linear,observational,True,6,0.9,0.9073333333333333,2.4168915264549797,0.611462867914882,0.895,2.7838277996862724,1000 -Linear,Linear,observational,True,6,0.95,0.9533333333333334,2.879903882493947,0.611462867914882,0.953,3.2317290279843696,1000 +Linear,Linear,experimental,False,1,0.9,0.8453333333333334,0.49324862390769003,0.1376326316621036,0.822,0.6316419735152038,1000 +Linear,Linear,experimental,False,1,0.95,0.912,0.5877419865467073,0.1376326316621036,0.891,0.7143067511536322,1000 +Linear,Linear,experimental,False,4,0.9,0.4776666666666667,1.9593068261105524,1.0466452508829949,0.45,2.2507550996198735,1000 +Linear,Linear,experimental,False,4,0.95,0.579,2.3346580819823073,1.0466452508829949,0.556,2.6163918210317183,1000 +Linear,Linear,experimental,False,6,0.9,0.8956666666666666,1.9573896704373563,0.48930237462467674,0.896,2.2565806380862594,1000 +Linear,Linear,experimental,False,6,0.95,0.9463333333333334,2.3323736500969083,0.48930237462467674,0.941,2.62032018987877,1000 +Linear,Linear,experimental,True,1,0.9,0.8463333333333334,0.4931694609078208,0.1378285637524634,0.824,0.6319264464558539,1000 +Linear,Linear,experimental,True,1,0.95,0.9093333333333333,0.587647658014302,0.1378285637524634,0.895,0.7142050985707156,1000 +Linear,Linear,experimental,True,4,0.9,0.473,1.9591517453060092,1.0480526529722811,0.45,2.250777097405993,1000 +Linear,Linear,experimental,True,4,0.95,0.5806666666666667,2.334473291806076,1.0480526529722811,0.55,2.6128556265062666,1000 +Linear,Linear,experimental,True,6,0.9,0.8966666666666666,1.9576188610509668,0.49183824648546365,0.893,2.253956782621074,1000 +Linear,Linear,experimental,True,6,0.95,0.945,2.3326467475573214,0.49183824648546365,0.943,2.6202784765893865,1000 +Linear,Linear,observational,False,1,0.9,0.8953333333333334,0.5968613600047712,0.14788675870016774,0.878,0.7631035273143418,1000 +Linear,Linear,observational,False,1,0.95,0.94,0.7112041765935568,0.14788675870016774,0.945,0.8624624885034761,1000 +Linear,Linear,observational,False,4,0.9,0.6876666666666666,3.0580400071087412,1.0638406360538493,0.653,3.462223480766848,1000 +Linear,Linear,observational,False,4,0.95,0.7736666666666666,3.643879418209516,1.0638406360538493,0.75,4.0319351473266085,1000 +Linear,Linear,observational,False,6,0.9,0.8823333333333334,2.548375931783461,0.6811130775533906,0.871,2.9334540834011715,1000 +Linear,Linear,observational,False,6,0.95,0.9406666666666667,3.036577214850038,0.6811130775533906,0.945,3.4079635812732043,1000 +Linear,Linear,observational,True,1,0.9,0.8806666666666666,0.5725784741025863,0.14380420604106553,0.867,0.7329506080582452,1000 +Linear,Linear,observational,True,1,0.95,0.9413333333333334,0.682269333377637,0.14380420604106553,0.926,0.8286474263809458,1000 +Linear,Linear,observational,True,4,0.9,0.666,2.97181956637082,1.075066363572111,0.635,3.3631545325412926,1000 +Linear,Linear,observational,True,4,0.95,0.7603333333333334,3.5411414263246734,1.075066363572111,0.748,3.9204031440435947,1000 +Linear,Linear,observational,True,6,0.9,0.8823333333333334,2.4376548170067376,0.6493921794587046,0.877,2.808933035095803,1000 +Linear,Linear,observational,True,6,0.95,0.939,2.904644869178221,0.6493921794587046,0.937,3.2552833144907303,1000 diff --git a/results/did/multi_config.yml b/results/did/multi_config.yml deleted file mode 100644 index f7579ad..0000000 --- a/results/did/multi_config.yml +++ /dev/null @@ -1,51 +0,0 @@ -confidence_parameters: - level: - - 0.95 - - 0.9 -dgp_parameters: - DGP: - - 1 - - 4 - - 6 - n_obs: - - 500 -dml_parameters: - in_sample_normalization: - - true - - false - learners: - - ml_g: !!python/tuple - - Linear - - !!python/object:sklearn.linear_model._base.LinearRegression - _sklearn_version: 1.5.2 - copy_X: true - fit_intercept: true - n_jobs: null - positive: false - ml_m: !!python/tuple - - Linear - - !!python/object:sklearn.linear_model._logistic.LogisticRegression - C: 1.0 - _sklearn_version: 1.5.2 - class_weight: null - dual: false - fit_intercept: true - intercept_scaling: 1 - l1_ratio: null - max_iter: 100 - multi_class: deprecated - n_jobs: null - penalty: l2 - random_state: null - solver: lbfgs - tol: 0.0001 - verbose: 0 - warm_start: false - score: - - observational - - experimental -simulation_parameters: - max_runtime: 19800 - n_jobs: -2 - random_seed: 42 - repetitions: 1000 diff --git a/scripts/did/did_pa_multi_coverage.py b/scripts/did/did_pa_multi.py similarity index 53% rename from scripts/did/did_pa_multi_coverage.py rename to scripts/did/did_pa_multi.py index af28d1c..f06a03e 100644 --- a/scripts/did/did_pa_multi_coverage.py +++ b/scripts/did/did_pa_multi.py @@ -1,14 +1,14 @@ -from montecover.did.did_multi import DIDMultiCoverageSimulation +from montecover.did import DIDMultiCoverageSimulation # Create and run simulation with config file sim = DIDMultiCoverageSimulation( - config_file="scripts/did/multi_config.yml", + config_file="scripts/did/did_pa_multi_config.yml", log_level="DEBUG", - log_file="logs/did/multi_sim.log" + log_file="logs/did/did_pa_multi_sim.log" ) sim.run_simulation() sim.save_results(output_path="results/did/", file_prefix="did_multi") # Save config file for reproducibility -sim.save_config("results/did/multi_config.yml") +sim.save_config("results/did/did_pa_multi_config.yml") diff --git a/scripts/did/multi_config.yml b/scripts/did/did_pa_multi_config.yml similarity index 100% rename from scripts/did/multi_config.yml rename to scripts/did/did_pa_multi_config.yml From 8b664ff2b250d745180c30f20053528f8465153c Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Fri, 21 Mar 2025 13:54:49 +0100 Subject: [PATCH 32/60] add did config --- results/did/did_pa_multi_config.yml | 51 +++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 results/did/did_pa_multi_config.yml diff --git a/results/did/did_pa_multi_config.yml b/results/did/did_pa_multi_config.yml new file mode 100644 index 0000000..f7579ad --- /dev/null +++ b/results/did/did_pa_multi_config.yml @@ -0,0 +1,51 @@ +confidence_parameters: + level: + - 0.95 + - 0.9 +dgp_parameters: + DGP: + - 1 + - 4 + - 6 + n_obs: + - 500 +dml_parameters: + in_sample_normalization: + - true + - false + learners: + - ml_g: !!python/tuple + - Linear + - !!python/object:sklearn.linear_model._base.LinearRegression + _sklearn_version: 1.5.2 + copy_X: true + fit_intercept: true + n_jobs: null + positive: false + ml_m: !!python/tuple + - Linear + - !!python/object:sklearn.linear_model._logistic.LogisticRegression + C: 1.0 + _sklearn_version: 1.5.2 + class_weight: null + dual: false + fit_intercept: true + intercept_scaling: 1 + l1_ratio: null + max_iter: 100 + multi_class: deprecated + n_jobs: null + penalty: l2 + random_state: null + solver: lbfgs + tol: 0.0001 + verbose: 0 + warm_start: false + score: + - observational + - experimental +simulation_parameters: + max_runtime: 19800 + n_jobs: -2 + random_seed: 42 + repetitions: 1000 From dc0c6123d6b4db53901d290830f1624d28c8649c Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Fri, 21 Mar 2025 13:56:42 +0100 Subject: [PATCH 33/60] first version plr --- monte-cover/src/montecover/plm/__init__.py | 5 + monte-cover/src/montecover/plm/plr_ate.py | 137 +++++++++++++++++++++ scripts/plm/plr_ate.py | 14 +++ scripts/plm/plr_ate_config.yml | 29 +++++ 4 files changed, 185 insertions(+) create mode 100644 monte-cover/src/montecover/plm/__init__.py create mode 100644 monte-cover/src/montecover/plm/plr_ate.py create mode 100644 scripts/plm/plr_ate.py create mode 100644 scripts/plm/plr_ate_config.yml diff --git a/monte-cover/src/montecover/plm/__init__.py b/monte-cover/src/montecover/plm/__init__.py new file mode 100644 index 0000000..f861d2b --- /dev/null +++ b/monte-cover/src/montecover/plm/__init__.py @@ -0,0 +1,5 @@ +"""Monte Carlo coverage simulations for PLM.""" + +from montecover.plm.plr_ate import PLRATECoverageSimulation + +__all__ = ["PLRATECoverageSimulation"] diff --git a/monte-cover/src/montecover/plm/plr_ate.py b/monte-cover/src/montecover/plm/plr_ate.py new file mode 100644 index 0000000..803c583 --- /dev/null +++ b/monte-cover/src/montecover/plm/plr_ate.py @@ -0,0 +1,137 @@ +from typing import Any, Dict, Optional + +import doubleml as dml +from doubleml.datasets import make_plr_CCDDHNR2018 +from lightgbm import LGBMRegressor +from sklearn.ensemble import RandomForestRegressor +from sklearn.linear_model import LassoCV + +from montecover.base import BaseSimulation + + +class PLRATECoverageSimulation(BaseSimulation): + """Simulation study for coverage properties of DoubleMLPLR for ATE estimation.""" + + def __init__( + self, + config_file: str, + suppress_warnings: bool = True, + log_level: str = "INFO", + log_file: Optional[str] = None, + ): + super().__init__( + config_file=config_file, + suppress_warnings=suppress_warnings, + log_level=log_level, + log_file=log_file, + ) + + # Additional results storage for aggregated results + self.results_aggregated = [] + + # Calculate oracle values + self._calculate_oracle_values() + + def _process_config_parameters(self): + """Process simulation-specific parameters from config""" + # Process ML models in parameter grid + assert "learners" in self.dml_parameters, "No learners specified in the config file" + for learner in self.dml_parameters["learners"]: + assert "ml_g" in learner, "No ml_g specified in the config file" + assert "ml_m" in learner, "No ml_m specified in the config file" + + # Convert ml_g strings to actual objects + learner["ml_g"] = self._convert_ml_string_to_object(learner["ml_g"][0]) + learner["ml_m"] = self._convert_ml_string_to_object(learner["ml_m"][0]) + + def _convert_ml_string_to_object(self, ml_string): + """Convert a string to a machine learning object.""" + if ml_string == "Lasso": + learner = LassoCV() + elif ml_string == "Random Forest": + learner = RandomForestRegressor(n_estimators=100, max_features=20, max_depth=5, min_samples_leaf=2) + elif ml_string == "LGBM": + learner = LGBMRegressor(n_estimators=100, learning_rate=0.05, verbose=-1) + else: + raise ValueError(f"Unknown learner type: {ml_string}") + + return (ml_string, learner) + + def _calculate_oracle_values(self): + """Calculate oracle values for the simulation.""" + self.logger.info("Calculating oracle values") + + self.oracle_values = dict() + self.oracle_values["theta"] = self.dgp_parameters["theta"] + + def run_single_rep(self, dml_data, dml_params) -> Dict[str, Any]: + """Run a single repetition with the given parameters.""" + # Extract parameters + learner_g_name, ml_g = dml_params["learners"]["ml_g"] + learner_m_name, ml_m = dml_params["learners"]["ml_m"] + score = dml_params["score"] + + # Model + dml_model = dml.DoubleMLPLR( + obj_dml_data=dml_data, + ml_l=ml_g, + ml_m=ml_m, + ml_g=ml_g if score == "IV-type" else None, + score=score, + ) + dml_model.fit() + + result = { + "coverage": [], + } + for level in self.confidence_parameters["level"]: + level_result = dict() + level_result["coverage"] = self._compute_coverage( + thetas=dml_model.coef, + oracle_thetas=self.oracle_values["theta"], + confint=dml_model.confint(level=level), + joint_confint=None, + ) + + # add parameters to the result + for res in level_result.values(): + res.update( + { + "Learner g": learner_g_name, + "Learner m": learner_m_name, + "Score": score, + "level": level, + } + ) + for key, res in level_result.items(): + result[key].append(res) + + return result + + def summarize_results(self): + """Summarize the simulation results.""" + self.logger.info("Summarizing simulation results") + + # Group by parameter combinations + groupby_cols = ["Learner g", "Learner m", "Score", "level"] + aggregation_dict = { + "Coverage": "mean", + "CI Length": "mean", + "Bias": "mean", + } + + # Aggregate results (possibly multiple result dfs) + result_summary = dict() + for result_name, result_df in self.results.items(): + result_summary[result_name] = result_df.groupby(groupby_cols).agg(aggregation_dict).reset_index() + self.logger.debug(f"Summarized {result_name} results") + + return result_summary + + def _generate_dml_data(self, dgp_params) -> dml.DoubleMLData: + """Generate data for the simulation.""" + data = make_plr_CCDDHNR2018( + alpha=dgp_params["theta"], n_obs=dgp_params["n_obs"], dim_x=dgp_params["dim_x"], return_type="DataFrame" + ) + dml_data = dml.DoubleMLData(data, "y", "d") + return dml_data diff --git a/scripts/plm/plr_ate.py b/scripts/plm/plr_ate.py new file mode 100644 index 0000000..09e2531 --- /dev/null +++ b/scripts/plm/plr_ate.py @@ -0,0 +1,14 @@ + +from montecover.plm import PLRATECoverageSimulation + +# Create and run simulation with config file +sim = PLRATECoverageSimulation( + config_file="scripts/plm/plr_ate_config.yml", + log_level="INFO", + log_file="logs/plm/plr_ate_sim.log" +) +sim.run_simulation() +sim.save_results(output_path="results/plm/", file_prefix="plr_ate") + +# Save config file for reproducibility +sim.save_config("results/plm/plr_ate_config.yml") diff --git a/scripts/plm/plr_ate_config.yml b/scripts/plm/plr_ate_config.yml new file mode 100644 index 0000000..479240c --- /dev/null +++ b/scripts/plm/plr_ate_config.yml @@ -0,0 +1,29 @@ +# Simulation parameters for PLR ATE Coverage + +simulation_parameters: + repetitions: 10 + max_runtime: 19800 # 5.5 hours in seconds + random_seed: 42 + n_jobs: -2 + +dgp_parameters: + theta: [0.5] # Treatment effect + n_obs: [500] # Sample size + dim_x: [20] # Number of covariates + +dml_parameters: + # ML methods for ml_g and ml_m + learners: + - ml_g: ["Lasso"] + ml_m: ["Lasso"] + - ml_g: ["Random Forest"] + ml_m: ["Random Forest"] + - ml_g: ["Lasso"] + ml_m: ["Random Forest"] + - ml_g: ["Random Forest"] + ml_m: ["Lasso"] + + score: ["partialling out", "IV-type"] + +confidence_parameters: + level: [0.95, 0.90] # Confidence levels \ No newline at end of file From f35d661c8a04850bef15541ee64ca0e5942d4a52 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Fri, 21 Mar 2025 15:17:47 +0100 Subject: [PATCH 34/60] add plr sim --- monte-cover/src/montecover/plm/plr_ate.py | 2 +- results/plm/plr_ate_config.yml | 332 ++++++++++++++++++++++ results/plm/plr_ate_coverage.csv | 38 +-- results/plm/plr_ate_metadata.csv | 2 + scripts/plm/plr_ate_config.yml | 4 +- 5 files changed, 359 insertions(+), 19 deletions(-) create mode 100644 results/plm/plr_ate_config.yml create mode 100644 results/plm/plr_ate_metadata.csv diff --git a/monte-cover/src/montecover/plm/plr_ate.py b/monte-cover/src/montecover/plm/plr_ate.py index 803c583..e6119c6 100644 --- a/monte-cover/src/montecover/plm/plr_ate.py +++ b/monte-cover/src/montecover/plm/plr_ate.py @@ -51,7 +51,7 @@ def _convert_ml_string_to_object(self, ml_string): elif ml_string == "Random Forest": learner = RandomForestRegressor(n_estimators=100, max_features=20, max_depth=5, min_samples_leaf=2) elif ml_string == "LGBM": - learner = LGBMRegressor(n_estimators=100, learning_rate=0.05, verbose=-1) + learner = LGBMRegressor(n_estimators=100, learning_rate=0.05, verbose=-1, n_jobs=1) else: raise ValueError(f"Unknown learner type: {ml_string}") diff --git a/results/plm/plr_ate_config.yml b/results/plm/plr_ate_config.yml new file mode 100644 index 0000000..18c7f83 --- /dev/null +++ b/results/plm/plr_ate_config.yml @@ -0,0 +1,332 @@ +confidence_parameters: + level: + - 0.95 + - 0.9 +dgp_parameters: + dim_x: + - 20 + n_obs: + - 500 + theta: + - 0.5 +dml_parameters: + learners: + - ml_g: !!python/tuple + - Lasso + - !!python/object:sklearn.linear_model._coordinate_descent.LassoCV + _sklearn_version: 1.5.2 + alphas: null + copy_X: true + cv: null + eps: 0.001 + fit_intercept: true + max_iter: 1000 + n_alphas: 100 + n_jobs: null + positive: false + precompute: auto + random_state: null + selection: cyclic + tol: 0.0001 + verbose: false + ml_m: !!python/tuple + - Lasso + - !!python/object:sklearn.linear_model._coordinate_descent.LassoCV + _sklearn_version: 1.5.2 + alphas: null + copy_X: true + cv: null + eps: 0.001 + fit_intercept: true + max_iter: 1000 + n_alphas: 100 + n_jobs: null + positive: false + precompute: auto + random_state: null + selection: cyclic + tol: 0.0001 + verbose: false + - ml_g: !!python/tuple + - Random Forest + - !!python/object:sklearn.ensemble._forest.RandomForestRegressor + _sklearn_version: 1.5.2 + bootstrap: true + ccp_alpha: 0.0 + class_weight: null + criterion: squared_error + estimator: !!python/object:sklearn.tree._classes.DecisionTreeRegressor + _sklearn_version: 1.5.2 + ccp_alpha: 0.0 + class_weight: null + criterion: squared_error + max_depth: null + max_features: null + max_leaf_nodes: null + min_impurity_decrease: 0.0 + min_samples_leaf: 1 + min_samples_split: 2 + min_weight_fraction_leaf: 0.0 + monotonic_cst: null + random_state: null + splitter: best + estimator_params: &id001 !!python/tuple + - criterion + - max_depth + - min_samples_split + - min_samples_leaf + - min_weight_fraction_leaf + - max_features + - max_leaf_nodes + - min_impurity_decrease + - random_state + - ccp_alpha + - monotonic_cst + max_depth: 5 + max_features: 20 + max_leaf_nodes: null + max_samples: null + min_impurity_decrease: 0.0 + min_samples_leaf: 2 + min_samples_split: 2 + min_weight_fraction_leaf: 0.0 + monotonic_cst: null + n_estimators: 100 + n_jobs: null + oob_score: false + random_state: null + verbose: 0 + warm_start: false + ml_m: !!python/tuple + - Random Forest + - !!python/object:sklearn.ensemble._forest.RandomForestRegressor + _sklearn_version: 1.5.2 + bootstrap: true + ccp_alpha: 0.0 + class_weight: null + criterion: squared_error + estimator: !!python/object:sklearn.tree._classes.DecisionTreeRegressor + _sklearn_version: 1.5.2 + ccp_alpha: 0.0 + class_weight: null + criterion: squared_error + max_depth: null + max_features: null + max_leaf_nodes: null + min_impurity_decrease: 0.0 + min_samples_leaf: 1 + min_samples_split: 2 + min_weight_fraction_leaf: 0.0 + monotonic_cst: null + random_state: null + splitter: best + estimator_params: *id001 + max_depth: 5 + max_features: 20 + max_leaf_nodes: null + max_samples: null + min_impurity_decrease: 0.0 + min_samples_leaf: 2 + min_samples_split: 2 + min_weight_fraction_leaf: 0.0 + monotonic_cst: null + n_estimators: 100 + n_jobs: null + oob_score: false + random_state: null + verbose: 0 + warm_start: false + - ml_g: !!python/tuple + - Lasso + - !!python/object:sklearn.linear_model._coordinate_descent.LassoCV + _sklearn_version: 1.5.2 + alphas: null + copy_X: true + cv: null + eps: 0.001 + fit_intercept: true + max_iter: 1000 + n_alphas: 100 + n_jobs: null + positive: false + precompute: auto + random_state: null + selection: cyclic + tol: 0.0001 + verbose: false + ml_m: !!python/tuple + - Random Forest + - !!python/object:sklearn.ensemble._forest.RandomForestRegressor + _sklearn_version: 1.5.2 + bootstrap: true + ccp_alpha: 0.0 + class_weight: null + criterion: squared_error + estimator: !!python/object:sklearn.tree._classes.DecisionTreeRegressor + _sklearn_version: 1.5.2 + ccp_alpha: 0.0 + class_weight: null + criterion: squared_error + max_depth: null + max_features: null + max_leaf_nodes: null + min_impurity_decrease: 0.0 + min_samples_leaf: 1 + min_samples_split: 2 + min_weight_fraction_leaf: 0.0 + monotonic_cst: null + random_state: null + splitter: best + estimator_params: *id001 + max_depth: 5 + max_features: 20 + max_leaf_nodes: null + max_samples: null + min_impurity_decrease: 0.0 + min_samples_leaf: 2 + min_samples_split: 2 + min_weight_fraction_leaf: 0.0 + monotonic_cst: null + n_estimators: 100 + n_jobs: null + oob_score: false + random_state: null + verbose: 0 + warm_start: false + - ml_g: !!python/tuple + - Random Forest + - !!python/object:sklearn.ensemble._forest.RandomForestRegressor + _sklearn_version: 1.5.2 + bootstrap: true + ccp_alpha: 0.0 + class_weight: null + criterion: squared_error + estimator: !!python/object:sklearn.tree._classes.DecisionTreeRegressor + _sklearn_version: 1.5.2 + ccp_alpha: 0.0 + class_weight: null + criterion: squared_error + max_depth: null + max_features: null + max_leaf_nodes: null + min_impurity_decrease: 0.0 + min_samples_leaf: 1 + min_samples_split: 2 + min_weight_fraction_leaf: 0.0 + monotonic_cst: null + random_state: null + splitter: best + estimator_params: *id001 + max_depth: 5 + max_features: 20 + max_leaf_nodes: null + max_samples: null + min_impurity_decrease: 0.0 + min_samples_leaf: 2 + min_samples_split: 2 + min_weight_fraction_leaf: 0.0 + monotonic_cst: null + n_estimators: 100 + n_jobs: null + oob_score: false + random_state: null + verbose: 0 + warm_start: false + ml_m: !!python/tuple + - Lasso + - !!python/object:sklearn.linear_model._coordinate_descent.LassoCV + _sklearn_version: 1.5.2 + alphas: null + copy_X: true + cv: null + eps: 0.001 + fit_intercept: true + max_iter: 1000 + n_alphas: 100 + n_jobs: null + positive: false + precompute: auto + random_state: null + selection: cyclic + tol: 0.0001 + verbose: false + - ml_g: !!python/tuple + - LGBM + - !!python/object:lightgbm.sklearn.LGBMRegressor + _Booster: null + _best_iteration: -1 + _best_score: {} + _class_map: null + _class_weight: null + _classes: null + _evals_result: {} + _n_classes: -1 + _n_features: -1 + _n_features_in: -1 + _objective: null + _other_params: + verbose: -1 + boosting_type: gbdt + class_weight: null + colsample_bytree: 1.0 + importance_type: split + learning_rate: 0.05 + max_depth: -1 + min_child_samples: 20 + min_child_weight: 0.001 + min_split_gain: 0.0 + n_estimators: 100 + n_jobs: 1 + num_leaves: 31 + objective: null + random_state: null + reg_alpha: 0.0 + reg_lambda: 0.0 + subsample: 1.0 + subsample_for_bin: 200000 + subsample_freq: 0 + verbose: -1 + ml_m: !!python/tuple + - LGBM + - !!python/object:lightgbm.sklearn.LGBMRegressor + _Booster: null + _best_iteration: -1 + _best_score: {} + _class_map: null + _class_weight: null + _classes: null + _evals_result: {} + _n_classes: -1 + _n_features: -1 + _n_features_in: -1 + _objective: null + _other_params: + verbose: -1 + boosting_type: gbdt + class_weight: null + colsample_bytree: 1.0 + importance_type: split + learning_rate: 0.05 + max_depth: -1 + min_child_samples: 20 + min_child_weight: 0.001 + min_split_gain: 0.0 + n_estimators: 100 + n_jobs: 1 + num_leaves: 31 + objective: null + random_state: null + reg_alpha: 0.0 + reg_lambda: 0.0 + subsample: 1.0 + subsample_for_bin: 200000 + subsample_freq: 0 + verbose: -1 + score: + - partialling out + - IV-type +simulation_parameters: + max_runtime: 19800 + n_jobs: -2 + random_seed: 42 + repetitions: 1000 diff --git a/results/plm/plr_ate_coverage.csv b/results/plm/plr_ate_coverage.csv index e1067cc..e7f02fa 100644 --- a/results/plm/plr_ate_coverage.csv +++ b/results/plm/plr_ate_coverage.csv @@ -1,17 +1,21 @@ -Learner g,Learner m,score,level,Coverage,CI Length,Bias,repetition -Lasso,Lasso,IV-type,0.9,0.881,0.1393979255576113,0.0352891099128789,1000 -Lasso,Lasso,IV-type,0.95,0.945,0.16610287331091153,0.0352891099128789,1000 -Lasso,Lasso,partialling out,0.9,0.908,0.14646362984437974,0.034686755904342816,1000 -Lasso,Lasso,partialling out,0.95,0.956,0.17452217926042807,0.034686755904342816,1000 -Lasso,Random Forest,IV-type,0.9,0.895,0.14672332096879584,0.03621404411832195,1000 -Lasso,Random Forest,IV-type,0.95,0.953,0.17483162032109167,0.03621404411832195,1000 -Lasso,Random Forest,partialling out,0.9,0.816,0.14332193251141256,0.04209132271298422,1000 -Lasso,Random Forest,partialling out,0.95,0.888,0.17077861599008798,0.04209132271298422,1000 -Random Forest,Lasso,IV-type,0.9,0.883,0.14193144590758777,0.03591650651278451,1000 -Random Forest,Lasso,IV-type,0.95,0.951,0.16912174900823193,0.03591650651278451,1000 -Random Forest,Lasso,partialling out,0.9,0.901,0.1519648979095884,0.03615745065828101,1000 -Random Forest,Lasso,partialling out,0.95,0.952,0.181077344474182,0.03615745065828101,1000 -Random Forest,Random Forest,IV-type,0.9,0.893,0.14942288181113228,0.03672076481604481,1000 -Random Forest,Random Forest,IV-type,0.95,0.948,0.17804834546815554,0.03672076481604481,1000 -Random Forest,Random Forest,partialling out,0.9,0.878,0.14635785065361873,0.037417599679567926,1000 -Random Forest,Random Forest,partialling out,0.95,0.946,0.17439613558042621,0.037417599679567926,1000 +Learner g,Learner m,Score,level,Coverage,CI Length,Bias +LGBM,LGBM,IV-type,0.9,0.881,0.16045495852616187,0.041395241786732526 +LGBM,LGBM,IV-type,0.95,0.929,0.19119387567330545,0.041395241786732526 +LGBM,LGBM,partialling out,0.9,0.843,0.14699796562424566,0.042234936165735856 +LGBM,LGBM,partialling out,0.95,0.91,0.17515887961298732,0.042234936165735856 +Lasso,Lasso,IV-type,0.9,0.88,0.139906736409111,0.03566583231811613 +Lasso,Lasso,IV-type,0.95,0.935,0.16670915883537538,0.03566583231811613 +Lasso,Lasso,partialling out,0.9,0.895,0.14682161377285347,0.03567834426028154 +Lasso,Lasso,partialling out,0.95,0.94,0.1749487434211267,0.03567834426028154 +Lasso,Random Forest,IV-type,0.9,0.886,0.14706644661357227,0.03746782142897475 +Lasso,Random Forest,IV-type,0.95,0.94,0.17524047974475984,0.03746782142897475 +Lasso,Random Forest,partialling out,0.9,0.806,0.14380399961661133,0.04440852985313324 +Lasso,Random Forest,partialling out,0.95,0.869,0.1713530343753106,0.04440852985313324 +Random Forest,Lasso,IV-type,0.9,0.878,0.14220975326271637,0.03662484099631004 +Random Forest,Lasso,IV-type,0.95,0.933,0.16945337267598382,0.03662484099631004 +Random Forest,Lasso,partialling out,0.9,0.893,0.15213074253257877,0.03746402925271374 +Random Forest,Lasso,partialling out,0.95,0.948,0.18127496053117625,0.03746402925271374 +Random Forest,Random Forest,IV-type,0.9,0.886,0.14967937696801667,0.037873686545345016 +Random Forest,Random Forest,IV-type,0.95,0.94,0.17835397829861846,0.037873686545345016 +Random Forest,Random Forest,partialling out,0.9,0.878,0.14693420687636086,0.03830834442193379 +Random Forest,Random Forest,partialling out,0.95,0.934,0.17508290637895235,0.03830834442193379 diff --git a/results/plm/plr_ate_metadata.csv b/results/plm/plr_ate_metadata.csv new file mode 100644 index 0000000..991fc23 --- /dev/null +++ b/results/plm/plr_ate_metadata.csv @@ -0,0 +1,2 @@ +DoubleML Version,Script,Date,Total Runtime (minutes),Python Version,Config File +0.10.dev0,PLRATECoverageSimulation,2025-03-21 15:10,12.47926504611969,3.12.9,scripts/plm/plr_ate_config.yml diff --git a/scripts/plm/plr_ate_config.yml b/scripts/plm/plr_ate_config.yml index 479240c..93ee95c 100644 --- a/scripts/plm/plr_ate_config.yml +++ b/scripts/plm/plr_ate_config.yml @@ -1,7 +1,7 @@ # Simulation parameters for PLR ATE Coverage simulation_parameters: - repetitions: 10 + repetitions: 1000 max_runtime: 19800 # 5.5 hours in seconds random_seed: 42 n_jobs: -2 @@ -22,6 +22,8 @@ dml_parameters: ml_m: ["Random Forest"] - ml_g: ["Random Forest"] ml_m: ["Lasso"] + - ml_g: ["LGBM"] + ml_m: ["LGBM"] score: ["partialling out", "IV-type"] From bf3cf73f2f2942a5c0cf98f5d525df9e77451569 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Fri, 21 Mar 2025 15:50:55 +0100 Subject: [PATCH 35/60] add LGBM sim to did --- .../src/montecover/did/did_pa_multi.py | 4 +- results/did/did_multi_detailed.csv | 72 ++++++++++++------- results/did/did_multi_eventstudy.csv | 72 ++++++++++++------- results/did/did_multi_group.csv | 72 ++++++++++++------- results/did/did_multi_metadata.csv | 2 +- results/did/did_multi_time.csv | 72 ++++++++++++------- results/did/did_pa_multi_config.yml | 72 +++++++++++++++++++ scripts/did/did_pa_multi_config.yml | 2 + 8 files changed, 269 insertions(+), 99 deletions(-) diff --git a/monte-cover/src/montecover/did/did_pa_multi.py b/monte-cover/src/montecover/did/did_pa_multi.py index b10f6ce..4af123f 100644 --- a/monte-cover/src/montecover/did/did_pa_multi.py +++ b/monte-cover/src/montecover/did/did_pa_multi.py @@ -46,7 +46,7 @@ def _process_config_parameters(self): if learner["ml_g"][0] == "Linear": learner["ml_g"] = ("Linear", LinearRegression()) elif learner["ml_g"][0] == "LGBM": - learner["ml_g"] = ("LGBM", LGBMRegressor(n_estimators=5, verbose=-1)) + learner["ml_g"] = ("LGBM", LGBMRegressor(n_estimators=100, learning_rate=0.05, verbose=-1, n_jobs=1)) else: raise ValueError(f"Unknown learner type: {learner['ml_g']}") @@ -54,7 +54,7 @@ def _process_config_parameters(self): if learner["ml_m"][0] == "Linear": learner["ml_m"] = ("Linear", LogisticRegression()) elif learner["ml_m"][0] == "LGBM": - learner["ml_m"] = ("LGBM", LGBMClassifier(n_estimators=5, verbose=-1)) + learner["ml_m"] = ("LGBM", LGBMClassifier(n_estimators=100, learning_rate=0.05, verbose=-1, n_jobs=1)) else: raise ValueError(f"Unknown learner type: {learner['ml_m']}") diff --git a/results/did/did_multi_detailed.csv b/results/did/did_multi_detailed.csv index b985bdb..93e2423 100644 --- a/results/did/did_multi_detailed.csv +++ b/results/did/did_multi_detailed.csv @@ -1,25 +1,49 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -Linear,Linear,experimental,False,1,0.9,0.8770833333333333,0.5956631078920439,0.15393126826790132,0.846,0.9280642120939564,1000 -Linear,Linear,experimental,False,1,0.95,0.9353333333333333,0.70977637113606,0.15393126826790132,0.907,1.01868658603788,1000 -Linear,Linear,experimental,False,4,0.9,0.6671666666666666,1.9827195149925345,0.8550657449695865,0.505,2.8772921242320737,1000 -Linear,Linear,experimental,False,4,0.95,0.758,2.362556021493784,0.8550657449695865,0.628,3.2083215653145722,1000 -Linear,Linear,experimental,False,6,0.9,0.9025,2.00173937868972,0.49027975353015657,0.903,2.8952108652661397,1000 -Linear,Linear,experimental,False,6,0.95,0.9499166666666666,2.385219586948198,0.49027975353015657,0.939,3.230482678959989,1000 -Linear,Linear,experimental,True,1,0.9,0.8771666666666667,0.5956064011739037,0.15426338756081115,0.842,0.9278381417397478,1000 -Linear,Linear,experimental,True,1,0.95,0.9339166666666666,0.7097088009137527,0.15426338756081115,0.912,1.0187258089279716,1000 -Linear,Linear,experimental,True,4,0.9,0.6675,1.9828114892881032,0.8559251553294747,0.507,2.8761724678009353,1000 -Linear,Linear,experimental,True,4,0.95,0.7571666666666667,2.362665615626578,0.8559251553294747,0.618,3.204786768191425,1000 -Linear,Linear,experimental,True,6,0.9,0.9008333333333334,2.002017704071254,0.4900985674785569,0.904,2.897432562708396,1000 -Linear,Linear,experimental,True,6,0.95,0.9494166666666666,2.3855512320957373,0.4900985674785569,0.945,3.231599891589011,1000 -Linear,Linear,observational,False,1,0.9,0.9048333333333334,0.6855202939670088,0.16429464571110677,0.905,1.0652155650078814,1000 -Linear,Linear,observational,False,1,0.95,0.9518333333333334,0.8168478123715063,0.16429464571110677,0.951,1.1708094409885172,1000 -Linear,Linear,observational,False,4,0.9,0.7851666666666667,2.7948549075952385,0.8941603312052668,0.689,4.003170404405238,1000 -Linear,Linear,observational,False,4,0.95,0.8580833333333334,3.3302750294286816,0.8941603312052668,0.786,4.4764083966934205,1000 -Linear,Linear,observational,False,6,0.9,0.8918333333333334,2.540792582093424,0.6659145487088738,0.893,3.64735417288717,1000 -Linear,Linear,observational,False,6,0.95,0.9475,3.0275410963583322,0.6659145487088738,0.941,4.076810932574564,1000 -Linear,Linear,observational,True,1,0.9,0.8975,0.6634200132755311,0.16175894761877385,0.888,1.0319404210431198,1000 -Linear,Linear,observational,True,1,0.95,0.94725,0.790513703674064,0.16175894761877385,0.94,1.1332864016074393,1000 -Linear,Linear,observational,True,4,0.9,0.7758333333333334,2.7290002317619733,0.8973641897321528,0.674,3.912420538282281,1000 -Linear,Linear,observational,True,4,0.95,0.8505833333333334,3.2518043432035615,0.8973641897321528,0.792,4.369245108445732,1000 -Linear,Linear,observational,True,6,0.9,0.8846666666666666,2.4411244723625476,0.6398322462292214,0.892,3.513044851639997,1000 -Linear,Linear,observational,True,6,0.95,0.9423333333333334,2.9087792185359564,0.6398322462292214,0.945,3.923376128802193,1000 +LGBM,LGBM,experimental,False,1,0.9,0.5624166666666667,2.2105706879826315,1.0918363543984133,0.392,3.1595897256714163,1000 +LGBM,LGBM,experimental,False,1,0.95,0.6753333333333333,2.634057439965576,1.0918363543984133,0.527,3.5384433304110696,1000 +LGBM,LGBM,experimental,False,4,0.9,0.56225,1.9056063148380724,0.9987888659120285,0.32,2.8139576308162675,1000 +LGBM,LGBM,experimental,False,4,0.95,0.66375,2.270669976098066,0.9987888659120285,0.434,3.1260300175350486,1000 +LGBM,LGBM,experimental,False,6,0.9,0.901,1.9297833165451947,0.4650292370505929,0.894,2.843058037413404,1000 +LGBM,LGBM,experimental,False,6,0.95,0.9490833333333334,2.2994786505136418,0.4650292370505929,0.95,3.1607650795805657,1000 +LGBM,LGBM,experimental,True,1,0.9,0.56125,2.2109595169063447,1.0901779302400194,0.385,3.161199516791711,1000 +LGBM,LGBM,experimental,True,1,0.95,0.6731666666666666,2.6345207582050456,1.0901779302400194,0.52,3.5381076690106985,1000 +LGBM,LGBM,experimental,True,4,0.9,0.5615,1.9055179156566338,0.9982970546992314,0.319,2.8114626499091226,1000 +LGBM,LGBM,experimental,True,4,0.95,0.661,2.2705646419765104,0.9982970546992314,0.438,3.1240482644060696,1000 +LGBM,LGBM,experimental,True,6,0.9,0.90175,1.9300617281970756,0.465536861894574,0.907,2.8427052038630234,1000 +LGBM,LGBM,experimental,True,6,0.95,0.9504166666666666,2.2998103984586393,0.465536861894574,0.954,3.161162346569528,1000 +LGBM,LGBM,observational,False,1,0.9,0.96075,3.860122273027192,0.7973124864002962,0.983,5.809738980637339,1000 +LGBM,LGBM,observational,False,1,0.95,0.9861666666666666,4.599619386848575,0.7973124864002962,0.995,6.430398563283054,1000 +LGBM,LGBM,observational,False,4,0.9,0.961,4.512624613227589,0.9164722703680156,0.971,6.6898615578032725,1000 +LGBM,LGBM,observational,False,4,0.95,0.9855,5.377123880662486,0.9164722703680156,0.98,7.432765016015873,1000 +LGBM,LGBM,observational,False,6,0.9,0.958,3.50270068952298,0.7100629357142844,0.984,5.273421616280179,1000 +LGBM,LGBM,observational,False,6,0.95,0.986,4.17372530151049,0.7100629357142844,0.997,5.841221698395343,1000 +LGBM,LGBM,observational,True,1,0.9,0.9343333333333333,2.712868127930892,0.5826992260811286,0.945,4.106276591884389,1000 +LGBM,LGBM,observational,True,1,0.95,0.9720833333333334,3.232581755864662,0.5826992260811286,0.977,4.540965421627881,1000 +LGBM,LGBM,observational,True,4,0.9,0.92525,3.156071825360632,0.6849012493398391,0.922,4.7143904406177395,1000 +LGBM,LGBM,observational,True,4,0.95,0.9654166666666666,3.7606915344759266,0.6849012493398391,0.961,5.2265508394561335,1000 +LGBM,LGBM,observational,True,6,0.9,0.94475,2.579379320454953,0.5423990875809755,0.961,3.9010126368155924,1000 +LGBM,LGBM,observational,True,6,0.95,0.978,3.073520031036937,0.5423990875809755,0.976,4.315622661457858,1000 +Linear,Linear,experimental,False,1,0.9,0.87675,0.5962556758101943,0.15540620935309896,0.835,0.9294555811504173,1000 +Linear,Linear,experimental,False,1,0.95,0.9341666666666666,0.7104824593611389,0.15540620935309896,0.903,1.0203476694408922,1000 +Linear,Linear,experimental,False,4,0.9,0.6788333333333334,1.9823719036462466,0.8343842929598351,0.543,2.876526568337002,1000 +Linear,Linear,experimental,False,4,0.95,0.7713333333333334,2.36214181702709,0.8343842929598351,0.647,3.2062768555810672,1000 +Linear,Linear,experimental,False,6,0.9,0.8975833333333334,2.001582926468975,0.4883176375232907,0.889,2.8947205466241517,1000 +Linear,Linear,experimental,False,6,0.95,0.951,2.385033162628771,0.4883176375232907,0.936,3.229856365862383,1000 +Linear,Linear,experimental,True,1,0.9,0.8783333333333334,0.5961879895205551,0.15516071674467652,0.835,0.9289596340870964,1000 +Linear,Linear,experimental,True,1,0.95,0.9336666666666666,0.7104018061724501,0.15516071674467652,0.897,1.0199615861026785,1000 +Linear,Linear,experimental,True,4,0.9,0.679,1.982325730340813,0.8350623844266716,0.542,2.874691539814855,1000 +Linear,Linear,experimental,True,4,0.95,0.7708333333333334,2.3620867981401727,0.8350623844266716,0.648,3.2065829645941943,1000 +Linear,Linear,experimental,True,6,0.9,0.8986666666666666,2.0014329000292035,0.4878977948334089,0.898,2.8958152919701714,1000 +Linear,Linear,experimental,True,6,0.95,0.9515833333333333,2.384854395099635,0.4878977948334089,0.944,3.230868272500581,1000 +Linear,Linear,observational,False,1,0.9,0.90175,0.686534548613581,0.16649618454495813,0.902,1.066351549510838,1000 +Linear,Linear,observational,False,1,0.95,0.9520833333333334,0.8180563713252403,0.16649618454495813,0.946,1.171229891264187,1000 +Linear,Linear,observational,False,4,0.9,0.79475,2.8873024002222816,0.9025556348916655,0.704,4.118610356886369,1000 +Linear,Linear,observational,False,4,0.95,0.867,3.4404330112947377,0.9025556348916655,0.806,4.6067910217812065,1000 +Linear,Linear,observational,False,6,0.9,0.90025,2.598132417226769,0.6748383969329592,0.907,3.730754168279962,1000 +Linear,Linear,observational,False,6,0.95,0.9518333333333334,3.0958657240938163,0.6748383969329592,0.95,4.165912075371038,1000 +Linear,Linear,observational,True,1,0.9,0.8975,0.6663493436025194,0.16422406525625022,0.884,1.0360859078980413,1000 +Linear,Linear,observational,True,1,0.95,0.9454166666666667,0.7940042160489305,0.16422406525625022,0.934,1.1384905364687135,1000 +Linear,Linear,observational,True,4,0.9,0.7818333333333334,2.749847403764977,0.8818152982040376,0.703,3.9307697380515574,1000 +Linear,Linear,observational,True,4,0.95,0.8599166666666667,3.2766452808018376,0.8818152982040376,0.797,4.397407804688746,1000 +Linear,Linear,observational,True,6,0.9,0.8920833333333333,2.4622968110379206,0.6399157390802319,0.887,3.543748460254503,1000 +Linear,Linear,observational,True,6,0.95,0.9465833333333333,2.9340076161223876,0.6399157390802319,0.944,3.9562585292222243,1000 diff --git a/results/did/did_multi_eventstudy.csv b/results/did/did_multi_eventstudy.csv index 909cde3..def27b9 100644 --- a/results/did/did_multi_eventstudy.csv +++ b/results/did/did_multi_eventstudy.csv @@ -1,25 +1,49 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -Linear,Linear,experimental,False,1,0.9,0.8676666666666666,0.42543423226976995,0.11378217794214893,0.82,0.607026998501089,1000 -Linear,Linear,experimental,False,1,0.95,0.921,0.5069361549116113,0.11378217794214893,0.893,0.6744173882852083,1000 -Linear,Linear,experimental,False,4,0.9,0.6021666666666666,1.9754395142835157,0.9518163003680035,0.488,2.5538078783006415,1000 -Linear,Linear,experimental,False,4,0.95,0.7053333333333334,2.353881365607505,0.9518163003680035,0.602,2.9021513463156756,1000 -Linear,Linear,experimental,False,6,0.9,0.8995,2.001327059411559,0.49627387221768626,0.899,2.5768571826106514,1000 -Linear,Linear,experimental,False,6,0.95,0.949,2.3847282782249866,0.49627387221768626,0.942,2.9364211171912067,1000 -Linear,Linear,experimental,True,1,0.9,0.8666666666666666,0.42531823168334737,0.1141016026224358,0.814,0.6067463378989032,1000 -Linear,Linear,experimental,True,1,0.95,0.9231666666666666,0.5067979316874602,0.1141016026224358,0.889,0.6733443239100646,1000 -Linear,Linear,experimental,True,4,0.9,0.5973333333333334,1.975365775525183,0.9534736795550611,0.491,2.5532803279562994,1000 -Linear,Linear,experimental,True,4,0.95,0.7055,2.353793500457543,0.9534736795550611,0.61,2.905573717129059,1000 -Linear,Linear,experimental,True,6,0.9,0.8978333333333334,2.0019957931284336,0.4959848232257912,0.9,2.579876093556324,1000 -Linear,Linear,experimental,True,6,0.95,0.9478333333333334,2.385525123597028,0.4959848232257912,0.944,2.9374235003380655,1000 -Linear,Linear,observational,False,1,0.9,0.9013333333333333,0.4873576971767433,0.11751015177996685,0.898,0.693580479033222,1000 -Linear,Linear,observational,False,1,0.95,0.9505,0.5807225143948788,0.11751015177996685,0.944,0.7712324745986096,1000 -Linear,Linear,observational,False,4,0.9,0.762,2.9253154914773845,0.972649026341708,0.692,3.7241194943689173,1000 -Linear,Linear,observational,False,4,0.95,0.8396666666666667,3.485728403286012,0.972649026341708,0.787,4.249241903518029,1000 -Linear,Linear,observational,False,6,0.9,0.8926666666666666,2.596496390444534,0.6912487923777589,0.89,3.308229651637506,1000 -Linear,Linear,observational,False,6,0.95,0.9455,3.0939162779434826,0.6912487923777589,0.948,3.7769009967220812,1000 -Linear,Linear,observational,True,1,0.9,0.8956666666666666,0.4727299379079462,0.11588912406999206,0.894,0.6735775257798401,1000 -Linear,Linear,observational,True,1,0.95,0.944,0.5632924641632966,0.11588912406999206,0.938,0.7483724833065163,1000 -Linear,Linear,observational,True,4,0.9,0.7468333333333333,2.8437612590899457,0.9776121628787491,0.682,3.627947639783714,1000 -Linear,Linear,observational,True,4,0.95,0.8328333333333334,3.3885505415923616,0.9776121628787491,0.775,4.133831167481912,1000 -Linear,Linear,observational,True,6,0.9,0.8851666666666667,2.4823044000101313,0.660809427159733,0.894,3.171860461977204,1000 -Linear,Linear,observational,True,6,0.95,0.9428333333333334,2.957848128834568,0.660809427159733,0.945,3.6158624454294848,1000 +LGBM,LGBM,experimental,False,1,0.9,0.4951666666666667,2.275423531923473,1.2302456065114191,0.367,2.8807231516132323,1000 +LGBM,LGBM,experimental,False,1,0.95,0.6253333333333334,2.7113343698615364,1.2302456065114191,0.526,3.291481716007052,1000 +LGBM,LGBM,experimental,False,4,0.9,0.456,1.874511001501681,1.1395829773341764,0.304,2.454541496532426,1000 +LGBM,LGBM,experimental,False,4,0.95,0.5651666666666666,2.233617624916964,1.1395829773341764,0.407,2.784075600028818,1000 +LGBM,LGBM,experimental,False,6,0.9,0.9051666666666667,1.909657018609852,0.45984422533184155,0.901,2.495151935672044,1000 +LGBM,LGBM,experimental,False,6,0.95,0.9518333333333334,2.275496687347409,0.45984422533184155,0.95,2.8347661247899203,1000 +LGBM,LGBM,experimental,True,1,0.9,0.4948333333333333,2.275759071320891,1.2279514371560163,0.38,2.8797471403263155,1000 +LGBM,LGBM,experimental,True,1,0.95,0.626,2.7117341897139284,1.2279514371560163,0.522,3.293330381148005,1000 +LGBM,LGBM,experimental,True,4,0.9,0.4638333333333333,1.8750188838720092,1.1386960562844861,0.302,2.458427538331787,1000 +LGBM,LGBM,experimental,True,4,0.95,0.5648333333333334,2.234222804087874,1.1386960562844861,0.4,2.7876063538017264,1000 +LGBM,LGBM,experimental,True,6,0.9,0.9033333333333333,1.910292845584061,0.4573844462233632,0.9,2.4959467472535595,1000 +LGBM,LGBM,experimental,True,6,0.95,0.954,2.2762543219170928,0.4573844462233632,0.951,2.834581461820259,1000 +LGBM,LGBM,observational,False,1,0.9,0.9766666666666667,3.9178076695635724,0.7643587524691926,0.984,5.21930543883624,1000 +LGBM,LGBM,observational,False,1,0.95,0.9923333333333334,4.668355776392708,0.7643587524691926,0.996,5.901402772354599,1000 +LGBM,LGBM,observational,False,4,0.9,0.9723333333333334,4.732959166761465,0.9190823155460479,0.979,6.212528913036143,1000 +LGBM,LGBM,observational,False,4,0.95,0.991,5.639668694620482,0.9190823155460479,0.994,7.04970480658214,1000 +LGBM,LGBM,observational,False,6,0.9,0.9705,3.5046722375946655,0.6712109740769173,0.975,4.667213539903498,1000 +LGBM,LGBM,observational,False,6,0.95,0.9903333333333334,4.176074545936241,0.6712109740769173,0.996,5.276491009303748,1000 +LGBM,LGBM,observational,True,1,0.9,0.9435,2.7040876686216273,0.5547334946398212,0.944,3.6298349851696496,1000 +LGBM,LGBM,observational,True,1,0.95,0.9756666666666667,3.2221191932804323,0.5547334946398212,0.973,4.095693068656322,1000 +LGBM,LGBM,observational,True,4,0.9,0.9276666666666666,3.2405159630564717,0.6810261925092936,0.92,4.2909423330841,1000 +LGBM,LGBM,observational,True,4,0.95,0.9645,3.8613129307372676,0.6810261925092936,0.962,4.859886050425436,1000 +LGBM,LGBM,observational,True,6,0.9,0.9513333333333334,2.5399279916626596,0.512480955420689,0.962,3.407249984661029,1000 +LGBM,LGBM,observational,True,6,0.95,0.9815,3.0265108733172608,0.512480955420689,0.986,3.8517677073455303,1000 +Linear,Linear,experimental,False,1,0.9,0.8616666666666666,0.4256476640080489,0.11580496789395077,0.824,0.6070719450959261,1000 +Linear,Linear,experimental,False,1,0.95,0.9198333333333334,0.5071904745138727,0.11580496789395077,0.893,0.674778601643221,1000 +Linear,Linear,experimental,False,4,0.9,0.6161666666666666,1.9748011790533448,0.9254625000800732,0.505,2.5521902749192185,1000 +Linear,Linear,experimental,False,4,0.95,0.715,2.3531207422664986,0.9254625000800732,0.642,2.9022762051937074,1000 +Linear,Linear,experimental,False,6,0.9,0.8965,1.9996364779477631,0.4901680517340787,0.888,2.5791432846567086,1000 +Linear,Linear,experimental,False,6,0.95,0.9501666666666666,2.3827138261620924,0.4901680517340787,0.944,2.932874280172364,1000 +Linear,Linear,experimental,True,1,0.9,0.8633333333333334,0.42557881302767747,0.11564143022698879,0.83,0.6068201449690751,1000 +Linear,Linear,experimental,True,1,0.95,0.9225,0.5071084335105779,0.11564143022698879,0.895,0.6750690838543019,1000 +Linear,Linear,experimental,True,4,0.9,0.617,1.9746566585307588,0.9255903141589501,0.513,2.555107555763497,1000 +Linear,Linear,experimental,True,4,0.95,0.7171666666666666,2.3529485354423443,0.9255903141589501,0.648,2.902660854375723,1000 +Linear,Linear,experimental,True,6,0.9,0.8983333333333333,1.9992432685977637,0.48878874491179886,0.895,2.577170881521723,1000 +Linear,Linear,experimental,True,6,0.95,0.9505,2.3822452883227645,0.48878874491179886,0.948,2.932620166526624,1000 +Linear,Linear,observational,False,1,0.9,0.8953333333333334,0.49138831479410017,0.12098465482566172,0.897,0.6991359808997865,1000 +Linear,Linear,observational,False,1,0.95,0.9493333333333334,0.5855252915150007,0.12098465482566172,0.941,0.7770777897530963,1000 +Linear,Linear,observational,False,4,0.9,0.7711666666666667,3.030494999744617,0.984849905387765,0.704,3.8483976755019476,1000 +Linear,Linear,observational,False,4,0.95,0.8471666666666666,3.6110575175230513,0.984849905387765,0.812,4.384520004536955,1000 +Linear,Linear,observational,False,6,0.9,0.9021666666666667,2.646784162311001,0.6914860748123539,0.903,3.3804870593730962,1000 +Linear,Linear,observational,False,6,0.95,0.9486666666666667,3.1538378540071927,0.6914860748123539,0.951,3.852416139718707,1000 +Linear,Linear,observational,True,1,0.9,0.892,0.47696377672730894,0.11948182994920056,0.876,0.67978568573763,1000 +Linear,Linear,observational,True,1,0.95,0.9448333333333334,0.5683373942812903,0.11948182994920056,0.933,0.7551430771817692,1000 +Linear,Linear,observational,True,4,0.9,0.7558333333333334,2.8599187733703526,0.9620410710967653,0.694,3.6412576449934924,1000 +Linear,Linear,observational,True,4,0.95,0.8355,3.4078034073491654,0.9620410710967653,0.784,4.149225460361053,1000 +Linear,Linear,observational,True,6,0.9,0.8931666666666667,2.5039181306359932,0.6566361613103366,0.896,3.2031793271389217,1000 +Linear,Linear,observational,True,6,0.95,0.9488333333333334,2.9836024773699767,0.6566361613103366,0.947,3.648166638226422,1000 diff --git a/results/did/did_multi_group.csv b/results/did/did_multi_group.csv index ab64a5f..8e6fd2d 100644 --- a/results/did/did_multi_group.csv +++ b/results/did/did_multi_group.csv @@ -1,25 +1,49 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -Linear,Linear,experimental,False,1,0.9,0.865,0.5332689974285741,0.14125883992697605,0.84,0.684967458838645,1000 -Linear,Linear,experimental,False,1,0.95,0.923,0.6354292028822721,0.14125883992697605,0.898,0.7737658489393863,1000 -Linear,Linear,experimental,False,4,0.9,0.6613333333333332,2.187885379540459,0.9604906586192218,0.498,2.7575340571302047,1000 -Linear,Linear,experimental,False,4,0.95,0.7556666666666666,2.607026227706741,0.9604906586192218,0.602,3.1362004034484614,1000 -Linear,Linear,experimental,False,6,0.9,0.8976666666666666,2.2072703099683895,0.5422311709957129,0.907,2.7789385342819997,1000 -Linear,Linear,experimental,False,6,0.95,0.9506666666666667,2.6301247970013075,0.5422311709957129,0.941,3.1616330454003854,1000 -Linear,Linear,experimental,True,1,0.9,0.8643333333333334,0.5331656474907569,0.1416028173409448,0.837,0.6848091387598605,1000 -Linear,Linear,experimental,True,1,0.95,0.9223333333333333,0.6353060538356899,0.1416028173409448,0.904,0.7729755854524409,1000 -Linear,Linear,experimental,True,4,0.9,0.6636666666666666,2.1871578881758738,0.9618357917015027,0.495,2.757365097655949,1000 -Linear,Linear,experimental,True,4,0.95,0.7556666666666666,2.606159368279076,0.9618357917015027,0.604,3.1339986032881795,1000 -Linear,Linear,experimental,True,6,0.9,0.8983333333333333,2.2070772542069657,0.5424515866558068,0.899,2.779655081198074,1000 -Linear,Linear,experimental,True,6,0.95,0.9513333333333334,2.629894756872995,0.5424515866558068,0.942,3.16003069657915,1000 -Linear,Linear,observational,False,1,0.9,0.902,0.6106049709052258,0.14629034271149396,0.89,0.7831902414227334,1000 -Linear,Linear,observational,False,1,0.95,0.947,0.727580699064038,0.14629034271149396,0.942,0.8844844476393456,1000 -Linear,Linear,observational,False,4,0.9,0.7813333333333333,3.0907797972605278,0.9943909423280353,0.706,3.8523704910840313,1000 -Linear,Linear,observational,False,4,0.95,0.8523333333333334,3.682891284376495,0.9943909423280353,0.809,4.39501177360628,1000 -Linear,Linear,observational,False,6,0.9,0.89,2.7865039885472247,0.7301188763670151,0.894,3.468312373428792,1000 -Linear,Linear,observational,False,6,0.95,0.95,3.3203242956346655,0.7301188763670151,0.945,3.9541003782057595,1000 -Linear,Linear,observational,True,1,0.9,0.8946666666666666,0.5896388541244254,0.14371827951522767,0.878,0.7568642372370822,1000 -Linear,Linear,observational,True,1,0.95,0.9423333333333334,0.7025980300212064,0.14371827951522767,0.936,0.8549636526386375,1000 -Linear,Linear,observational,True,4,0.9,0.777,3.0325048545897997,1.0070643044350587,0.698,3.7834488519755434,1000 -Linear,Linear,observational,True,4,0.95,0.8456666666666667,3.6134524072847696,1.0070643044350587,0.784,4.309691278217546,1000 -Linear,Linear,observational,True,6,0.9,0.8863333333333334,2.674147344485724,0.6969076659422232,0.89,3.3341905763684103,1000 -Linear,Linear,observational,True,6,0.95,0.9453333333333334,3.1864430966172987,0.6969076659422232,0.943,3.804017709516315,1000 +LGBM,LGBM,experimental,False,1,0.9,0.544,2.425320638886084,1.2319087948330136,0.373,2.996270924971626,1000 +LGBM,LGBM,experimental,False,1,0.95,0.6573333333333333,2.8899477894507153,1.2319087948330136,0.51,3.426821414153212,1000 +LGBM,LGBM,experimental,False,4,0.9,0.5433333333333332,2.081033950171366,1.1284091315935543,0.326,2.63040246774168,1000 +LGBM,LGBM,experimental,False,4,0.95,0.645,2.4797048965994914,1.1284091315935543,0.433,2.9840997920845034,1000 +LGBM,LGBM,experimental,False,6,0.9,0.9013333333333333,2.1074708371942887,0.5074798549008092,0.889,2.661409971109796,1000 +LGBM,LGBM,experimental,False,6,0.95,0.949,2.511206390458441,0.5074798549008092,0.951,3.024791162993095,1000 +LGBM,LGBM,experimental,True,1,0.9,0.544,2.4258784897314545,1.2301893619998863,0.381,2.9938872731992046,1000 +LGBM,LGBM,experimental,True,1,0.95,0.654,2.890612509732056,1.2301893619998863,0.512,3.4246029625955265,1000 +LGBM,LGBM,experimental,True,4,0.9,0.5453333333333332,2.080804861227795,1.1267095291503957,0.322,2.63126524321154,1000 +LGBM,LGBM,experimental,True,4,0.95,0.637,2.479431920286403,1.1267095291503957,0.432,2.9864977663945322,1000 +LGBM,LGBM,experimental,True,6,0.9,0.8983333333333333,2.1075770544801875,0.5090578420666497,0.898,2.6592454867701534,1000 +LGBM,LGBM,experimental,True,6,0.95,0.9506666666666667,2.5113329561609974,0.5090578420666497,0.951,3.021879998386774,1000 +LGBM,LGBM,observational,False,1,0.9,0.9733333333333334,4.03021343300979,0.7766577483742204,0.981,5.037046138005267,1000 +LGBM,LGBM,observational,False,1,0.95,0.9906666666666666,4.802295504766979,0.7766577483742204,0.996,5.738923894610133,1000 +LGBM,LGBM,observational,False,4,0.9,0.97,4.8021396925676045,0.9082207211428641,0.975,5.966191417077038,1000 +LGBM,LGBM,observational,False,4,0.95,0.99,5.7221023755206355,0.9082207211428641,0.993,6.811583661183153,1000 +LGBM,LGBM,observational,False,6,0.9,0.9703333333333334,3.6797914931041698,0.6937275477633349,0.988,4.610582711796715,1000 +LGBM,LGBM,observational,False,6,0.95,0.9913333333333334,4.384742009213337,0.6937275477633349,0.997,5.248758742823758,1000 +LGBM,LGBM,observational,True,1,0.9,0.9506666666666667,2.8486162589101403,0.5735809923435359,0.952,3.592593517873356,1000 +LGBM,LGBM,observational,True,1,0.95,0.9793333333333334,3.394335630694889,0.5735809923435359,0.983,4.079342062842905,1000 +LGBM,LGBM,observational,True,4,0.9,0.9343333333333333,3.368298861981589,0.6884203303254872,0.939,4.227183687419757,1000 +LGBM,LGBM,observational,True,4,0.95,0.9703333333333334,4.013575646172639,0.6884203303254872,0.978,4.806891684310405,1000 +LGBM,LGBM,observational,True,6,0.9,0.9533333333333334,2.7279084619534326,0.5447869829275808,0.969,3.4465706624788495,1000 +LGBM,LGBM,observational,True,6,0.95,0.9826666666666666,3.250503419237389,0.5447869829275808,0.987,3.91458414149786,1000 +Linear,Linear,experimental,False,1,0.9,0.8656666666666666,0.53365284736229,0.14113839390189276,0.841,0.6858601630178984,1000 +Linear,Linear,experimental,False,1,0.95,0.924,0.635886588289231,0.14113839390189276,0.904,0.7736797278406461,1000 +Linear,Linear,experimental,False,4,0.9,0.6696666666666666,2.1893979266171124,0.9361640632307114,0.539,2.762491543769461,1000 +Linear,Linear,experimental,False,4,0.95,0.7683333333333334,2.6088285387127694,0.9361640632307114,0.656,3.13570938340289,1000 +Linear,Linear,experimental,False,6,0.9,0.8963333333333334,2.2066699836465244,0.5391769945435134,0.905,2.776901533986721,1000 +Linear,Linear,experimental,False,6,0.95,0.952,2.629409464068001,0.5391769945435134,0.951,3.1580920998536812,1000 +Linear,Linear,experimental,True,1,0.9,0.8653333333333334,0.5335876458732524,0.14098973324489064,0.842,0.6859583678871254,1000 +Linear,Linear,experimental,True,1,0.95,0.9256666666666666,0.6358088959230787,0.14098973324489064,0.903,0.7735239022392485,1000 +Linear,Linear,experimental,True,4,0.9,0.6683333333333333,2.189887470203439,0.9376906555300101,0.533,2.762438365471929,1000 +Linear,Linear,experimental,True,4,0.95,0.7673333333333334,2.609411865874738,0.9376906555300101,0.65,3.137626305537253,1000 +Linear,Linear,experimental,True,6,0.9,0.8996666666666666,2.206190512676471,0.539245881315392,0.908,2.7775275532096906,1000 +Linear,Linear,experimental,True,6,0.95,0.951,2.628838139168606,0.539245881315392,0.947,3.1603971924586123,1000 +Linear,Linear,observational,False,1,0.9,0.903,0.6100966786339458,0.14595261649230307,0.901,0.7827440423437438,1000 +Linear,Linear,observational,False,1,0.95,0.952,0.7269750314660184,0.14595261649230307,0.944,0.8836444753244614,1000 +Linear,Linear,observational,False,4,0.9,0.7883333333333333,3.2174659336975893,1.007817766808723,0.739,3.9970752953576123,1000 +Linear,Linear,observational,False,4,0.95,0.8686666666666666,3.8338471267011167,1.007817766808723,0.828,4.566674016780959,1000 +Linear,Linear,observational,False,6,0.9,0.8983333333333333,2.831695772379743,0.7289665197204216,0.899,3.52423219231215,1000 +Linear,Linear,observational,False,6,0.95,0.9533333333333334,3.3741736274278034,0.7289665197204216,0.953,4.017472422924514,1000 +Linear,Linear,observational,True,1,0.9,0.8943333333333334,0.5907411589406687,0.14453692468281937,0.883,0.758257638344459,1000 +Linear,Linear,observational,True,1,0.95,0.946,0.7039115072233244,0.14453692468281937,0.946,0.8568435231487644,1000 +Linear,Linear,observational,True,4,0.9,0.7816666666666666,3.0525973420953805,0.9863117736959517,0.732,3.805846942979805,1000 +Linear,Linear,observational,True,4,0.95,0.865,3.6373940828390534,0.9863117736959517,0.815,4.339527793994656,1000 +Linear,Linear,observational,True,6,0.9,0.89,2.7202274205001,0.7062614871662574,0.892,3.3901526544863465,1000 +Linear,Linear,observational,True,6,0.95,0.9456666666666667,3.2413508938298894,0.7062614871662574,0.942,3.863150014029504,1000 diff --git a/results/did/did_multi_metadata.csv b/results/did/did_multi_metadata.csv index 4124b94..ffc86cf 100644 --- a/results/did/did_multi_metadata.csv +++ b/results/did/did_multi_metadata.csv @@ -1,2 +1,2 @@ DoubleML Version,Script,Date,Total Runtime (minutes),Python Version,Config File -0.10.dev0,DIDMultiCoverageSimulation,2025-03-21 13:46,3.4916115164756776,3.12.9,scripts/did/did_pa_multi_config.yml +0.10.dev0,DIDMultiCoverageSimulation,2025-03-21 15:44,15.20009624560674,3.12.9,scripts/did/did_pa_multi_config.yml diff --git a/results/did/did_multi_time.csv b/results/did/did_multi_time.csv index 06c3c22..da12006 100644 --- a/results/did/did_multi_time.csv +++ b/results/did/did_multi_time.csv @@ -1,25 +1,49 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -Linear,Linear,experimental,False,1,0.9,0.8453333333333334,0.49324862390769003,0.1376326316621036,0.822,0.6316419735152038,1000 -Linear,Linear,experimental,False,1,0.95,0.912,0.5877419865467073,0.1376326316621036,0.891,0.7143067511536322,1000 -Linear,Linear,experimental,False,4,0.9,0.4776666666666667,1.9593068261105524,1.0466452508829949,0.45,2.2507550996198735,1000 -Linear,Linear,experimental,False,4,0.95,0.579,2.3346580819823073,1.0466452508829949,0.556,2.6163918210317183,1000 -Linear,Linear,experimental,False,6,0.9,0.8956666666666666,1.9573896704373563,0.48930237462467674,0.896,2.2565806380862594,1000 -Linear,Linear,experimental,False,6,0.95,0.9463333333333334,2.3323736500969083,0.48930237462467674,0.941,2.62032018987877,1000 -Linear,Linear,experimental,True,1,0.9,0.8463333333333334,0.4931694609078208,0.1378285637524634,0.824,0.6319264464558539,1000 -Linear,Linear,experimental,True,1,0.95,0.9093333333333333,0.587647658014302,0.1378285637524634,0.895,0.7142050985707156,1000 -Linear,Linear,experimental,True,4,0.9,0.473,1.9591517453060092,1.0480526529722811,0.45,2.250777097405993,1000 -Linear,Linear,experimental,True,4,0.95,0.5806666666666667,2.334473291806076,1.0480526529722811,0.55,2.6128556265062666,1000 -Linear,Linear,experimental,True,6,0.9,0.8966666666666666,1.9576188610509668,0.49183824648546365,0.893,2.253956782621074,1000 -Linear,Linear,experimental,True,6,0.95,0.945,2.3326467475573214,0.49183824648546365,0.943,2.6202784765893865,1000 -Linear,Linear,observational,False,1,0.9,0.8953333333333334,0.5968613600047712,0.14788675870016774,0.878,0.7631035273143418,1000 -Linear,Linear,observational,False,1,0.95,0.94,0.7112041765935568,0.14788675870016774,0.945,0.8624624885034761,1000 -Linear,Linear,observational,False,4,0.9,0.6876666666666666,3.0580400071087412,1.0638406360538493,0.653,3.462223480766848,1000 -Linear,Linear,observational,False,4,0.95,0.7736666666666666,3.643879418209516,1.0638406360538493,0.75,4.0319351473266085,1000 -Linear,Linear,observational,False,6,0.9,0.8823333333333334,2.548375931783461,0.6811130775533906,0.871,2.9334540834011715,1000 -Linear,Linear,observational,False,6,0.95,0.9406666666666667,3.036577214850038,0.6811130775533906,0.945,3.4079635812732043,1000 -Linear,Linear,observational,True,1,0.9,0.8806666666666666,0.5725784741025863,0.14380420604106553,0.867,0.7329506080582452,1000 -Linear,Linear,observational,True,1,0.95,0.9413333333333334,0.682269333377637,0.14380420604106553,0.926,0.8286474263809458,1000 -Linear,Linear,observational,True,4,0.9,0.666,2.97181956637082,1.075066363572111,0.635,3.3631545325412926,1000 -Linear,Linear,observational,True,4,0.95,0.7603333333333334,3.5411414263246734,1.075066363572111,0.748,3.9204031440435947,1000 -Linear,Linear,observational,True,6,0.9,0.8823333333333334,2.4376548170067376,0.6493921794587046,0.877,2.808933035095803,1000 -Linear,Linear,observational,True,6,0.95,0.939,2.904644869178221,0.6493921794587046,0.937,3.2552833144907303,1000 +LGBM,LGBM,experimental,False,1,0.9,0.3656666666666667,2.2569933486790243,1.3346952479951693,0.335,2.587283679771306,1000 +LGBM,LGBM,experimental,False,1,0.95,0.5013333333333333,2.689373452004948,1.3346952479951693,0.459,3.0091292065928448,1000 +LGBM,LGBM,experimental,False,4,0.9,0.2906666666666667,1.8450847724208734,1.2779372023374136,0.267,2.1555721241445758,1000 +LGBM,LGBM,experimental,False,4,0.95,0.3963333333333333,2.1985541102952406,1.2779372023374136,0.347,2.4962463971758933,1000 +LGBM,LGBM,experimental,False,6,0.9,0.9003333333333333,1.8659463660137525,0.44755290753308163,0.905,2.18116239110108,1000 +LGBM,LGBM,experimental,False,6,0.95,0.9526666666666667,2.223412232277764,0.44755290753308163,0.949,2.525753365702839,1000 +LGBM,LGBM,experimental,True,1,0.9,0.364,2.2580265033201017,1.334905066108623,0.328,2.586910615526032,1000 +LGBM,LGBM,experimental,True,1,0.95,0.5003333333333333,2.6906045316911844,1.334905066108623,0.455,3.0121528226289516,1000 +LGBM,LGBM,experimental,True,4,0.9,0.294,1.844480535791368,1.2777797661334978,0.253,2.153428316199533,1000 +LGBM,LGBM,experimental,True,4,0.95,0.3903333333333333,2.197834117942994,1.2777797661334978,0.358,2.4936372635204433,1000 +LGBM,LGBM,experimental,True,6,0.9,0.9013333333333333,1.8663144241390512,0.45412326322109603,0.906,2.1805319869022752,1000 +LGBM,LGBM,experimental,True,6,0.95,0.9486666666666667,2.2238508005843793,0.45412326322109603,0.949,2.526280271128774,1000 +LGBM,LGBM,observational,False,1,0.9,0.974,4.015642893221702,0.7766827009394942,0.983,4.816483346098624,1000 +LGBM,LGBM,observational,False,1,0.95,0.993,4.784933635751991,0.7766827009394942,0.997,5.548619730624135,1000 +LGBM,LGBM,observational,False,4,0.9,0.9716666666666667,5.00747786228995,0.9544600040325625,0.977,5.906730263635111,1000 +LGBM,LGBM,observational,False,4,0.95,0.9903333333333334,5.966777896012433,0.9544600040325625,0.989,6.8315972789636215,1000 +LGBM,LGBM,observational,False,6,0.9,0.97,3.433488618358242,0.6551128314455618,0.977,4.135385722477192,1000 +LGBM,LGBM,observational,False,6,0.95,0.9913333333333334,4.091254031997149,0.6551128314455618,0.995,4.752533757091599,1000 +LGBM,LGBM,observational,True,1,0.9,0.9443333333333334,2.7004862065139217,0.5516037755717172,0.949,3.242664571356836,1000 +LGBM,LGBM,observational,True,1,0.95,0.9786666666666666,3.217827786490716,0.5516037755717172,0.98,3.733865944469767,1000 +LGBM,LGBM,observational,True,4,0.9,0.9203333333333333,3.371353319490959,0.6969306645265912,0.905,3.989978424283686,1000 +LGBM,LGBM,observational,True,4,0.95,0.9566666666666667,4.017215256781499,0.6969306645265912,0.947,4.600999609348784,1000 +LGBM,LGBM,observational,True,6,0.9,0.9553333333333334,2.470317849174788,0.5011599149291719,0.956,2.9718674567635484,1000 +LGBM,LGBM,observational,True,6,0.95,0.9823333333333334,2.9435652725662735,0.5011599149291719,0.983,3.4173840462150893,1000 +Linear,Linear,experimental,False,1,0.9,0.8493333333333334,0.4935289794342831,0.1370987141180071,0.828,0.6325256653607308,1000 +Linear,Linear,experimental,False,1,0.95,0.9146666666666666,0.5880760507612888,0.1370987141180071,0.89,0.7144061775480237,1000 +Linear,Linear,experimental,False,4,0.9,0.5073333333333333,1.9618911321974573,1.012377950869642,0.485,2.2523669014616714,1000 +Linear,Linear,experimental,False,4,0.95,0.6206666666666666,2.33773747261766,1.012377950869642,0.592,2.6173574991154327,1000 +Linear,Linear,experimental,False,6,0.9,0.8886666666666666,1.9559181106622394,0.48244705653555303,0.89,2.254488348027745,1000 +Linear,Linear,experimental,False,6,0.95,0.948,2.33062017847301,0.48244705653555303,0.952,2.6170327863809786,1000 +Linear,Linear,experimental,True,1,0.9,0.852,0.493460294448869,0.13685608241876163,0.827,0.6320487920692786,1000 +Linear,Linear,experimental,True,1,0.95,0.915,0.5879942075531853,0.13685608241876163,0.894,0.7142086115473791,1000 +Linear,Linear,experimental,True,4,0.9,0.5073333333333333,1.9617118526474717,1.0141621639498686,0.479,2.250962858505643,1000 +Linear,Linear,experimental,True,4,0.95,0.6203333333333334,2.337523847857755,1.0141621639498686,0.594,2.618856401518769,1000 +Linear,Linear,experimental,True,6,0.9,0.8953333333333334,1.9559523702787176,0.48080345349863246,0.893,2.2527473173908787,1000 +Linear,Linear,experimental,True,6,0.95,0.9473333333333334,2.3306610013239437,0.48080345349863246,0.955,2.618192170363342,1000 +Linear,Linear,observational,False,1,0.9,0.8983333333333333,0.5964425724191427,0.14623943628258027,0.887,0.7624888261759377,1000 +Linear,Linear,observational,False,1,0.95,0.9503333333333334,0.7107051604066116,0.14623943628258027,0.939,0.8622181838697768,1000 +Linear,Linear,observational,False,4,0.9,0.6906666666666667,3.197042848562427,1.0884035855850052,0.652,3.6067317562485295,1000 +Linear,Linear,observational,False,4,0.95,0.788,3.8095115197740124,1.0884035855850052,0.767,4.20942088992997,1000 +Linear,Linear,observational,False,6,0.9,0.8963333333333334,2.638912550074715,0.689163224539215,0.895,3.0353798469910536,1000 +Linear,Linear,observational,False,6,0.95,0.9473333333333334,3.144458249505861,0.689163224539215,0.948,3.5284906386118644,1000 +Linear,Linear,observational,True,1,0.9,0.887,0.5726290497982203,0.14337121919425516,0.874,0.7319181746308432,1000 +Linear,Linear,observational,True,1,0.95,0.9386666666666666,0.6823295980360305,0.14337121919425516,0.93,0.8280502502130269,1000 +Linear,Linear,observational,True,4,0.9,0.677,2.99370554568291,1.0627549900400246,0.642,3.383972541727221,1000 +Linear,Linear,observational,True,4,0.95,0.772,3.5672201791785585,1.0627549900400246,0.741,3.942030692640843,1000 +Linear,Linear,observational,True,6,0.9,0.8893333333333334,2.4790632900480443,0.6526320367848093,0.875,2.854598200173848,1000 +Linear,Linear,observational,True,6,0.95,0.9393333333333334,2.9539861081103305,0.6526320367848093,0.941,3.314585142761016,1000 diff --git a/results/did/did_pa_multi_config.yml b/results/did/did_pa_multi_config.yml index f7579ad..944e713 100644 --- a/results/did/did_pa_multi_config.yml +++ b/results/did/did_pa_multi_config.yml @@ -41,6 +41,78 @@ dml_parameters: tol: 0.0001 verbose: 0 warm_start: false + - ml_g: !!python/tuple + - LGBM + - !!python/object:lightgbm.sklearn.LGBMRegressor + _Booster: null + _best_iteration: -1 + _best_score: {} + _class_map: null + _class_weight: null + _classes: null + _evals_result: {} + _n_classes: -1 + _n_features: -1 + _n_features_in: -1 + _objective: null + _other_params: + verbose: -1 + boosting_type: gbdt + class_weight: null + colsample_bytree: 1.0 + importance_type: split + learning_rate: 0.05 + max_depth: -1 + min_child_samples: 20 + min_child_weight: 0.001 + min_split_gain: 0.0 + n_estimators: 100 + n_jobs: 1 + num_leaves: 31 + objective: null + random_state: null + reg_alpha: 0.0 + reg_lambda: 0.0 + subsample: 1.0 + subsample_for_bin: 200000 + subsample_freq: 0 + verbose: -1 + ml_m: !!python/tuple + - LGBM + - !!python/object:lightgbm.sklearn.LGBMClassifier + _Booster: null + _best_iteration: -1 + _best_score: {} + _class_map: null + _class_weight: null + _classes: null + _evals_result: {} + _n_classes: -1 + _n_features: -1 + _n_features_in: -1 + _objective: null + _other_params: + verbose: -1 + boosting_type: gbdt + class_weight: null + colsample_bytree: 1.0 + importance_type: split + learning_rate: 0.05 + max_depth: -1 + min_child_samples: 20 + min_child_weight: 0.001 + min_split_gain: 0.0 + n_estimators: 100 + n_jobs: 1 + num_leaves: 31 + objective: null + random_state: null + reg_alpha: 0.0 + reg_lambda: 0.0 + subsample: 1.0 + subsample_for_bin: 200000 + subsample_freq: 0 + verbose: -1 score: - observational - experimental diff --git a/scripts/did/did_pa_multi_config.yml b/scripts/did/did_pa_multi_config.yml index 396085c..04f11a8 100644 --- a/scripts/did/did_pa_multi_config.yml +++ b/scripts/did/did_pa_multi_config.yml @@ -15,6 +15,8 @@ dml_parameters: learners: - ml_g: ["Linear"] ml_m: ["Linear"] + - ml_g: ["LGBM"] + ml_m: ["LGBM"] score: - observational # Standard DML score From ab79662ba1ba3c77eb06ce77894339dca2ae56ad Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Fri, 21 Mar 2025 15:55:37 +0100 Subject: [PATCH 36/60] add count to plr repetition --- monte-cover/src/montecover/plm/plr_ate.py | 1 + 1 file changed, 1 insertion(+) diff --git a/monte-cover/src/montecover/plm/plr_ate.py b/monte-cover/src/montecover/plm/plr_ate.py index e6119c6..a58b471 100644 --- a/monte-cover/src/montecover/plm/plr_ate.py +++ b/monte-cover/src/montecover/plm/plr_ate.py @@ -118,6 +118,7 @@ def summarize_results(self): "Coverage": "mean", "CI Length": "mean", "Bias": "mean", + "repetition": "count", } # Aggregate results (possibly multiple result dfs) From 50996f8058319f5071770d23eaf1eb95f79a157b Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Fri, 21 Mar 2025 17:44:41 +0100 Subject: [PATCH 37/60] new cov res --- results/plm/plr_ate_coverage.csv | 42 ++++++++++++++++---------------- results/plm/plr_ate_metadata.csv | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/results/plm/plr_ate_coverage.csv b/results/plm/plr_ate_coverage.csv index e7f02fa..f801f58 100644 --- a/results/plm/plr_ate_coverage.csv +++ b/results/plm/plr_ate_coverage.csv @@ -1,21 +1,21 @@ -Learner g,Learner m,Score,level,Coverage,CI Length,Bias -LGBM,LGBM,IV-type,0.9,0.881,0.16045495852616187,0.041395241786732526 -LGBM,LGBM,IV-type,0.95,0.929,0.19119387567330545,0.041395241786732526 -LGBM,LGBM,partialling out,0.9,0.843,0.14699796562424566,0.042234936165735856 -LGBM,LGBM,partialling out,0.95,0.91,0.17515887961298732,0.042234936165735856 -Lasso,Lasso,IV-type,0.9,0.88,0.139906736409111,0.03566583231811613 -Lasso,Lasso,IV-type,0.95,0.935,0.16670915883537538,0.03566583231811613 -Lasso,Lasso,partialling out,0.9,0.895,0.14682161377285347,0.03567834426028154 -Lasso,Lasso,partialling out,0.95,0.94,0.1749487434211267,0.03567834426028154 -Lasso,Random Forest,IV-type,0.9,0.886,0.14706644661357227,0.03746782142897475 -Lasso,Random Forest,IV-type,0.95,0.94,0.17524047974475984,0.03746782142897475 -Lasso,Random Forest,partialling out,0.9,0.806,0.14380399961661133,0.04440852985313324 -Lasso,Random Forest,partialling out,0.95,0.869,0.1713530343753106,0.04440852985313324 -Random Forest,Lasso,IV-type,0.9,0.878,0.14220975326271637,0.03662484099631004 -Random Forest,Lasso,IV-type,0.95,0.933,0.16945337267598382,0.03662484099631004 -Random Forest,Lasso,partialling out,0.9,0.893,0.15213074253257877,0.03746402925271374 -Random Forest,Lasso,partialling out,0.95,0.948,0.18127496053117625,0.03746402925271374 -Random Forest,Random Forest,IV-type,0.9,0.886,0.14967937696801667,0.037873686545345016 -Random Forest,Random Forest,IV-type,0.95,0.94,0.17835397829861846,0.037873686545345016 -Random Forest,Random Forest,partialling out,0.9,0.878,0.14693420687636086,0.03830834442193379 -Random Forest,Random Forest,partialling out,0.95,0.934,0.17508290637895235,0.03830834442193379 +Learner g,Learner m,Score,level,Coverage,CI Length,Bias,repetition +LGBM,LGBM,IV-type,0.9,0.882,0.16071165852972294,0.04006345992726611,1000 +LGBM,LGBM,IV-type,0.95,0.938,0.19149975259363877,0.04006345992726611,1000 +LGBM,LGBM,partialling out,0.9,0.842,0.14721491277053025,0.042110152606416054,1000 +LGBM,LGBM,partialling out,0.95,0.906,0.17541738808225127,0.042110152606416054,1000 +Lasso,Lasso,IV-type,0.9,0.866,0.14050109787041962,0.03660923399902996,1000 +Lasso,Lasso,IV-type,0.95,0.915,0.16741738419894311,0.03660923399902996,1000 +Lasso,Lasso,partialling out,0.9,0.879,0.1474715771739181,0.03630990507775283,1000 +Lasso,Lasso,partialling out,0.95,0.931,0.17572322258236175,0.03630990507775283,1000 +Lasso,Random Forest,IV-type,0.9,0.886,0.1474535680840687,0.03770184842456424,1000 +Lasso,Random Forest,IV-type,0.95,0.939,0.17570176342823354,0.03770184842456424,1000 +Lasso,Random Forest,partialling out,0.9,0.785,0.14384571087180478,0.045773052530728796,1000 +Lasso,Random Forest,partialling out,0.95,0.883,0.17140273640142992,0.045773052530728796,1000 +Random Forest,Lasso,IV-type,0.9,0.879,0.14285466535066815,0.036599158846521436,1000 +Random Forest,Lasso,IV-type,0.95,0.93,0.17022183282640022,0.036599158846521436,1000 +Random Forest,Lasso,partialling out,0.9,0.892,0.15286076950172306,0.03825604774970179,1000 +Random Forest,Lasso,partialling out,0.95,0.939,0.1821448413180263,0.03825604774970179,1000 +Random Forest,Random Forest,IV-type,0.9,0.885,0.15036250130159673,0.037935837399518176,1000 +Random Forest,Random Forest,IV-type,0.95,0.944,0.17916797114809854,0.037935837399518176,1000 +Random Forest,Random Forest,partialling out,0.9,0.881,0.14718055225415835,0.03854156805613427,1000 +Random Forest,Random Forest,partialling out,0.95,0.934,0.17537644500167823,0.03854156805613427,1000 diff --git a/results/plm/plr_ate_metadata.csv b/results/plm/plr_ate_metadata.csv index 991fc23..b96ed32 100644 --- a/results/plm/plr_ate_metadata.csv +++ b/results/plm/plr_ate_metadata.csv @@ -1,2 +1,2 @@ DoubleML Version,Script,Date,Total Runtime (minutes),Python Version,Config File -0.10.dev0,PLRATECoverageSimulation,2025-03-21 15:10,12.47926504611969,3.12.9,scripts/plm/plr_ate_config.yml +0.10.dev0,PLRATECoverageSimulation,2025-03-21 17:43,12.395700534184774,3.12.9,scripts/plm/plr_ate_config.yml From 2ca4de97195db05625aba30edb8715954b363108 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Fri, 21 Mar 2025 17:50:45 +0100 Subject: [PATCH 38/60] update plr qmd --- .gitignore | 3 +-- doc/plm/plr.qmd | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 67d3ba2..628f882 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,4 @@ __pycache__/ # Logs monte-cover/logs/ -*.log -run_*.out \ No newline at end of file +*.log \ No newline at end of file diff --git a/doc/plm/plr.qmd b/doc/plm/plr.qmd index 61d482c..0a0dbcc 100644 --- a/doc/plm/plr.qmd +++ b/doc/plm/plr.qmd @@ -90,11 +90,11 @@ display_columns = ["Learner g", "Learner m", "Bias", "CI Length", "Coverage"] ### Partialling out ```{python} -#| echo: false +# | echo: false score = "partialling out" level = 0.95 -df_ate_95 = df[(df['level'] == level) & (df["score"] == score)][display_columns] +df_ate_95 = df[(df["level"] == level) & (df["Score"] == score)][display_columns] df_ate_95.rename(columns={"Learner g": "Learner l"}, inplace=True) make_pretty(df_ate_95, level, n_rep) ``` @@ -104,7 +104,7 @@ make_pretty(df_ate_95, level, n_rep) score = "partialling out" level = 0.9 -df_ate_9 = df[(df['level'] == level) & (df["score"] == score)][display_columns] +df_ate_9 = df[(df['level'] == level) & (df["Score"] == score)][display_columns] df_ate_9.rename(columns={"Learner g": "Learner l"}, inplace=True) make_pretty(df_ate_9, level, n_rep) ``` @@ -118,7 +118,7 @@ For the IV-type score, the learners `ml_l` and `ml_g` are both set to the same t score = "IV-type" level = 0.95 -df_ate_95 = df[(df['level'] == level) & (df["score"] == score)][display_columns] +df_ate_95 = df[(df['level'] == level) & (df["Score"] == score)][display_columns] make_pretty(df_ate_95, level, n_rep) ``` @@ -127,7 +127,7 @@ make_pretty(df_ate_95, level, n_rep) score = "IV-type" level = 0.9 -df_ate_9 = df[(df['level'] == level) & (df["score"] == score)][display_columns] +df_ate_9 = df[(df['level'] == level) & (df["Score"] == score)][display_columns] make_pretty(df_ate_9, level, n_rep) ``` From 42551e4e12d29d0c25a40c3bb214de82ea5abe50 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Sat, 22 Mar 2025 13:16:53 +0100 Subject: [PATCH 39/60] update did sim lgbm --- .../src/montecover/did/did_pa_multi.py | 4 +- results/did/did_multi_detailed.csv | 96 +++++++++---------- results/did/did_multi_eventstudy.csv | 96 +++++++++---------- results/did/did_multi_group.csv | 96 +++++++++---------- results/did/did_multi_metadata.csv | 2 +- results/did/did_multi_time.csv | 96 +++++++++---------- results/did/did_pa_multi_config.yml | 10 +- scripts/did/did_pa_multi_config.yml | 2 +- 8 files changed, 201 insertions(+), 201 deletions(-) diff --git a/monte-cover/src/montecover/did/did_pa_multi.py b/monte-cover/src/montecover/did/did_pa_multi.py index 4af123f..2c4e601 100644 --- a/monte-cover/src/montecover/did/did_pa_multi.py +++ b/monte-cover/src/montecover/did/did_pa_multi.py @@ -46,7 +46,7 @@ def _process_config_parameters(self): if learner["ml_g"][0] == "Linear": learner["ml_g"] = ("Linear", LinearRegression()) elif learner["ml_g"][0] == "LGBM": - learner["ml_g"] = ("LGBM", LGBMRegressor(n_estimators=100, learning_rate=0.05, verbose=-1, n_jobs=1)) + learner["ml_g"] = ("LGBM", LGBMRegressor(n_estimators=500, learning_rate=0.02, verbose=-1, n_jobs=1)) else: raise ValueError(f"Unknown learner type: {learner['ml_g']}") @@ -54,7 +54,7 @@ def _process_config_parameters(self): if learner["ml_m"][0] == "Linear": learner["ml_m"] = ("Linear", LogisticRegression()) elif learner["ml_m"][0] == "LGBM": - learner["ml_m"] = ("LGBM", LGBMClassifier(n_estimators=100, learning_rate=0.05, verbose=-1, n_jobs=1)) + learner["ml_m"] = ("LGBM", LGBMClassifier(n_estimators=500, learning_rate=0.02, verbose=-1, n_jobs=1)) else: raise ValueError(f"Unknown learner type: {learner['ml_m']}") diff --git a/results/did/did_multi_detailed.csv b/results/did/did_multi_detailed.csv index 93e2423..e584ef5 100644 --- a/results/did/did_multi_detailed.csv +++ b/results/did/did_multi_detailed.csv @@ -1,49 +1,49 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -LGBM,LGBM,experimental,False,1,0.9,0.5624166666666667,2.2105706879826315,1.0918363543984133,0.392,3.1595897256714163,1000 -LGBM,LGBM,experimental,False,1,0.95,0.6753333333333333,2.634057439965576,1.0918363543984133,0.527,3.5384433304110696,1000 -LGBM,LGBM,experimental,False,4,0.9,0.56225,1.9056063148380724,0.9987888659120285,0.32,2.8139576308162675,1000 -LGBM,LGBM,experimental,False,4,0.95,0.66375,2.270669976098066,0.9987888659120285,0.434,3.1260300175350486,1000 -LGBM,LGBM,experimental,False,6,0.9,0.901,1.9297833165451947,0.4650292370505929,0.894,2.843058037413404,1000 -LGBM,LGBM,experimental,False,6,0.95,0.9490833333333334,2.2994786505136418,0.4650292370505929,0.95,3.1607650795805657,1000 -LGBM,LGBM,experimental,True,1,0.9,0.56125,2.2109595169063447,1.0901779302400194,0.385,3.161199516791711,1000 -LGBM,LGBM,experimental,True,1,0.95,0.6731666666666666,2.6345207582050456,1.0901779302400194,0.52,3.5381076690106985,1000 -LGBM,LGBM,experimental,True,4,0.9,0.5615,1.9055179156566338,0.9982970546992314,0.319,2.8114626499091226,1000 -LGBM,LGBM,experimental,True,4,0.95,0.661,2.2705646419765104,0.9982970546992314,0.438,3.1240482644060696,1000 -LGBM,LGBM,experimental,True,6,0.9,0.90175,1.9300617281970756,0.465536861894574,0.907,2.8427052038630234,1000 -LGBM,LGBM,experimental,True,6,0.95,0.9504166666666666,2.2998103984586393,0.465536861894574,0.954,3.161162346569528,1000 -LGBM,LGBM,observational,False,1,0.9,0.96075,3.860122273027192,0.7973124864002962,0.983,5.809738980637339,1000 -LGBM,LGBM,observational,False,1,0.95,0.9861666666666666,4.599619386848575,0.7973124864002962,0.995,6.430398563283054,1000 -LGBM,LGBM,observational,False,4,0.9,0.961,4.512624613227589,0.9164722703680156,0.971,6.6898615578032725,1000 -LGBM,LGBM,observational,False,4,0.95,0.9855,5.377123880662486,0.9164722703680156,0.98,7.432765016015873,1000 -LGBM,LGBM,observational,False,6,0.9,0.958,3.50270068952298,0.7100629357142844,0.984,5.273421616280179,1000 -LGBM,LGBM,observational,False,6,0.95,0.986,4.17372530151049,0.7100629357142844,0.997,5.841221698395343,1000 -LGBM,LGBM,observational,True,1,0.9,0.9343333333333333,2.712868127930892,0.5826992260811286,0.945,4.106276591884389,1000 -LGBM,LGBM,observational,True,1,0.95,0.9720833333333334,3.232581755864662,0.5826992260811286,0.977,4.540965421627881,1000 -LGBM,LGBM,observational,True,4,0.9,0.92525,3.156071825360632,0.6849012493398391,0.922,4.7143904406177395,1000 -LGBM,LGBM,observational,True,4,0.95,0.9654166666666666,3.7606915344759266,0.6849012493398391,0.961,5.2265508394561335,1000 -LGBM,LGBM,observational,True,6,0.9,0.94475,2.579379320454953,0.5423990875809755,0.961,3.9010126368155924,1000 -LGBM,LGBM,observational,True,6,0.95,0.978,3.073520031036937,0.5423990875809755,0.976,4.315622661457858,1000 -Linear,Linear,experimental,False,1,0.9,0.87675,0.5962556758101943,0.15540620935309896,0.835,0.9294555811504173,1000 -Linear,Linear,experimental,False,1,0.95,0.9341666666666666,0.7104824593611389,0.15540620935309896,0.903,1.0203476694408922,1000 -Linear,Linear,experimental,False,4,0.9,0.6788333333333334,1.9823719036462466,0.8343842929598351,0.543,2.876526568337002,1000 -Linear,Linear,experimental,False,4,0.95,0.7713333333333334,2.36214181702709,0.8343842929598351,0.647,3.2062768555810672,1000 -Linear,Linear,experimental,False,6,0.9,0.8975833333333334,2.001582926468975,0.4883176375232907,0.889,2.8947205466241517,1000 -Linear,Linear,experimental,False,6,0.95,0.951,2.385033162628771,0.4883176375232907,0.936,3.229856365862383,1000 -Linear,Linear,experimental,True,1,0.9,0.8783333333333334,0.5961879895205551,0.15516071674467652,0.835,0.9289596340870964,1000 -Linear,Linear,experimental,True,1,0.95,0.9336666666666666,0.7104018061724501,0.15516071674467652,0.897,1.0199615861026785,1000 -Linear,Linear,experimental,True,4,0.9,0.679,1.982325730340813,0.8350623844266716,0.542,2.874691539814855,1000 -Linear,Linear,experimental,True,4,0.95,0.7708333333333334,2.3620867981401727,0.8350623844266716,0.648,3.2065829645941943,1000 -Linear,Linear,experimental,True,6,0.9,0.8986666666666666,2.0014329000292035,0.4878977948334089,0.898,2.8958152919701714,1000 -Linear,Linear,experimental,True,6,0.95,0.9515833333333333,2.384854395099635,0.4878977948334089,0.944,3.230868272500581,1000 -Linear,Linear,observational,False,1,0.9,0.90175,0.686534548613581,0.16649618454495813,0.902,1.066351549510838,1000 -Linear,Linear,observational,False,1,0.95,0.9520833333333334,0.8180563713252403,0.16649618454495813,0.946,1.171229891264187,1000 -Linear,Linear,observational,False,4,0.9,0.79475,2.8873024002222816,0.9025556348916655,0.704,4.118610356886369,1000 -Linear,Linear,observational,False,4,0.95,0.867,3.4404330112947377,0.9025556348916655,0.806,4.6067910217812065,1000 -Linear,Linear,observational,False,6,0.9,0.90025,2.598132417226769,0.6748383969329592,0.907,3.730754168279962,1000 -Linear,Linear,observational,False,6,0.95,0.9518333333333334,3.0958657240938163,0.6748383969329592,0.95,4.165912075371038,1000 -Linear,Linear,observational,True,1,0.9,0.8975,0.6663493436025194,0.16422406525625022,0.884,1.0360859078980413,1000 -Linear,Linear,observational,True,1,0.95,0.9454166666666667,0.7940042160489305,0.16422406525625022,0.934,1.1384905364687135,1000 -Linear,Linear,observational,True,4,0.9,0.7818333333333334,2.749847403764977,0.8818152982040376,0.703,3.9307697380515574,1000 -Linear,Linear,observational,True,4,0.95,0.8599166666666667,3.2766452808018376,0.8818152982040376,0.797,4.397407804688746,1000 -Linear,Linear,observational,True,6,0.9,0.8920833333333333,2.4622968110379206,0.6399157390802319,0.887,3.543748460254503,1000 -Linear,Linear,observational,True,6,0.95,0.9465833333333333,2.9340076161223876,0.6399157390802319,0.944,3.9562585292222243,1000 +LGBM,LGBM,experimental,False,1,0.9,0.3929166666666667,0.6687029507520728,0.4569473540080381,0.066,1.0019963477166332,1000 +LGBM,LGBM,experimental,False,1,0.95,0.48991666666666667,0.7968087119452796,0.4569473540080381,0.131,1.1107772389821786,1000 +LGBM,LGBM,experimental,False,4,0.9,0.5314166666666666,0.5827863000707186,0.32927572636155183,0.206,0.8969333386170385,1000 +LGBM,LGBM,experimental,False,4,0.95,0.6208333333333333,0.6944327082397956,0.32927572636155183,0.298,0.9870085765972824,1000 +LGBM,LGBM,experimental,False,6,0.9,0.8985833333333334,0.5798291764546274,0.1415015522676616,0.902,0.8926496847901934,1000 +LGBM,LGBM,experimental,False,6,0.95,0.9505,0.6909090781183035,0.1415015522676616,0.94,0.9826119522997802,1000 +LGBM,LGBM,experimental,True,1,0.9,0.3985833333333333,0.6685234379502083,0.4558614977424509,0.073,1.0027027615662685,1000 +LGBM,LGBM,experimental,True,1,0.95,0.49141666666666667,0.7965948092486183,0.4558614977424509,0.14,1.1116972038295265,1000 +LGBM,LGBM,experimental,True,4,0.9,0.529,0.5827218897275354,0.3290643441251289,0.21,0.8975401350497161,1000 +LGBM,LGBM,experimental,True,4,0.95,0.6195833333333334,0.6943559585820737,0.3290643441251289,0.286,0.988165661809689,1000 +LGBM,LGBM,experimental,True,6,0.9,0.9005833333333334,0.5798357897778391,0.14062961792513812,0.903,0.8920158735259474,1000 +LGBM,LGBM,experimental,True,6,0.95,0.9526666666666667,0.6909169583789544,0.14062961792513812,0.946,0.9820497847451054,1000 +LGBM,LGBM,observational,False,1,0.9,0.91325,2.7335893497080668,0.7032100492915742,0.97,4.24966855110796,1000 +LGBM,LGBM,observational,False,1,0.95,0.9674166666666666,3.2572726145121886,0.7032100492915742,0.989,4.665238891989982,1000 +LGBM,LGBM,observational,False,4,0.9,0.9081666666666667,3.502596227758532,0.9581715859756315,0.97,5.396052160776311,1000 +LGBM,LGBM,observational,False,4,0.95,0.9659166666666666,4.173600827640763,0.9581715859756315,0.991,5.937512318038689,1000 +LGBM,LGBM,observational,False,6,0.9,0.9283333333333333,2.171679918677507,0.507690184177682,0.966,3.389992202359619,1000 +LGBM,LGBM,observational,False,6,0.95,0.9716666666666667,2.5877162300730143,0.507690184177682,0.986,3.7190046001183736,1000 +LGBM,LGBM,observational,True,1,0.9,0.9136666666666666,1.1116368737676119,0.26925529063955034,0.94,1.7337204258041814,1000 +LGBM,LGBM,observational,True,1,0.95,0.95975,1.3245970345150337,0.26925529063955034,0.979,1.901763207693331,1000 +LGBM,LGBM,observational,True,4,0.9,0.9205,1.415253033640148,0.329332847066125,0.923,2.1884940627932736,1000 +LGBM,LGBM,observational,True,4,0.95,0.964,1.6863780031823952,0.329332847066125,0.964,2.405714926928363,1000 +LGBM,LGBM,observational,True,6,0.9,0.9066666666666666,1.0240923600589003,0.2484225935648514,0.917,1.6017734165577624,1000 +LGBM,LGBM,observational,True,6,0.95,0.9585833333333333,1.220281312373145,0.2484225935648514,0.961,1.7565712317977673,1000 +Linear,Linear,experimental,False,1,0.9,0.8515,0.29472504253429116,0.0813922749648889,0.765,0.45946653721752106,1000 +Linear,Linear,experimental,False,1,0.95,0.9171666666666666,0.35118654890882184,0.0813922749648889,0.861,0.5047523635861321,1000 +Linear,Linear,experimental,False,4,0.9,0.30075,0.975812057155266,0.8193739142204116,0.036,1.4138427377009106,1000 +Linear,Linear,experimental,False,4,0.95,0.3815,1.1627517831169838,0.8193739142204116,0.067,1.57605877958281,1000 +Linear,Linear,experimental,False,6,0.9,0.89825,0.9829577849827824,0.24024745112751242,0.91,1.4202537375432176,1000 +Linear,Linear,experimental,False,6,0.95,0.9493333333333334,1.1712664429966075,0.24024745112751242,0.951,1.5831655301216463,1000 +Linear,Linear,experimental,True,1,0.9,0.8509166666666667,0.2947253078468344,0.08140709028680689,0.762,0.4593988323351278,1000 +Linear,Linear,experimental,True,1,0.95,0.91725,0.3511868650482161,0.08140709028680689,0.864,0.5042913385772815,1000 +Linear,Linear,experimental,True,4,0.9,0.3020833333333333,0.9757488994792876,0.819502522016252,0.039,1.412809617036458,1000 +Linear,Linear,experimental,True,4,0.95,0.3835,1.1626765261043008,0.819502522016252,0.065,1.5757772289647831,1000 +Linear,Linear,experimental,True,6,0.9,0.897,0.9830229866645744,0.24034574478609086,0.908,1.420394273430355,1000 +Linear,Linear,experimental,True,6,0.95,0.9499166666666666,1.171344135592441,0.24034574478609086,0.956,1.5848182567435658,1000 +Linear,Linear,observational,False,1,0.9,0.8973333333333333,0.3186240551118928,0.0778003450354372,0.89,0.49548723415593937,1000 +Linear,Linear,observational,False,1,0.95,0.9491666666666666,0.379663978845845,0.0778003450354372,0.946,0.5446256028987391,1000 +Linear,Linear,observational,False,4,0.9,0.4170833333333333,1.2358847166873828,0.8010746877401096,0.182,1.7662191422551763,1000 +Linear,Linear,observational,False,4,0.95,0.5161666666666667,1.4726474709121475,0.8010746877401096,0.274,1.9752694540622302,1000 +Linear,Linear,observational,False,6,0.9,0.8986666666666666,1.0267086469519957,0.25326747402342975,0.903,1.4829059870672159,1000 +Linear,Linear,observational,False,6,0.95,0.948,1.223398810489494,0.25326747402342975,0.958,1.654277564832196,1000 +Linear,Linear,observational,True,1,0.9,0.8955,0.316626811484083,0.07772309002866071,0.884,0.4926269679922508,1000 +Linear,Linear,observational,True,1,0.95,0.9470833333333334,0.37728411627648417,0.07772309002866071,0.941,0.5413306341435754,1000 +Linear,Linear,observational,True,4,0.9,0.4099166666666667,1.2341893457828894,0.801242331888525,0.186,1.7648003716701655,1000 +Linear,Linear,observational,True,4,0.95,0.5141666666666667,1.470627311878664,0.801242331888525,0.282,1.9736066482922592,1000 +Linear,Linear,observational,True,6,0.9,0.8946666666666666,1.0202628382324073,0.2515765758933131,0.89,1.4739361431017262,1000 +Linear,Linear,observational,True,6,0.95,0.9469166666666666,1.2157181556673127,0.2515765758933131,0.955,1.6441941273713205,1000 diff --git a/results/did/did_multi_eventstudy.csv b/results/did/did_multi_eventstudy.csv index def27b9..43df8e7 100644 --- a/results/did/did_multi_eventstudy.csv +++ b/results/did/did_multi_eventstudy.csv @@ -1,49 +1,49 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -LGBM,LGBM,experimental,False,1,0.9,0.4951666666666667,2.275423531923473,1.2302456065114191,0.367,2.8807231516132323,1000 -LGBM,LGBM,experimental,False,1,0.95,0.6253333333333334,2.7113343698615364,1.2302456065114191,0.526,3.291481716007052,1000 -LGBM,LGBM,experimental,False,4,0.9,0.456,1.874511001501681,1.1395829773341764,0.304,2.454541496532426,1000 -LGBM,LGBM,experimental,False,4,0.95,0.5651666666666666,2.233617624916964,1.1395829773341764,0.407,2.784075600028818,1000 -LGBM,LGBM,experimental,False,6,0.9,0.9051666666666667,1.909657018609852,0.45984422533184155,0.901,2.495151935672044,1000 -LGBM,LGBM,experimental,False,6,0.95,0.9518333333333334,2.275496687347409,0.45984422533184155,0.95,2.8347661247899203,1000 -LGBM,LGBM,experimental,True,1,0.9,0.4948333333333333,2.275759071320891,1.2279514371560163,0.38,2.8797471403263155,1000 -LGBM,LGBM,experimental,True,1,0.95,0.626,2.7117341897139284,1.2279514371560163,0.522,3.293330381148005,1000 -LGBM,LGBM,experimental,True,4,0.9,0.4638333333333333,1.8750188838720092,1.1386960562844861,0.302,2.458427538331787,1000 -LGBM,LGBM,experimental,True,4,0.95,0.5648333333333334,2.234222804087874,1.1386960562844861,0.4,2.7876063538017264,1000 -LGBM,LGBM,experimental,True,6,0.9,0.9033333333333333,1.910292845584061,0.4573844462233632,0.9,2.4959467472535595,1000 -LGBM,LGBM,experimental,True,6,0.95,0.954,2.2762543219170928,0.4573844462233632,0.951,2.834581461820259,1000 -LGBM,LGBM,observational,False,1,0.9,0.9766666666666667,3.9178076695635724,0.7643587524691926,0.984,5.21930543883624,1000 -LGBM,LGBM,observational,False,1,0.95,0.9923333333333334,4.668355776392708,0.7643587524691926,0.996,5.901402772354599,1000 -LGBM,LGBM,observational,False,4,0.9,0.9723333333333334,4.732959166761465,0.9190823155460479,0.979,6.212528913036143,1000 -LGBM,LGBM,observational,False,4,0.95,0.991,5.639668694620482,0.9190823155460479,0.994,7.04970480658214,1000 -LGBM,LGBM,observational,False,6,0.9,0.9705,3.5046722375946655,0.6712109740769173,0.975,4.667213539903498,1000 -LGBM,LGBM,observational,False,6,0.95,0.9903333333333334,4.176074545936241,0.6712109740769173,0.996,5.276491009303748,1000 -LGBM,LGBM,observational,True,1,0.9,0.9435,2.7040876686216273,0.5547334946398212,0.944,3.6298349851696496,1000 -LGBM,LGBM,observational,True,1,0.95,0.9756666666666667,3.2221191932804323,0.5547334946398212,0.973,4.095693068656322,1000 -LGBM,LGBM,observational,True,4,0.9,0.9276666666666666,3.2405159630564717,0.6810261925092936,0.92,4.2909423330841,1000 -LGBM,LGBM,observational,True,4,0.95,0.9645,3.8613129307372676,0.6810261925092936,0.962,4.859886050425436,1000 -LGBM,LGBM,observational,True,6,0.9,0.9513333333333334,2.5399279916626596,0.512480955420689,0.962,3.407249984661029,1000 -LGBM,LGBM,observational,True,6,0.95,0.9815,3.0265108733172608,0.512480955420689,0.986,3.8517677073455303,1000 -Linear,Linear,experimental,False,1,0.9,0.8616666666666666,0.4256476640080489,0.11580496789395077,0.824,0.6070719450959261,1000 -Linear,Linear,experimental,False,1,0.95,0.9198333333333334,0.5071904745138727,0.11580496789395077,0.893,0.674778601643221,1000 -Linear,Linear,experimental,False,4,0.9,0.6161666666666666,1.9748011790533448,0.9254625000800732,0.505,2.5521902749192185,1000 -Linear,Linear,experimental,False,4,0.95,0.715,2.3531207422664986,0.9254625000800732,0.642,2.9022762051937074,1000 -Linear,Linear,experimental,False,6,0.9,0.8965,1.9996364779477631,0.4901680517340787,0.888,2.5791432846567086,1000 -Linear,Linear,experimental,False,6,0.95,0.9501666666666666,2.3827138261620924,0.4901680517340787,0.944,2.932874280172364,1000 -Linear,Linear,experimental,True,1,0.9,0.8633333333333334,0.42557881302767747,0.11564143022698879,0.83,0.6068201449690751,1000 -Linear,Linear,experimental,True,1,0.95,0.9225,0.5071084335105779,0.11564143022698879,0.895,0.6750690838543019,1000 -Linear,Linear,experimental,True,4,0.9,0.617,1.9746566585307588,0.9255903141589501,0.513,2.555107555763497,1000 -Linear,Linear,experimental,True,4,0.95,0.7171666666666666,2.3529485354423443,0.9255903141589501,0.648,2.902660854375723,1000 -Linear,Linear,experimental,True,6,0.9,0.8983333333333333,1.9992432685977637,0.48878874491179886,0.895,2.577170881521723,1000 -Linear,Linear,experimental,True,6,0.95,0.9505,2.3822452883227645,0.48878874491179886,0.948,2.932620166526624,1000 -Linear,Linear,observational,False,1,0.9,0.8953333333333334,0.49138831479410017,0.12098465482566172,0.897,0.6991359808997865,1000 -Linear,Linear,observational,False,1,0.95,0.9493333333333334,0.5855252915150007,0.12098465482566172,0.941,0.7770777897530963,1000 -Linear,Linear,observational,False,4,0.9,0.7711666666666667,3.030494999744617,0.984849905387765,0.704,3.8483976755019476,1000 -Linear,Linear,observational,False,4,0.95,0.8471666666666666,3.6110575175230513,0.984849905387765,0.812,4.384520004536955,1000 -Linear,Linear,observational,False,6,0.9,0.9021666666666667,2.646784162311001,0.6914860748123539,0.903,3.3804870593730962,1000 -Linear,Linear,observational,False,6,0.95,0.9486666666666667,3.1538378540071927,0.6914860748123539,0.951,3.852416139718707,1000 -Linear,Linear,observational,True,1,0.9,0.892,0.47696377672730894,0.11948182994920056,0.876,0.67978568573763,1000 -Linear,Linear,observational,True,1,0.95,0.9448333333333334,0.5683373942812903,0.11948182994920056,0.933,0.7551430771817692,1000 -Linear,Linear,observational,True,4,0.9,0.7558333333333334,2.8599187733703526,0.9620410710967653,0.694,3.6412576449934924,1000 -Linear,Linear,observational,True,4,0.95,0.8355,3.4078034073491654,0.9620410710967653,0.784,4.149225460361053,1000 -Linear,Linear,observational,True,6,0.9,0.8931666666666667,2.5039181306359932,0.6566361613103366,0.896,3.2031793271389217,1000 -Linear,Linear,observational,True,6,0.95,0.9488333333333334,2.9836024773699767,0.6566361613103366,0.947,3.648166638226422,1000 +LGBM,LGBM,experimental,False,1,0.9,0.2625,0.6636959506532898,0.529022005216395,0.07,0.8721728991362343,1000 +LGBM,LGBM,experimental,False,1,0.95,0.3531666666666667,0.7908425033395988,0.529022005216395,0.127,0.9892636939270536,1000 +LGBM,LGBM,experimental,False,4,0.9,0.3831666666666667,0.541559021624367,0.3761992354288148,0.184,0.7380907993716206,1000 +LGBM,LGBM,experimental,False,4,0.95,0.47683333333333333,0.6453073759844181,0.3761992354288148,0.267,0.8297125623699999,1000 +LGBM,LGBM,experimental,False,6,0.9,0.8986666666666666,0.5396931934137096,0.131798775847129,0.898,0.7343817962892296,1000 +LGBM,LGBM,experimental,False,6,0.95,0.9496666666666667,0.6430841045429312,0.131798775847129,0.948,0.8266988306227046,1000 +LGBM,LGBM,experimental,True,1,0.9,0.261,0.6635055839191404,0.527087926313856,0.076,0.8721274126896164,1000 +LGBM,LGBM,experimental,True,1,0.95,0.352,0.7906156673849134,0.527087926313856,0.131,0.9888732855604295,1000 +LGBM,LGBM,experimental,True,4,0.9,0.38716666666666666,0.5414471271756258,0.3759746162522699,0.183,0.7373893229557413,1000 +LGBM,LGBM,experimental,True,4,0.95,0.4735,0.645174045525094,0.3759746162522699,0.271,0.8297110623941906,1000 +LGBM,LGBM,experimental,True,6,0.9,0.8998333333333334,0.539700022468657,0.13058202268620273,0.903,0.7344364378985526,1000 +LGBM,LGBM,experimental,True,6,0.95,0.9515,0.6430922418638007,0.13058202268620273,0.962,0.8263517532644528,1000 +LGBM,LGBM,observational,False,1,0.9,0.9028333333333334,2.6579867264169623,0.6972663134429383,0.935,3.6873569402706985,1000 +LGBM,LGBM,observational,False,1,0.95,0.961,3.1671865324685577,0.6972663134429383,0.98,4.130308764277612,1000 +LGBM,LGBM,observational,False,4,0.9,0.8981666666666667,3.540948175817156,1.0058202037947572,0.948,4.850270140870862,1000 +LGBM,LGBM,observational,False,4,0.95,0.9651666666666666,4.2192999924176116,1.0058202037947572,0.981,5.4512619973747745,1000 +LGBM,LGBM,observational,False,6,0.9,0.933,2.037060701928239,0.4598193308854795,0.964,2.8400894320026713,1000 +LGBM,LGBM,observational,False,6,0.95,0.9726666666666667,2.427307539517024,0.4598193308854795,0.989,3.1739017288171176,1000 +LGBM,LGBM,observational,True,1,0.9,0.9213333333333333,1.050086270624349,0.25003394058188716,0.935,1.4633549442076819,1000 +LGBM,LGBM,observational,True,1,0.95,0.9665,1.2512549672265916,0.25003394058188716,0.965,1.6361896755022522,1000 +LGBM,LGBM,observational,True,4,0.9,0.9316666666666666,1.3927643183370695,0.31165472354651236,0.931,1.9158339453463717,1000 +LGBM,LGBM,observational,True,4,0.95,0.9691666666666666,1.6595810460973441,0.31165472354651236,0.973,2.150765562497434,1000 +LGBM,LGBM,observational,True,6,0.9,0.916,0.9447577179015779,0.22388654410245656,0.924,1.321144543111028,1000 +LGBM,LGBM,observational,True,6,0.95,0.9633333333333334,1.125748255566801,0.22388654410245656,0.969,1.476804179834048,1000 +Linear,Linear,experimental,False,1,0.9,0.8173333333333334,0.21010934901607603,0.06389413336978436,0.734,0.2995486307475187,1000 +Linear,Linear,experimental,False,1,0.95,0.8883333333333334,0.25036073127667713,0.06389413336978436,0.824,0.33300685508980765,1000 +Linear,Linear,experimental,False,4,0.9,0.18233333333333332,0.9731891323288676,0.9553722273933868,0.035,1.2550593366290492,1000 +Linear,Linear,experimental,False,4,0.95,0.24483333333333332,1.159626375415251,0.9553722273933868,0.062,1.427281521275678,1000 +Linear,Linear,experimental,False,6,0.9,0.8991666666666667,0.983154791767425,0.24096929101420667,0.896,1.2646646579458003,1000 +Linear,Linear,experimental,False,6,0.95,0.9493333333333334,1.1715011910594644,0.24096929101420667,0.954,1.4405338687038451,1000 +Linear,Linear,experimental,True,1,0.9,0.8183333333333334,0.2101078759542198,0.06393519386606976,0.735,0.2997680383709066,1000 +Linear,Linear,experimental,True,1,0.95,0.8886666666666666,0.25035897601521323,0.06393519386606976,0.822,0.33312635411891106,1000 +Linear,Linear,experimental,True,4,0.9,0.18266666666666664,0.9731745067396574,0.9555099105888395,0.036,1.255638708223545,1000 +Linear,Linear,experimental,True,4,0.95,0.24416666666666667,1.1596089479508038,0.9555099105888395,0.063,1.4288279721426538,1000 +Linear,Linear,experimental,True,6,0.9,0.8981666666666667,0.983230871903134,0.2406664821693051,0.897,1.2651069060158553,1000 +Linear,Linear,experimental,True,6,0.95,0.9511666666666666,1.1715918461326484,0.2406664821693051,0.953,1.4391701994081894,1000 +Linear,Linear,observational,False,1,0.9,0.8941666666666667,0.22631561327607266,0.05557872144580866,0.892,0.3226263773017779,1000 +Linear,Linear,observational,False,1,0.95,0.9455,0.2696716862170277,0.05557872144580866,0.937,0.35845697787294845,1000 +Linear,Linear,observational,False,4,0.9,0.3135,1.2862330207052297,0.9346939386488097,0.176,1.6370553622592494,1000 +Linear,Linear,observational,False,4,0.95,0.4105,1.5326411754830194,0.9346939386488097,0.262,1.8677802781216264,1000 +Linear,Linear,observational,False,6,0.9,0.8976666666666666,1.0320265854516255,0.2551950378809458,0.899,1.3250563630817251,1000 +Linear,Linear,observational,False,6,0.95,0.9503333333333334,1.2297355250521091,0.2551950378809458,0.952,1.5088480304498908,1000 +Linear,Linear,observational,True,1,0.9,0.892,0.22505764983928228,0.055525785656232375,0.893,0.3209906260141245,1000 +Linear,Linear,observational,True,1,0.95,0.9461666666666666,0.26817273032844385,0.055525785656232375,0.941,0.35667536776248815,1000 +Linear,Linear,observational,True,4,0.9,0.3061666666666667,1.28541058856118,0.9339704262500759,0.17,1.6355455781060406,1000 +Linear,Linear,observational,True,4,0.95,0.4085,1.5316611871389785,0.9339704262500759,0.262,1.8666482756521672,1000 +Linear,Linear,observational,True,6,0.9,0.8971666666666667,1.0247399978060059,0.25261728155460716,0.89,1.3185452498576644,1000 +Linear,Linear,observational,True,6,0.95,0.9486666666666667,1.2210530203467647,0.25261728155460716,0.946,1.5006187957143757,1000 diff --git a/results/did/did_multi_group.csv b/results/did/did_multi_group.csv index 8e6fd2d..c3ea832 100644 --- a/results/did/did_multi_group.csv +++ b/results/did/did_multi_group.csv @@ -1,49 +1,49 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -LGBM,LGBM,experimental,False,1,0.9,0.544,2.425320638886084,1.2319087948330136,0.373,2.996270924971626,1000 -LGBM,LGBM,experimental,False,1,0.95,0.6573333333333333,2.8899477894507153,1.2319087948330136,0.51,3.426821414153212,1000 -LGBM,LGBM,experimental,False,4,0.9,0.5433333333333332,2.081033950171366,1.1284091315935543,0.326,2.63040246774168,1000 -LGBM,LGBM,experimental,False,4,0.95,0.645,2.4797048965994914,1.1284091315935543,0.433,2.9840997920845034,1000 -LGBM,LGBM,experimental,False,6,0.9,0.9013333333333333,2.1074708371942887,0.5074798549008092,0.889,2.661409971109796,1000 -LGBM,LGBM,experimental,False,6,0.95,0.949,2.511206390458441,0.5074798549008092,0.951,3.024791162993095,1000 -LGBM,LGBM,experimental,True,1,0.9,0.544,2.4258784897314545,1.2301893619998863,0.381,2.9938872731992046,1000 -LGBM,LGBM,experimental,True,1,0.95,0.654,2.890612509732056,1.2301893619998863,0.512,3.4246029625955265,1000 -LGBM,LGBM,experimental,True,4,0.9,0.5453333333333332,2.080804861227795,1.1267095291503957,0.322,2.63126524321154,1000 -LGBM,LGBM,experimental,True,4,0.95,0.637,2.479431920286403,1.1267095291503957,0.432,2.9864977663945322,1000 -LGBM,LGBM,experimental,True,6,0.9,0.8983333333333333,2.1075770544801875,0.5090578420666497,0.898,2.6592454867701534,1000 -LGBM,LGBM,experimental,True,6,0.95,0.9506666666666667,2.5113329561609974,0.5090578420666497,0.951,3.021879998386774,1000 -LGBM,LGBM,observational,False,1,0.9,0.9733333333333334,4.03021343300979,0.7766577483742204,0.981,5.037046138005267,1000 -LGBM,LGBM,observational,False,1,0.95,0.9906666666666666,4.802295504766979,0.7766577483742204,0.996,5.738923894610133,1000 -LGBM,LGBM,observational,False,4,0.9,0.97,4.8021396925676045,0.9082207211428641,0.975,5.966191417077038,1000 -LGBM,LGBM,observational,False,4,0.95,0.99,5.7221023755206355,0.9082207211428641,0.993,6.811583661183153,1000 -LGBM,LGBM,observational,False,6,0.9,0.9703333333333334,3.6797914931041698,0.6937275477633349,0.988,4.610582711796715,1000 -LGBM,LGBM,observational,False,6,0.95,0.9913333333333334,4.384742009213337,0.6937275477633349,0.997,5.248758742823758,1000 -LGBM,LGBM,observational,True,1,0.9,0.9506666666666667,2.8486162589101403,0.5735809923435359,0.952,3.592593517873356,1000 -LGBM,LGBM,observational,True,1,0.95,0.9793333333333334,3.394335630694889,0.5735809923435359,0.983,4.079342062842905,1000 -LGBM,LGBM,observational,True,4,0.9,0.9343333333333333,3.368298861981589,0.6884203303254872,0.939,4.227183687419757,1000 -LGBM,LGBM,observational,True,4,0.95,0.9703333333333334,4.013575646172639,0.6884203303254872,0.978,4.806891684310405,1000 -LGBM,LGBM,observational,True,6,0.9,0.9533333333333334,2.7279084619534326,0.5447869829275808,0.969,3.4465706624788495,1000 -LGBM,LGBM,observational,True,6,0.95,0.9826666666666666,3.250503419237389,0.5447869829275808,0.987,3.91458414149786,1000 -Linear,Linear,experimental,False,1,0.9,0.8656666666666666,0.53365284736229,0.14113839390189276,0.841,0.6858601630178984,1000 -Linear,Linear,experimental,False,1,0.95,0.924,0.635886588289231,0.14113839390189276,0.904,0.7736797278406461,1000 -Linear,Linear,experimental,False,4,0.9,0.6696666666666666,2.1893979266171124,0.9361640632307114,0.539,2.762491543769461,1000 -Linear,Linear,experimental,False,4,0.95,0.7683333333333334,2.6088285387127694,0.9361640632307114,0.656,3.13570938340289,1000 -Linear,Linear,experimental,False,6,0.9,0.8963333333333334,2.2066699836465244,0.5391769945435134,0.905,2.776901533986721,1000 -Linear,Linear,experimental,False,6,0.95,0.952,2.629409464068001,0.5391769945435134,0.951,3.1580920998536812,1000 -Linear,Linear,experimental,True,1,0.9,0.8653333333333334,0.5335876458732524,0.14098973324489064,0.842,0.6859583678871254,1000 -Linear,Linear,experimental,True,1,0.95,0.9256666666666666,0.6358088959230787,0.14098973324489064,0.903,0.7735239022392485,1000 -Linear,Linear,experimental,True,4,0.9,0.6683333333333333,2.189887470203439,0.9376906555300101,0.533,2.762438365471929,1000 -Linear,Linear,experimental,True,4,0.95,0.7673333333333334,2.609411865874738,0.9376906555300101,0.65,3.137626305537253,1000 -Linear,Linear,experimental,True,6,0.9,0.8996666666666666,2.206190512676471,0.539245881315392,0.908,2.7775275532096906,1000 -Linear,Linear,experimental,True,6,0.95,0.951,2.628838139168606,0.539245881315392,0.947,3.1603971924586123,1000 -Linear,Linear,observational,False,1,0.9,0.903,0.6100966786339458,0.14595261649230307,0.901,0.7827440423437438,1000 -Linear,Linear,observational,False,1,0.95,0.952,0.7269750314660184,0.14595261649230307,0.944,0.8836444753244614,1000 -Linear,Linear,observational,False,4,0.9,0.7883333333333333,3.2174659336975893,1.007817766808723,0.739,3.9970752953576123,1000 -Linear,Linear,observational,False,4,0.95,0.8686666666666666,3.8338471267011167,1.007817766808723,0.828,4.566674016780959,1000 -Linear,Linear,observational,False,6,0.9,0.8983333333333333,2.831695772379743,0.7289665197204216,0.899,3.52423219231215,1000 -Linear,Linear,observational,False,6,0.95,0.9533333333333334,3.3741736274278034,0.7289665197204216,0.953,4.017472422924514,1000 -Linear,Linear,observational,True,1,0.9,0.8943333333333334,0.5907411589406687,0.14453692468281937,0.883,0.758257638344459,1000 -Linear,Linear,observational,True,1,0.95,0.946,0.7039115072233244,0.14453692468281937,0.946,0.8568435231487644,1000 -Linear,Linear,observational,True,4,0.9,0.7816666666666666,3.0525973420953805,0.9863117736959517,0.732,3.805846942979805,1000 -Linear,Linear,observational,True,4,0.95,0.865,3.6373940828390534,0.9863117736959517,0.815,4.339527793994656,1000 -Linear,Linear,observational,True,6,0.9,0.89,2.7202274205001,0.7062614871662574,0.892,3.3901526544863465,1000 -Linear,Linear,observational,True,6,0.95,0.9456666666666667,3.2413508938298894,0.7062614871662574,0.942,3.863150014029504,1000 +LGBM,LGBM,experimental,False,1,0.9,0.36333333333333334,0.7099611603275398,0.5136254795571277,0.063,0.8838008665615663,1000 +LGBM,LGBM,experimental,False,1,0.95,0.44366666666666665,0.8459709009142721,0.5136254795571277,0.125,1.0073964643876039,1000 +LGBM,LGBM,experimental,False,4,0.9,0.5003333333333333,0.6081921535389957,0.3647820057477306,0.208,0.7740280182075162,1000 +LGBM,LGBM,experimental,False,4,0.95,0.586,0.724705649842881,0.3647820057477306,0.293,0.8773684088181728,1000 +LGBM,LGBM,experimental,False,6,0.9,0.892,0.6040687503260035,0.14827667506508013,0.905,0.7676094817648568,1000 +LGBM,LGBM,experimental,False,6,0.95,0.952,0.7197923118663098,0.14827667506508013,0.958,0.8705565266492603,1000 +LGBM,LGBM,experimental,True,1,0.9,0.36566666666666664,0.7097094059811901,0.5114031208693576,0.072,0.8837773053597564,1000 +LGBM,LGBM,experimental,True,1,0.95,0.4523333333333333,0.8456709171079858,0.5114031208693576,0.124,1.007523478162278,1000 +LGBM,LGBM,experimental,True,4,0.9,0.4933333333333333,0.6081403435021401,0.36468811333216045,0.213,0.773486458472449,1000 +LGBM,LGBM,experimental,True,4,0.95,0.58,0.7246439143762045,0.36468811333216045,0.299,0.8761786582171167,1000 +LGBM,LGBM,experimental,True,6,0.9,0.8956666666666666,0.6041257613200308,0.14803198170285703,0.902,0.7681786591736645,1000 +LGBM,LGBM,experimental,True,6,0.95,0.955,0.7198602446556994,0.14803198170285703,0.951,0.8706888223083712,1000 +LGBM,LGBM,observational,False,1,0.9,0.9076666666666666,2.6781898300270406,0.6916972849241111,0.946,3.38857326771682,1000 +LGBM,LGBM,observational,False,1,0.95,0.9653333333333334,3.191260015241048,0.6916972849241111,0.981,3.8456624803104273,1000 +LGBM,LGBM,observational,False,4,0.9,0.9093333333333333,3.5229498626174345,0.9750065503975603,0.937,4.436162638678508,1000 +LGBM,LGBM,observational,False,4,0.95,0.9666666666666667,4.1978536794594765,0.9750065503975603,0.987,5.041432763827293,1000 +LGBM,LGBM,observational,False,6,0.9,0.9413333333333334,2.1219437360077764,0.4704737938297111,0.965,2.694067282189173,1000 +LGBM,LGBM,observational,False,6,0.95,0.9813333333333334,2.528451913076099,0.4704737938297111,0.989,3.0566238417322635,1000 +LGBM,LGBM,observational,True,1,0.9,0.925,1.0932949019073217,0.25390420245544787,0.931,1.3884244485303283,1000 +LGBM,LGBM,observational,True,1,0.95,0.9686666666666667,1.3027412270057395,0.25390420245544787,0.979,1.57225063983022,1000 +LGBM,LGBM,observational,True,4,0.9,0.932,1.4282748970343668,0.3144435220940553,0.944,1.80563805439494,1000 +LGBM,LGBM,observational,True,4,0.95,0.97,1.701894510454578,0.3144435220940553,0.976,2.0500099983055438,1000 +LGBM,LGBM,observational,True,6,0.9,0.9193333333333333,1.0125316512702194,0.23463257391341852,0.938,1.290261546951988,1000 +LGBM,LGBM,observational,True,6,0.95,0.9686666666666667,1.2065058782005826,0.23463257391341852,0.976,1.460865151903143,1000 +Linear,Linear,experimental,False,1,0.9,0.8273333333333334,0.2640444496235159,0.07705628755085145,0.774,0.3388637220600302,1000 +Linear,Linear,experimental,False,1,0.95,0.894,0.3146283675945957,0.07705628755085145,0.856,0.3827834383513776,1000 +Linear,Linear,experimental,False,4,0.9,0.308,1.0788013255399809,0.9245210136614235,0.041,1.3610490892071057,1000 +Linear,Linear,experimental,False,4,0.95,0.3803333333333333,1.2854710655629746,0.9245210136614235,0.072,1.5456985336243014,1000 +Linear,Linear,experimental,False,6,0.9,0.8983333333333333,1.0853277280647347,0.2661813679333065,0.897,1.3669654616053382,1000 +Linear,Linear,experimental,False,6,0.95,0.9473333333333334,1.2932477538272285,0.2661813679333065,0.951,1.5522929783283734,1000 +Linear,Linear,experimental,True,1,0.9,0.8266666666666667,0.2640612943966985,0.07705288842045135,0.77,0.33905877967190373,1000 +Linear,Linear,experimental,True,1,0.95,0.894,0.3146484393798443,0.07705288842045135,0.859,0.3831997341679366,1000 +Linear,Linear,experimental,True,4,0.9,0.3113333333333333,1.078752037208664,0.9242783815647418,0.042,1.3592960972905426,1000 +Linear,Linear,experimental,True,4,0.95,0.38266666666666665,1.2854123348937794,0.9242783815647418,0.072,1.54610897087862,1000 +Linear,Linear,experimental,True,6,0.9,0.8966666666666666,1.085418359490078,0.2662685237358162,0.897,1.367449778023951,1000 +Linear,Linear,experimental,True,6,0.95,0.9483333333333334,1.2933557478314546,0.2662685237358162,0.951,1.5526198245057985,1000 +Linear,Linear,observational,False,1,0.9,0.9013333333333333,0.28420713117141405,0.07010567640313892,0.898,0.3649364269699617,1000 +Linear,Linear,observational,False,1,0.95,0.95,0.3386536845091911,0.07010567640313892,0.948,0.4121346070743879,1000 +Linear,Linear,observational,False,4,0.9,0.4066666666666666,1.37576459282051,0.9124524843108323,0.201,1.7241374780538787,1000 +Linear,Linear,observational,False,4,0.95,0.5053333333333333,1.6393246237546002,0.9124524843108323,0.288,1.9605496470336479,1000 +Linear,Linear,observational,False,6,0.9,0.896,1.131199773808106,0.27818227175878624,0.9,1.4214962923529382,1000 +Linear,Linear,observational,False,6,0.95,0.9456666666666667,1.3479076676827941,0.27818227175878624,0.95,1.6165756168425887,1000 +Linear,Linear,observational,True,1,0.9,0.8986666666666666,0.2824541333099468,0.07017044977152435,0.895,0.36300185021246023,1000 +Linear,Linear,observational,True,1,0.95,0.95,0.33656485872119707,0.07017044977152435,0.946,0.4096976363084026,1000 +Linear,Linear,observational,True,4,0.9,0.4043333333333333,1.3747755268837438,0.9124256763381008,0.19,1.722166983397146,1000 +Linear,Linear,observational,True,4,0.95,0.5013333333333333,1.6381460789998368,0.9124256763381008,0.292,1.960451721705977,1000 +Linear,Linear,observational,True,6,0.9,0.8946666666666666,1.124679848716498,0.27742624426950013,0.896,1.413338723451795,1000 +Linear,Linear,observational,True,6,0.95,0.945,1.3401386977561902,0.27742624426950013,0.948,1.6094449734104723,1000 diff --git a/results/did/did_multi_metadata.csv b/results/did/did_multi_metadata.csv index ffc86cf..cf6d79f 100644 --- a/results/did/did_multi_metadata.csv +++ b/results/did/did_multi_metadata.csv @@ -1,2 +1,2 @@ DoubleML Version,Script,Date,Total Runtime (minutes),Python Version,Config File -0.10.dev0,DIDMultiCoverageSimulation,2025-03-21 15:44,15.20009624560674,3.12.9,scripts/did/did_pa_multi_config.yml +0.10.dev0,DIDMultiCoverageSimulation,2025-03-22 13:07,161.55725783109665,3.12.9,scripts/did/did_pa_multi_config.yml diff --git a/results/did/did_multi_time.csv b/results/did/did_multi_time.csv index da12006..69a4f0a 100644 --- a/results/did/did_multi_time.csv +++ b/results/did/did_multi_time.csv @@ -1,49 +1,49 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -LGBM,LGBM,experimental,False,1,0.9,0.3656666666666667,2.2569933486790243,1.3346952479951693,0.335,2.587283679771306,1000 -LGBM,LGBM,experimental,False,1,0.95,0.5013333333333333,2.689373452004948,1.3346952479951693,0.459,3.0091292065928448,1000 -LGBM,LGBM,experimental,False,4,0.9,0.2906666666666667,1.8450847724208734,1.2779372023374136,0.267,2.1555721241445758,1000 -LGBM,LGBM,experimental,False,4,0.95,0.3963333333333333,2.1985541102952406,1.2779372023374136,0.347,2.4962463971758933,1000 -LGBM,LGBM,experimental,False,6,0.9,0.9003333333333333,1.8659463660137525,0.44755290753308163,0.905,2.18116239110108,1000 -LGBM,LGBM,experimental,False,6,0.95,0.9526666666666667,2.223412232277764,0.44755290753308163,0.949,2.525753365702839,1000 -LGBM,LGBM,experimental,True,1,0.9,0.364,2.2580265033201017,1.334905066108623,0.328,2.586910615526032,1000 -LGBM,LGBM,experimental,True,1,0.95,0.5003333333333333,2.6906045316911844,1.334905066108623,0.455,3.0121528226289516,1000 -LGBM,LGBM,experimental,True,4,0.9,0.294,1.844480535791368,1.2777797661334978,0.253,2.153428316199533,1000 -LGBM,LGBM,experimental,True,4,0.95,0.3903333333333333,2.197834117942994,1.2777797661334978,0.358,2.4936372635204433,1000 -LGBM,LGBM,experimental,True,6,0.9,0.9013333333333333,1.8663144241390512,0.45412326322109603,0.906,2.1805319869022752,1000 -LGBM,LGBM,experimental,True,6,0.95,0.9486666666666667,2.2238508005843793,0.45412326322109603,0.949,2.526280271128774,1000 -LGBM,LGBM,observational,False,1,0.9,0.974,4.015642893221702,0.7766827009394942,0.983,4.816483346098624,1000 -LGBM,LGBM,observational,False,1,0.95,0.993,4.784933635751991,0.7766827009394942,0.997,5.548619730624135,1000 -LGBM,LGBM,observational,False,4,0.9,0.9716666666666667,5.00747786228995,0.9544600040325625,0.977,5.906730263635111,1000 -LGBM,LGBM,observational,False,4,0.95,0.9903333333333334,5.966777896012433,0.9544600040325625,0.989,6.8315972789636215,1000 -LGBM,LGBM,observational,False,6,0.9,0.97,3.433488618358242,0.6551128314455618,0.977,4.135385722477192,1000 -LGBM,LGBM,observational,False,6,0.95,0.9913333333333334,4.091254031997149,0.6551128314455618,0.995,4.752533757091599,1000 -LGBM,LGBM,observational,True,1,0.9,0.9443333333333334,2.7004862065139217,0.5516037755717172,0.949,3.242664571356836,1000 -LGBM,LGBM,observational,True,1,0.95,0.9786666666666666,3.217827786490716,0.5516037755717172,0.98,3.733865944469767,1000 -LGBM,LGBM,observational,True,4,0.9,0.9203333333333333,3.371353319490959,0.6969306645265912,0.905,3.989978424283686,1000 -LGBM,LGBM,observational,True,4,0.95,0.9566666666666667,4.017215256781499,0.6969306645265912,0.947,4.600999609348784,1000 -LGBM,LGBM,observational,True,6,0.9,0.9553333333333334,2.470317849174788,0.5011599149291719,0.956,2.9718674567635484,1000 -LGBM,LGBM,observational,True,6,0.95,0.9823333333333334,2.9435652725662735,0.5011599149291719,0.983,3.4173840462150893,1000 -Linear,Linear,experimental,False,1,0.9,0.8493333333333334,0.4935289794342831,0.1370987141180071,0.828,0.6325256653607308,1000 -Linear,Linear,experimental,False,1,0.95,0.9146666666666666,0.5880760507612888,0.1370987141180071,0.89,0.7144061775480237,1000 -Linear,Linear,experimental,False,4,0.9,0.5073333333333333,1.9618911321974573,1.012377950869642,0.485,2.2523669014616714,1000 -Linear,Linear,experimental,False,4,0.95,0.6206666666666666,2.33773747261766,1.012377950869642,0.592,2.6173574991154327,1000 -Linear,Linear,experimental,False,6,0.9,0.8886666666666666,1.9559181106622394,0.48244705653555303,0.89,2.254488348027745,1000 -Linear,Linear,experimental,False,6,0.95,0.948,2.33062017847301,0.48244705653555303,0.952,2.6170327863809786,1000 -Linear,Linear,experimental,True,1,0.9,0.852,0.493460294448869,0.13685608241876163,0.827,0.6320487920692786,1000 -Linear,Linear,experimental,True,1,0.95,0.915,0.5879942075531853,0.13685608241876163,0.894,0.7142086115473791,1000 -Linear,Linear,experimental,True,4,0.9,0.5073333333333333,1.9617118526474717,1.0141621639498686,0.479,2.250962858505643,1000 -Linear,Linear,experimental,True,4,0.95,0.6203333333333334,2.337523847857755,1.0141621639498686,0.594,2.618856401518769,1000 -Linear,Linear,experimental,True,6,0.9,0.8953333333333334,1.9559523702787176,0.48080345349863246,0.893,2.2527473173908787,1000 -Linear,Linear,experimental,True,6,0.95,0.9473333333333334,2.3306610013239437,0.48080345349863246,0.955,2.618192170363342,1000 -Linear,Linear,observational,False,1,0.9,0.8983333333333333,0.5964425724191427,0.14623943628258027,0.887,0.7624888261759377,1000 -Linear,Linear,observational,False,1,0.95,0.9503333333333334,0.7107051604066116,0.14623943628258027,0.939,0.8622181838697768,1000 -Linear,Linear,observational,False,4,0.9,0.6906666666666667,3.197042848562427,1.0884035855850052,0.652,3.6067317562485295,1000 -Linear,Linear,observational,False,4,0.95,0.788,3.8095115197740124,1.0884035855850052,0.767,4.20942088992997,1000 -Linear,Linear,observational,False,6,0.9,0.8963333333333334,2.638912550074715,0.689163224539215,0.895,3.0353798469910536,1000 -Linear,Linear,observational,False,6,0.95,0.9473333333333334,3.144458249505861,0.689163224539215,0.948,3.5284906386118644,1000 -Linear,Linear,observational,True,1,0.9,0.887,0.5726290497982203,0.14337121919425516,0.874,0.7319181746308432,1000 -Linear,Linear,observational,True,1,0.95,0.9386666666666666,0.6823295980360305,0.14337121919425516,0.93,0.8280502502130269,1000 -Linear,Linear,observational,True,4,0.9,0.677,2.99370554568291,1.0627549900400246,0.642,3.383972541727221,1000 -Linear,Linear,observational,True,4,0.95,0.772,3.5672201791785585,1.0627549900400246,0.741,3.942030692640843,1000 -Linear,Linear,observational,True,6,0.9,0.8893333333333334,2.4790632900480443,0.6526320367848093,0.875,2.854598200173848,1000 -Linear,Linear,observational,True,6,0.95,0.9393333333333334,2.9539861081103305,0.6526320367848093,0.941,3.314585142761016,1000 +LGBM,LGBM,experimental,False,1,0.9,0.10133333333333333,0.6746093620810587,0.5882356487545806,0.066,0.8008469053978132,1000 +LGBM,LGBM,experimental,False,1,0.95,0.17366666666666666,0.8038466351337079,0.5882356487545806,0.118,0.9244463745136012,1000 +LGBM,LGBM,experimental,False,4,0.9,0.22366666666666665,0.5442333781676438,0.41763732489029837,0.169,0.6603749834789159,1000 +LGBM,LGBM,experimental,False,4,0.95,0.3196666666666667,0.6484940683567701,0.41763732489029837,0.244,0.7587312838186443,1000 +LGBM,LGBM,experimental,False,6,0.9,0.9083333333333333,0.5395528030415373,0.12968510473975978,0.901,0.6561014307587926,1000 +LGBM,LGBM,experimental,False,6,0.95,0.9543333333333334,0.6429168190965395,0.12968510473975978,0.951,0.7523477661079653,1000 +LGBM,LGBM,experimental,True,1,0.9,0.10733333333333332,0.6743902742947253,0.5864355668337375,0.066,0.8000182338498814,1000 +LGBM,LGBM,experimental,True,1,0.95,0.1713333333333333,0.8035855759344999,0.5864355668337375,0.123,0.9238506660612901,1000 +LGBM,LGBM,experimental,True,4,0.9,0.23166666666666666,0.5441212033941374,0.4171381557101547,0.17,0.6607250720722284,1000 +LGBM,LGBM,experimental,True,4,0.95,0.3196666666666667,0.6483604038698857,0.4171381557101547,0.245,0.7579132011887949,1000 +LGBM,LGBM,experimental,True,6,0.9,0.9063333333333333,0.5394904332086611,0.12863612300950375,0.903,0.6565743997497494,1000 +LGBM,LGBM,experimental,True,6,0.95,0.9523333333333334,0.6428425008568152,0.12863612300950375,0.955,0.7532450411959063,1000 +LGBM,LGBM,observational,False,1,0.9,0.8943333333333334,2.905893095599295,0.7648921426349597,0.92,3.588646368039136,1000 +LGBM,LGBM,observational,False,1,0.95,0.9563333333333334,3.462585191154069,0.7648921426349597,0.975,4.0996633280531105,1000 +LGBM,LGBM,observational,False,4,0.9,0.8876666666666666,3.9146026798923885,1.1190311469389873,0.92,4.790575517259599,1000 +LGBM,LGBM,observational,False,4,0.95,0.963,4.664536795649732,1.1190311469389873,0.982,5.486504879391152,1000 +LGBM,LGBM,observational,False,6,0.9,0.942,2.009962087567071,0.4418856843130645,0.958,2.5103783382326825,1000 +LGBM,LGBM,observational,False,6,0.95,0.9816666666666666,2.3950175489011016,0.4418856843130645,0.984,2.8615887060271743,1000 +LGBM,LGBM,observational,True,1,0.9,0.9303333333333333,1.0974116056549843,0.25912148830825843,0.938,1.3607720502797749,1000 +LGBM,LGBM,observational,True,1,0.95,0.969,1.3076465820769951,0.25912148830825843,0.978,1.5521920303181904,1000 +LGBM,LGBM,observational,True,4,0.9,0.9416666666666667,1.472333292909054,0.3205121679339935,0.94,1.8014934435044807,1000 +LGBM,LGBM,observational,True,4,0.95,0.9743333333333334,1.7543933271979495,0.3205121679339935,0.98,2.0658871704252246,1000 +LGBM,LGBM,observational,True,6,0.9,0.915,0.9286745626922529,0.21897181277799815,0.92,1.15681026947425,1000 +LGBM,LGBM,observational,True,6,0.95,0.9626666666666667,1.1065839941081885,0.21897181277799815,0.96,1.3188454688519913,1000 +Linear,Linear,experimental,False,1,0.9,0.7993333333333333,0.24424430193356436,0.07551069080931783,0.741,0.3130913040114941,1000 +Linear,Linear,experimental,False,1,0.95,0.8723333333333334,0.2910350364160617,0.07551069080931783,0.838,0.3538500363992679,1000 +Linear,Linear,experimental,False,4,0.9,0.036333333333333336,0.9660507125397605,1.0827206081770897,0.031,1.107819485412717,1000 +Linear,Linear,experimental,False,4,0.95,0.06233333333333333,1.151120423600494,1.0827206081770897,0.05,1.287625024067252,1000 +Linear,Linear,experimental,False,6,0.9,0.8896666666666666,0.9631043832739674,0.2382471311709886,0.887,1.1078250173884234,1000 +Linear,Linear,experimental,False,6,0.95,0.9476666666666667,1.1476096557407096,0.2382471311709886,0.946,1.2863233234339295,1000 +Linear,Linear,experimental,True,1,0.9,0.8,0.2442583284424631,0.07557199890938014,0.732,0.3129294069731057,1000 +Linear,Linear,experimental,True,1,0.95,0.8703333333333334,0.2910517500322886,0.07557199890938014,0.839,0.35392920047397675,1000 +Linear,Linear,experimental,True,4,0.9,0.036333333333333336,0.9660295319926757,1.0828776638271536,0.031,1.1077283731317225,1000 +Linear,Linear,experimental,True,4,0.95,0.063,1.1510951854219846,1.0828776638271536,0.047,1.2867549199317392,1000 +Linear,Linear,experimental,True,6,0.9,0.888,0.9631437707318972,0.23828269404302604,0.885,1.107258053590484,1000 +Linear,Linear,experimental,True,6,0.95,0.9483333333333334,1.1476565887916024,0.23828269404302604,0.949,1.2877831442682166,1000 +Linear,Linear,observational,False,1,0.9,0.8906666666666666,0.2745349354396546,0.06791772384944492,0.877,0.35207829288672793,1000 +Linear,Linear,observational,False,1,0.95,0.94,0.3271285524396554,0.06791772384944492,0.927,0.3973383284293281,1000 +Linear,Linear,observational,False,4,0.9,0.17166666666666666,1.3453667150527824,1.069526476442094,0.148,1.5155288354203724,1000 +Linear,Linear,observational,False,4,0.95,0.2553333333333333,1.6031033183113808,1.069526476442094,0.227,1.76788776355175,1000 +Linear,Linear,observational,False,6,0.9,0.8876666666666666,1.0115696911437715,0.2500537801037969,0.885,1.1646692593828614,1000 +Linear,Linear,observational,False,6,0.95,0.947,1.2053596320109472,0.2500537801037969,0.945,1.3520516734344188,1000 +Linear,Linear,observational,True,1,0.9,0.8873333333333334,0.2723311152982007,0.06788449126443423,0.87,0.34906917904913193,1000 +Linear,Linear,observational,True,1,0.95,0.9333333333333333,0.32450253877200813,0.06788449126443423,0.922,0.39431076453237734,1000 +Linear,Linear,observational,True,4,0.9,0.16133333333333336,1.3452145611861124,1.0697056322506917,0.131,1.5155973414877166,1000 +Linear,Linear,observational,True,4,0.95,0.24866666666666665,1.6029220157967403,1.0697056322506917,0.221,1.7687727143970222,1000 +Linear,Linear,observational,True,6,0.9,0.8863333333333334,1.0032499571751785,0.24871625835196373,0.882,1.1544090742288704,1000 +Linear,Linear,observational,True,6,0.95,0.9433333333333334,1.1954460575309986,0.24871625835196373,0.939,1.340743500935446,1000 diff --git a/results/did/did_pa_multi_config.yml b/results/did/did_pa_multi_config.yml index 944e713..fa87158 100644 --- a/results/did/did_pa_multi_config.yml +++ b/results/did/did_pa_multi_config.yml @@ -8,7 +8,7 @@ dgp_parameters: - 4 - 6 n_obs: - - 500 + - 2000 dml_parameters: in_sample_normalization: - true @@ -61,12 +61,12 @@ dml_parameters: class_weight: null colsample_bytree: 1.0 importance_type: split - learning_rate: 0.05 + learning_rate: 0.02 max_depth: -1 min_child_samples: 20 min_child_weight: 0.001 min_split_gain: 0.0 - n_estimators: 100 + n_estimators: 500 n_jobs: 1 num_leaves: 31 objective: null @@ -97,12 +97,12 @@ dml_parameters: class_weight: null colsample_bytree: 1.0 importance_type: split - learning_rate: 0.05 + learning_rate: 0.02 max_depth: -1 min_child_samples: 20 min_child_weight: 0.001 min_split_gain: 0.0 - n_estimators: 100 + n_estimators: 500 n_jobs: 1 num_leaves: 31 objective: null diff --git a/scripts/did/did_pa_multi_config.yml b/scripts/did/did_pa_multi_config.yml index 04f11a8..67eead1 100644 --- a/scripts/did/did_pa_multi_config.yml +++ b/scripts/did/did_pa_multi_config.yml @@ -8,7 +8,7 @@ simulation_parameters: dgp_parameters: DGP: [1, 4, 6] # Different DGP specifications - n_obs: [500] # Sample size for each simulation (has to be a list) + n_obs: [2000] # Sample size for each simulation (has to be a list) dml_parameters: # ML methods for ml_g and ml_m From a092f304a13a99b1483d5d81cef8554f6803ce1b Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Mon, 31 Mar 2025 15:56:46 +0200 Subject: [PATCH 40/60] update workflow for uv --- .github/workflows/did_sim.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/did_sim.yml b/.github/workflows/did_sim.yml index 75c3ffc..002fc3d 100644 --- a/.github/workflows/did_sim.yml +++ b/.github/workflows/did_sim.yml @@ -48,20 +48,24 @@ jobs: with: ref: ${{ env.TARGET_BRANCH }} + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + version: "0.6.11" + - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version-file: "monte-cover/pyproject.toml" - - name: Install dependencies + - name: Install Monte-Cover run: | - python -m pip install --upgrade pip - pip install -r requirements.txt + uv sync - name: Install DoubleML from correct branch run: | - pip uninstall -y doubleml - pip install "doubleml @ git+https://github.com/DoubleML/doubleml-for-py@${{ env.DML_BRANCH }}" + uv pip uninstall -y doubleml + uv pip install "doubleml @ git+https://github.com/DoubleML/doubleml-for-py@${{ env.DML_BRANCH }}" - name: Set up Git configuration run: | @@ -69,7 +73,7 @@ jobs: git config --global user.email 'github-actions@github.com' - name: Run scripts - run: python ${{ matrix.script }} + run: uv run python ${{ matrix.script }} - name: Commit any existing changes run: | From 36f80aecaa17c93bb1f0e5981918016d0dd7e293 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Mon, 31 Mar 2025 15:59:14 +0200 Subject: [PATCH 41/60] add multi sim to script --- .github/workflows/did_sim.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/did_sim.yml b/.github/workflows/did_sim.yml index 002fc3d..005daed 100644 --- a/.github/workflows/did_sim.yml +++ b/.github/workflows/did_sim.yml @@ -19,6 +19,7 @@ jobs: script: [ 'scripts/did/did_pa_atte_coverage.py', 'scripts/did/did_cs_atte_coverage.py', + 'scripts/did/did_pa_multi.py', ] steps: From 740277698e653e8f1d8959d73ea681768bb0c67d Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Mon, 31 Mar 2025 16:00:40 +0200 Subject: [PATCH 42/60] add monte-cover dir to workflow --- .github/workflows/did_sim.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/did_sim.yml b/.github/workflows/did_sim.yml index 005daed..09a6406 100644 --- a/.github/workflows/did_sim.yml +++ b/.github/workflows/did_sim.yml @@ -61,6 +61,7 @@ jobs: - name: Install Monte-Cover run: | + cd monte-cover uv sync - name: Install DoubleML from correct branch From 388a3bd4613ffc6240bc84e54c3a251ccef77ed6 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Mon, 31 Mar 2025 16:03:58 +0200 Subject: [PATCH 43/60] fix pip uninstall flag --- .github/workflows/did_sim.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/did_sim.yml b/.github/workflows/did_sim.yml index 09a6406..1bd4f4b 100644 --- a/.github/workflows/did_sim.yml +++ b/.github/workflows/did_sim.yml @@ -66,7 +66,7 @@ jobs: - name: Install DoubleML from correct branch run: | - uv pip uninstall -y doubleml + uv pip uninstall doubleml uv pip install "doubleml @ git+https://github.com/DoubleML/doubleml-for-py@${{ env.DML_BRANCH }}" - name: Set up Git configuration From 8fa15bf4d45b0ee93baa0d32e874b1b8f140c0d3 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Mon, 31 Mar 2025 21:23:05 +0200 Subject: [PATCH 44/60] update uv sync dir --- .github/workflows/did_sim.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/did_sim.yml b/.github/workflows/did_sim.yml index 1bd4f4b..c931de5 100644 --- a/.github/workflows/did_sim.yml +++ b/.github/workflows/did_sim.yml @@ -61,8 +61,7 @@ jobs: - name: Install Monte-Cover run: | - cd monte-cover - uv sync + uv sync --config-file monte-cover/pyproject.toml - name: Install DoubleML from correct branch run: | From 83799984b0b8f573845752a5f56052981247b843 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Mon, 31 Mar 2025 21:27:11 +0200 Subject: [PATCH 45/60] change to project arg --- .github/workflows/did_sim.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/did_sim.yml b/.github/workflows/did_sim.yml index c931de5..e7a5aff 100644 --- a/.github/workflows/did_sim.yml +++ b/.github/workflows/did_sim.yml @@ -61,7 +61,7 @@ jobs: - name: Install Monte-Cover run: | - uv sync --config-file monte-cover/pyproject.toml + uv sync --project monte-cover/pyproject.toml - name: Install DoubleML from correct branch run: | From 40e7869f064b4ac6f19d6dd804b27b2bf811ad11 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Mon, 31 Mar 2025 21:30:18 +0200 Subject: [PATCH 46/60] update venv dir --- .github/workflows/did_sim.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/did_sim.yml b/.github/workflows/did_sim.yml index e7a5aff..b99e01e 100644 --- a/.github/workflows/did_sim.yml +++ b/.github/workflows/did_sim.yml @@ -61,7 +61,7 @@ jobs: - name: Install Monte-Cover run: | - uv sync --project monte-cover/pyproject.toml + uv sync --project monte-cover/pyproject.toml --venv .venv - name: Install DoubleML from correct branch run: | From a1bb0f75d3d35452a362db435dee0f7d06c42324 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Tue, 1 Apr 2025 19:38:33 +0200 Subject: [PATCH 47/60] update workflow --- .github/workflows/did_sim.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/did_sim.yml b/.github/workflows/did_sim.yml index b99e01e..b2fbcbd 100644 --- a/.github/workflows/did_sim.yml +++ b/.github/workflows/did_sim.yml @@ -61,12 +61,13 @@ jobs: - name: Install Monte-Cover run: | - uv sync --project monte-cover/pyproject.toml --venv .venv + uv venv --project monte-cover/pyproject.toml + uv sync --project monte-cover/pyproject.toml - name: Install DoubleML from correct branch run: | - uv pip uninstall doubleml - uv pip install "doubleml @ git+https://github.com/DoubleML/doubleml-for-py@${{ env.DML_BRANCH }}" + uv pip uninstall --project monte-cover/pyproject.toml doubleml + uv pip install --project monte-cover/pyproject.toml "doubleml @ git+https://github.com/DoubleML/doubleml-for-py@${{ env.DML_BRANCH }}" - name: Set up Git configuration run: | @@ -74,7 +75,7 @@ jobs: git config --global user.email 'github-actions@github.com' - name: Run scripts - run: uv run python ${{ matrix.script }} + run: uv run --project monte-cover/pyproject.toml ${{ matrix.script }} - name: Commit any existing changes run: | From ada8c9453617b9331be5766c7893f81d779aa975 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Wed, 2 Apr 2025 20:59:02 +0200 Subject: [PATCH 48/60] update the paths for uv venv --- .github/workflows/did_sim.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/did_sim.yml b/.github/workflows/did_sim.yml index b2fbcbd..c0dc522 100644 --- a/.github/workflows/did_sim.yml +++ b/.github/workflows/did_sim.yml @@ -61,11 +61,13 @@ jobs: - name: Install Monte-Cover run: | - uv venv --project monte-cover/pyproject.toml - uv sync --project monte-cover/pyproject.toml + cd monte-cover + uv venv + uv sync - name: Install DoubleML from correct branch run: | + source monte-cover/.venv/bin/activate uv pip uninstall --project monte-cover/pyproject.toml doubleml uv pip install --project monte-cover/pyproject.toml "doubleml @ git+https://github.com/DoubleML/doubleml-for-py@${{ env.DML_BRANCH }}" @@ -75,7 +77,9 @@ jobs: git config --global user.email 'github-actions@github.com' - name: Run scripts - run: uv run --project monte-cover/pyproject.toml ${{ matrix.script }} + run: | + source monte-cover/.venv/bin/activate + uv run --project monte-cover/pyproject.toml ${{ matrix.script }} - name: Commit any existing changes run: | From 98bc35b261fa69b829137bbc731ebfb9dd801bf7 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Thu, 3 Apr 2025 07:50:20 +0200 Subject: [PATCH 49/60] update script run --- .github/workflows/did_sim.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/did_sim.yml b/.github/workflows/did_sim.yml index c0dc522..159fdb6 100644 --- a/.github/workflows/did_sim.yml +++ b/.github/workflows/did_sim.yml @@ -79,7 +79,7 @@ jobs: - name: Run scripts run: | source monte-cover/.venv/bin/activate - uv run --project monte-cover/pyproject.toml ${{ matrix.script }} + uv run ${{ matrix.script }} - name: Commit any existing changes run: | From c607b341fd85646c92cab3943da50ca9cbf75f7a Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Thu, 3 Apr 2025 08:50:23 +0200 Subject: [PATCH 50/60] update did and plr workflows --- .github/workflows/did_sim.yml | 4 ++-- .github/workflows/plr_sim.yml | 23 ++++++++++++++++------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/did_sim.yml b/.github/workflows/did_sim.yml index 159fdb6..199220d 100644 --- a/.github/workflows/did_sim.yml +++ b/.github/workflows/did_sim.yml @@ -68,8 +68,8 @@ jobs: - name: Install DoubleML from correct branch run: | source monte-cover/.venv/bin/activate - uv pip uninstall --project monte-cover/pyproject.toml doubleml - uv pip install --project monte-cover/pyproject.toml "doubleml @ git+https://github.com/DoubleML/doubleml-for-py@${{ env.DML_BRANCH }}" + uv pip uninstall doubleml + uv pip install "doubleml @ git+https://github.com/DoubleML/doubleml-for-py@${{ env.DML_BRANCH }}" - name: Set up Git configuration run: | diff --git a/.github/workflows/plr_sim.yml b/.github/workflows/plr_sim.yml index 7d95d3c..973a5b4 100644 --- a/.github/workflows/plr_sim.yml +++ b/.github/workflows/plr_sim.yml @@ -50,20 +50,27 @@ jobs: with: ref: ${{ env.TARGET_BRANCH }} + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + version: "0.6.11" + - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version-file: "monte-cover/pyproject.toml" - - name: Install dependencies + - name: Install Monte-Cover run: | - python -m pip install --upgrade pip - pip install -r requirements.txt + cd monte-cover + uv venv + uv sync - name: Install DoubleML from correct branch run: | - pip uninstall -y doubleml - pip install git+https://github.com/DoubleML/doubleml-for-py@${{ env.DML_BRANCH }} + source monte-cover/.venv/bin/activate + uv pip uninstall doubleml + uv pip install "doubleml @ git+https://github.com/DoubleML/doubleml-for-py@${{ env.DML_BRANCH }}" - name: Set up Git configuration run: | @@ -71,7 +78,9 @@ jobs: git config --global user.email 'github-actions@github.com' - name: Run scripts - run: python ${{ matrix.script }} + run: | + source monte-cover/.venv/bin/activate + uv run ${{ matrix.script }} - name: Commit any existing changes run: | From 72123353be77aa59520be126d402f1e16aea7266 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Thu, 24 Apr 2025 09:31:25 +0200 Subject: [PATCH 51/60] change import for did sim --- scripts/did/did_cs_atte_coverage.py | 2 +- scripts/did/did_pa_atte_coverage.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/did/did_cs_atte_coverage.py b/scripts/did/did_cs_atte_coverage.py index 3886ea8..9be682b 100644 --- a/scripts/did/did_cs_atte_coverage.py +++ b/scripts/did/did_cs_atte_coverage.py @@ -7,7 +7,7 @@ from lightgbm import LGBMRegressor, LGBMClassifier import doubleml as dml -from doubleml.datasets import make_did_SZ2020 +from doubleml.did.datasets import make_did_SZ2020 # Number of repetitions n_rep = 1000 diff --git a/scripts/did/did_pa_atte_coverage.py b/scripts/did/did_pa_atte_coverage.py index 5184860..144597a 100644 --- a/scripts/did/did_pa_atte_coverage.py +++ b/scripts/did/did_pa_atte_coverage.py @@ -7,7 +7,7 @@ from lightgbm import LGBMRegressor, LGBMClassifier import doubleml as dml -from doubleml.datasets import make_did_SZ2020 +from doubleml.did.datasets import make_did_SZ2020 # Number of repetitions n_rep = 1000 From 40aa5996ddff478f9a0ffce274bbc0c9e7062762 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 24 Apr 2025 08:14:38 +0000 Subject: [PATCH 52/60] Update results from script: scripts/plm/plr_gate_coverage.py --- results/plm/plr_gate_coverage_metadata.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/results/plm/plr_gate_coverage_metadata.csv b/results/plm/plr_gate_coverage_metadata.csv index febe93f..980af1a 100644 --- a/results/plm/plr_gate_coverage_metadata.csv +++ b/results/plm/plr_gate_coverage_metadata.csv @@ -1,2 +1,2 @@ DoubleML Version,Script,Date,Total Runtime (seconds),Python Version -0.10.dev0,plr_gate_coverage.py,2025-01-08 13:02:47,2835.5379569530487,3.12.8 +0.10.dev0,plr_gate_coverage.py,2025-04-24 08:14:37,1583.488787651062,3.12.3 From 4b0958587e62181749cc092d50e84b8e24c6f009 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 24 Apr 2025 08:56:31 +0000 Subject: [PATCH 53/60] Update results from script: scripts/plm/plr_cate_coverage.py --- results/plm/plr_cate_coverage_metadata.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/results/plm/plr_cate_coverage_metadata.csv b/results/plm/plr_cate_coverage_metadata.csv index 59b490d..9e81be8 100644 --- a/results/plm/plr_cate_coverage_metadata.csv +++ b/results/plm/plr_cate_coverage_metadata.csv @@ -1,2 +1,2 @@ DoubleML Version,Script,Date,Total Runtime (seconds),Python Version -0.10.dev0,plr_cate_coverage.py,2025-01-08 14:25:31,7808.868787527084,3.12.8 +0.10.dev0,plr_cate_coverage.py,2025-04-24 08:56:30,4092.604692697525,3.12.3 From 73dae7a01bf68298ab93cd95d2fb069e768a8129 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 24 Apr 2025 09:36:44 +0000 Subject: [PATCH 54/60] Update results from script: scripts/plm/plr_ate_coverage.py --- results/plm/plr_ate_coverage.csv | 38 ++++++++++------------- results/plm/plr_ate_coverage_metadata.csv | 2 +- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/results/plm/plr_ate_coverage.csv b/results/plm/plr_ate_coverage.csv index f801f58..1346d57 100644 --- a/results/plm/plr_ate_coverage.csv +++ b/results/plm/plr_ate_coverage.csv @@ -1,21 +1,17 @@ -Learner g,Learner m,Score,level,Coverage,CI Length,Bias,repetition -LGBM,LGBM,IV-type,0.9,0.882,0.16071165852972294,0.04006345992726611,1000 -LGBM,LGBM,IV-type,0.95,0.938,0.19149975259363877,0.04006345992726611,1000 -LGBM,LGBM,partialling out,0.9,0.842,0.14721491277053025,0.042110152606416054,1000 -LGBM,LGBM,partialling out,0.95,0.906,0.17541738808225127,0.042110152606416054,1000 -Lasso,Lasso,IV-type,0.9,0.866,0.14050109787041962,0.03660923399902996,1000 -Lasso,Lasso,IV-type,0.95,0.915,0.16741738419894311,0.03660923399902996,1000 -Lasso,Lasso,partialling out,0.9,0.879,0.1474715771739181,0.03630990507775283,1000 -Lasso,Lasso,partialling out,0.95,0.931,0.17572322258236175,0.03630990507775283,1000 -Lasso,Random Forest,IV-type,0.9,0.886,0.1474535680840687,0.03770184842456424,1000 -Lasso,Random Forest,IV-type,0.95,0.939,0.17570176342823354,0.03770184842456424,1000 -Lasso,Random Forest,partialling out,0.9,0.785,0.14384571087180478,0.045773052530728796,1000 -Lasso,Random Forest,partialling out,0.95,0.883,0.17140273640142992,0.045773052530728796,1000 -Random Forest,Lasso,IV-type,0.9,0.879,0.14285466535066815,0.036599158846521436,1000 -Random Forest,Lasso,IV-type,0.95,0.93,0.17022183282640022,0.036599158846521436,1000 -Random Forest,Lasso,partialling out,0.9,0.892,0.15286076950172306,0.03825604774970179,1000 -Random Forest,Lasso,partialling out,0.95,0.939,0.1821448413180263,0.03825604774970179,1000 -Random Forest,Random Forest,IV-type,0.9,0.885,0.15036250130159673,0.037935837399518176,1000 -Random Forest,Random Forest,IV-type,0.95,0.944,0.17916797114809854,0.037935837399518176,1000 -Random Forest,Random Forest,partialling out,0.9,0.881,0.14718055225415835,0.03854156805613427,1000 -Random Forest,Random Forest,partialling out,0.95,0.934,0.17537644500167823,0.03854156805613427,1000 +Learner g,Learner m,score,level,Coverage,CI Length,Bias,repetition +Lasso,Lasso,IV-type,0.9,0.881,0.1393979255576113,0.0352891099128789,1000 +Lasso,Lasso,IV-type,0.95,0.945,0.16610287331091153,0.0352891099128789,1000 +Lasso,Lasso,partialling out,0.9,0.908,0.14646362984437974,0.034686755904342816,1000 +Lasso,Lasso,partialling out,0.95,0.956,0.17452217926042807,0.034686755904342816,1000 +Lasso,Random Forest,IV-type,0.9,0.898,0.14672410325315619,0.036150217819390894,1000 +Lasso,Random Forest,IV-type,0.95,0.954,0.1748325524704008,0.036150217819390894,1000 +Lasso,Random Forest,partialling out,0.9,0.817,0.143330638432391,0.04191262539042403,1000 +Lasso,Random Forest,partialling out,0.95,0.886,0.17078898973477283,0.04191262539042403,1000 +Random Forest,Lasso,IV-type,0.9,0.877,0.141921407652651,0.035804568203505666,1000 +Random Forest,Lasso,IV-type,0.95,0.948,0.16910978768971624,0.035804568203505666,1000 +Random Forest,Lasso,partialling out,0.9,0.903,0.15198241550336503,0.03618790663815028,1000 +Random Forest,Lasso,partialling out,0.95,0.954,0.1810982179746172,0.03618790663815028,1000 +Random Forest,Random Forest,IV-type,0.9,0.907,0.1493755431098695,0.03649624902429271,1000 +Random Forest,Random Forest,IV-type,0.95,0.949,0.1779919379264572,0.03649624902429271,1000 +Random Forest,Random Forest,partialling out,0.9,0.884,0.14638253610723148,0.036967300943126565,1000 +Random Forest,Random Forest,partialling out,0.95,0.942,0.17442555011265587,0.036967300943126565,1000 diff --git a/results/plm/plr_ate_coverage_metadata.csv b/results/plm/plr_ate_coverage_metadata.csv index 8d5c7fd..5d2418e 100644 --- a/results/plm/plr_ate_coverage_metadata.csv +++ b/results/plm/plr_ate_coverage_metadata.csv @@ -1,2 +1,2 @@ DoubleML Version,Script,Date,Total Runtime (seconds),Python Version -0.10.dev0,plr_ate_coverage.py,2025-01-08 14:10:27,6916.502653360367,3.12.8 +0.10.dev0,plr_ate_coverage.py,2025-04-24 09:36:42,6508.21887755394,3.12.3 From 86b0edca9ca5bc20309257854fc747eff2c5344e Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 24 Apr 2025 10:27:16 +0000 Subject: [PATCH 55/60] Update results from script: scripts/plm/plr_ate_sensitivity.py --- results/plm/plr_ate_sensitivity.csv | 26 ++++++++++---------- results/plm/plr_ate_sensitivity_metadata.csv | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/results/plm/plr_ate_sensitivity.csv b/results/plm/plr_ate_sensitivity.csv index 00934b4..7981ab2 100644 --- a/results/plm/plr_ate_sensitivity.csv +++ b/results/plm/plr_ate_sensitivity.csv @@ -1,17 +1,17 @@ Learner g,Learner m,score,level,Coverage,CI Length,Bias,Coverage (Lower),Coverage (Upper),RV,RVa,Bias (Lower),Bias (Upper),repetition LGBM,LGBM,IV-type,0.9,0.49,1.2836841849471865,0.642852034975727,1.0,0.998,0.0883267598773138,0.025200860015212666,1.3451446703513257,0.27137365708627864,500 -LGBM,LGBM,IV-type,0.95,0.65,1.529604050351386,0.642852034975727,1.0,1.0,0.0883267598773138,0.013790413915027113,1.3451446703513257,0.27137365708627864,500 +LGBM,LGBM,IV-type,0.95,0.65,1.529604050351386,0.642852034975727,1.0,1.0,0.0883267598773138,0.013790413915027114,1.3451446703513257,0.27137365708627864,500 LGBM,LGBM,partialling out,0.9,0.052,1.0555526522517718,0.9216896766797483,1.0,0.878,0.12290629723561408,0.0667859903596657,1.6463724503661545,0.2830593598175856,500 LGBM,LGBM,partialling out,0.95,0.114,1.2577685626857555,0.9216896766797483,1.0,0.962,0.12290629723561408,0.05210975377693211,1.6463724503661545,0.2830593598175856,500 -LGBM,Random Forest,IV-type,0.9,0.072,1.1846157067784349,0.9322070273917288,1.0,0.934,0.11754241223304673,0.058515658188839345,1.6980814469560257,0.26726499739118403,500 -LGBM,Random Forest,IV-type,0.95,0.16,1.4115566776050241,0.9322070273917288,1.0,0.994,0.11754241223304673,0.04334326180178758,1.6980814469560257,0.26726499739118403,500 -LGBM,Random Forest,partialling out,0.9,0.078,1.2415314353647366,0.9950962660593035,1.0,0.918,0.11842149116467734,0.06021024644530299,1.8099982510012884,0.29229694861359934,500 -LGBM,Random Forest,partialling out,0.95,0.15,1.479375951220122,0.9950962660593035,1.0,0.98,0.11842149116467734,0.04525082945770369,1.8099982510012884,0.29229694861359934,500 -Random Forest,LGBM,IV-type,0.9,0.554,1.900486623597139,0.8881666888956794,1.0,1.0,0.07201385567825232,0.01814220891090863,2.11967639571274,0.46266796209857214,500 -Random Forest,LGBM,IV-type,0.95,0.746,2.2645694877143114,0.8881666888956794,1.0,1.0,0.07201385567825232,0.008578785415219068,2.11967639571274,0.46266796209857214,500 -Random Forest,LGBM,partialling out,0.9,0.002,1.5126486531347854,1.573242725840773,1.0,0.818,0.12824967172299567,0.08055028818351519,2.774465314925881,0.4031005519125824,500 -Random Forest,LGBM,partialling out,0.95,0.008,1.8024320418722997,1.573242725840773,1.0,0.948,0.12824967172299567,0.06705003584560411,2.774465314925881,0.4031005519125824,500 -Random Forest,Random Forest,IV-type,0.9,0.012,1.7129890288584426,1.6194855098925158,1.0,0.892,0.11959162432568951,0.07060214596391444,2.948463222220921,0.39969580126755805,500 -Random Forest,Random Forest,IV-type,0.95,0.038,2.041152323503278,1.6194855098925158,1.0,0.972,0.11959162432568951,0.05677408319758889,2.948463222220921,0.39969580126755805,500 -Random Forest,Random Forest,partialling out,0.9,0.0,1.7381117353695532,1.7366675645551972,1.0,0.824,0.1281371703134689,0.07833372270549209,3.0610973455175285,0.4635968018257515,500 -Random Forest,Random Forest,partialling out,0.95,0.018,2.0710878746970973,1.7366675645551972,1.0,0.946,0.1281371703134689,0.0642547167440049,3.0610973455175285,0.4635968018257515,500 +LGBM,Random Forest,IV-type,0.9,0.076,1.1831625247072215,0.9308062239804228,1.0,0.946,0.11734274159129685,0.05847446162225632,1.6971412413918896,0.26673626718612453,500 +LGBM,Random Forest,IV-type,0.95,0.15,1.40982510436599,0.9308062239804228,1.0,0.99,0.11734274159129685,0.04330052167462019,1.6971412413918896,0.26673626718612453,500 +LGBM,Random Forest,partialling out,0.9,0.074,1.2408824102177636,0.9969465002467008,1.0,0.93,0.11861197624692194,0.06042868914339051,1.8119621159758381,0.29323133175754634,500 +LGBM,Random Forest,partialling out,0.95,0.148,1.4786025900575936,0.9969465002467008,1.0,0.978,0.11861197624692194,0.04546020549453332,1.8119621159758381,0.29323133175754634,500 +Random Forest,LGBM,IV-type,0.9,0.556,1.9014670092481476,0.8897746033367344,1.0,1.0,0.07211930902619489,0.018402978138876647,2.1220916883044794,0.46567125428407596,500 +Random Forest,LGBM,IV-type,0.95,0.754,2.26573768927064,0.8897746033367344,1.0,1.0,0.07211930902619489,0.008809037433830246,2.1220916883044794,0.46567125428407596,500 +Random Forest,LGBM,partialling out,0.9,0.002,1.5148779135183594,1.5704287430339756,1.0,0.828,0.12800123432195906,0.0802383681199541,2.771929499160999,0.4014709332877519,500 +Random Forest,LGBM,partialling out,0.95,0.01,1.805088369458156,1.5704287430339756,1.0,0.942,0.12800123432195906,0.06673188982925375,2.771929499160999,0.4014709332877519,500 +Random Forest,Random Forest,IV-type,0.9,0.008,1.712740468910975,1.6062309195696611,1.0,0.896,0.11862651936611456,0.06965279743071341,2.9355183176965993,0.3908974740734249,500 +Random Forest,Random Forest,IV-type,0.95,0.042,2.040856146058031,1.6062309195696611,1.0,0.972,0.11862651936611456,0.05582930384773342,2.9355183176965993,0.3908974740734249,500 +Random Forest,Random Forest,partialling out,0.9,0.002,1.7398328179227547,1.738765052841725,1.0,0.826,0.12823635224819166,0.07839810366339917,3.0635620106955765,0.4647217397313531,500 +Random Forest,Random Forest,partialling out,0.95,0.016,2.0731386710496866,1.738765052841725,1.0,0.942,0.12823635224819166,0.06431405001184519,3.0635620106955765,0.4647217397313531,500 diff --git a/results/plm/plr_ate_sensitivity_metadata.csv b/results/plm/plr_ate_sensitivity_metadata.csv index f0d1e74..18d033f 100644 --- a/results/plm/plr_ate_sensitivity_metadata.csv +++ b/results/plm/plr_ate_sensitivity_metadata.csv @@ -1,2 +1,2 @@ DoubleML Version,Script,Date,Total Runtime (seconds),Python Version -0.10.dev0,plr_ate_sensitivity.py,2025-01-08 16:36:12,15659.224347829819,3.12.8 +0.10.dev0,plr_ate_sensitivity.py,2025-04-24 10:27:15,9539.846628665924,3.12.3 From eb1c8789daa8e1e60e6c2c02bf481577eca3bb5e Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 24 Apr 2025 10:30:20 +0000 Subject: [PATCH 56/60] Update results from script: scripts/did/did_pa_atte_coverage.py --- results/did/did_pa_atte_coverage.csv | 48 +++++++++---------- results/did/did_pa_atte_coverage_metadata.csv | 2 +- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/results/did/did_pa_atte_coverage.csv b/results/did/did_pa_atte_coverage.csv index 890866e..9119e34 100644 --- a/results/did/did_pa_atte_coverage.csv +++ b/results/did/did_pa_atte_coverage.csv @@ -1,16 +1,16 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,repetition -LGBM,LGBM,experimental,False,1,0.9,0.051,2.162461753688773,2.169737683875206,1000 -LGBM,LGBM,experimental,False,1,0.95,0.094,2.576732109002647,2.169737683875206,1000 -LGBM,LGBM,experimental,False,2,0.9,0.377,2.1295044728560635,1.3213439323325022,1000 -LGBM,LGBM,experimental,False,2,0.95,0.475,2.5374610867049356,1.3213439323325022,1000 -LGBM,LGBM,experimental,False,3,0.9,0.47,1.8796286302073664,1.0014962629759643,1000 -LGBM,LGBM,experimental,False,3,0.95,0.584,2.239715655638386,1.0014962629759643,1000 -LGBM,LGBM,experimental,False,4,0.9,0.078,1.883011293050954,1.9173640236877347,1000 -LGBM,LGBM,experimental,False,4,0.95,0.122,2.243746347024319,1.9173640236877347,1000 -LGBM,LGBM,experimental,False,5,0.9,0.889,2.0642730548921726,0.5209994874770714,1000 -LGBM,LGBM,experimental,False,5,0.95,0.951,2.4597330580373264,0.5209994874770714,1000 -LGBM,LGBM,experimental,False,6,0.9,0.908,1.808638762699564,0.43376612813148785,1000 -LGBM,LGBM,experimental,False,6,0.95,0.948,2.155126011123672,0.43376612813148785,1000 +LGBM,LGBM,experimental,False,1,0.9,0.051,2.1624651397785515,2.1697505905302976,1000 +LGBM,LGBM,experimental,False,1,0.95,0.094,2.576736143777478,2.1697505905302976,1000 +LGBM,LGBM,experimental,False,2,0.9,0.378,2.1294819852681166,1.3213007503499328,1000 +LGBM,LGBM,experimental,False,2,0.95,0.475,2.537434291091179,1.3213007503499328,1000 +LGBM,LGBM,experimental,False,3,0.9,0.47,1.8796188347464011,1.0014962844281858,1000 +LGBM,LGBM,experimental,False,3,0.95,0.583,2.239703983626731,1.0014962844281858,1000 +LGBM,LGBM,experimental,False,4,0.9,0.078,1.8830006248174618,1.9173419242712182,1000 +LGBM,LGBM,experimental,False,4,0.95,0.122,2.243733635040054,1.9173419242712182,1000 +LGBM,LGBM,experimental,False,5,0.9,0.889,2.0642395778601936,0.5210006870170777,1000 +LGBM,LGBM,experimental,False,5,0.95,0.951,2.459693167693339,0.5210006870170777,1000 +LGBM,LGBM,experimental,False,6,0.9,0.908,1.8086231900602612,0.4337431389507495,1000 +LGBM,LGBM,experimental,False,6,0.95,0.948,2.1551074551794365,0.4337431389507495,1000 LGBM,LGBM,experimental,True,1,0.9,0.049,2.159654648685151,2.17137681706751,1000 LGBM,LGBM,experimental,True,1,0.95,0.099,2.573387237083486,2.17137681706751,1000 LGBM,LGBM,experimental,True,2,0.9,0.373,2.129643042411216,1.319771507009933,1000 @@ -23,18 +23,18 @@ LGBM,LGBM,experimental,True,5,0.9,0.891,2.063666189492902,0.5200351889316859,100 LGBM,LGBM,experimental,True,5,0.95,0.947,2.459009933312703,0.5200351889316859,1000 LGBM,LGBM,experimental,True,6,0.9,0.897,1.8093537325759845,0.43669034939483387,1000 LGBM,LGBM,experimental,True,6,0.95,0.944,2.1559779502779253,0.43669034939483387,1000 -LGBM,LGBM,observational,False,1,0.9,0.893,12.590352220156928,3.3786016989727083,1000 -LGBM,LGBM,observational,False,1,0.95,0.953,15.002329994503222,3.3786016989727083,1000 -LGBM,LGBM,observational,False,2,0.9,0.914,14.716998683865025,3.6220054403232314,1000 -LGBM,LGBM,observational,False,2,0.95,0.966,17.536385553259827,3.6220054403232314,1000 -LGBM,LGBM,observational,False,3,0.9,0.933,14.387779381623973,3.413493039888865,1000 -LGBM,LGBM,observational,False,3,0.95,0.977,17.144096558765057,3.413493039888865,1000 -LGBM,LGBM,observational,False,4,0.9,0.842,18.12890407178146,5.76469995432725,1000 -LGBM,LGBM,observational,False,4,0.95,0.932,21.60192157993247,5.76469995432725,1000 -LGBM,LGBM,observational,False,5,0.9,0.917,7.704461439047936,1.901354597911667,1000 -LGBM,LGBM,observational,False,5,0.95,0.96,9.18043204172422,1.901354597911667,1000 -LGBM,LGBM,observational,False,6,0.9,0.922,7.569503728862976,1.7987540722258704,1000 -LGBM,LGBM,observational,False,6,0.95,0.972,9.019620011362129,1.7987540722258704,1000 +LGBM,LGBM,observational,False,1,0.9,0.893,12.590652453419517,3.3787304616783773,1000 +LGBM,LGBM,observational,False,1,0.95,0.953,15.002687744501154,3.3787304616783773,1000 +LGBM,LGBM,observational,False,2,0.9,0.914,14.716645515368727,3.622038823656133,1000 +LGBM,LGBM,observational,False,2,0.95,0.966,17.535964727040476,3.622038823656133,1000 +LGBM,LGBM,observational,False,3,0.9,0.933,14.387879061625718,3.413516510279929,1000 +LGBM,LGBM,observational,False,3,0.95,0.977,17.14421533481309,3.413516510279929,1000 +LGBM,LGBM,observational,False,4,0.9,0.843,18.129751335736472,5.765050835726839,1000 +LGBM,LGBM,observational,False,4,0.95,0.932,21.602931157204278,5.765050835726839,1000 +LGBM,LGBM,observational,False,5,0.9,0.917,7.704465948378402,1.901185439754437,1000 +LGBM,LGBM,observational,False,5,0.95,0.96,9.180437414922883,1.901185439754437,1000 +LGBM,LGBM,observational,False,6,0.9,0.922,7.569553123736534,1.7987428999886972,1000 +LGBM,LGBM,observational,False,6,0.95,0.971,9.019678868984235,1.7987428999886972,1000 LGBM,LGBM,observational,True,1,0.9,0.906,4.1677645580041025,1.0303464962408189,1000 LGBM,LGBM,observational,True,1,0.95,0.967,4.966197779476664,1.0303464962408189,1000 LGBM,LGBM,observational,True,2,0.9,0.917,5.020279353776863,1.2235227285733399,1000 diff --git a/results/did/did_pa_atte_coverage_metadata.csv b/results/did/did_pa_atte_coverage_metadata.csv index 65f1786..1e59764 100644 --- a/results/did/did_pa_atte_coverage_metadata.csv +++ b/results/did/did_pa_atte_coverage_metadata.csv @@ -1,2 +1,2 @@ DoubleML Version,Script,Date,Total Runtime (seconds),Python Version -0.10.dev0,did_pa_atte_coverage.py,2025-01-08 16:22:26,14811.1988697052,3.12.8 +0.10.dev0,did_pa_atte_coverage.py,2025-04-24 10:30:16,10597.874007225037,3.12.3 From ad393a562c3b33140c36089534d44db0859a3124 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 24 Apr 2025 11:00:28 +0000 Subject: [PATCH 57/60] Update results from script: scripts/did/did_cs_atte_coverage.py --- results/did/did_cs_atte_coverage_metadata.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/results/did/did_cs_atte_coverage_metadata.csv b/results/did/did_cs_atte_coverage_metadata.csv index d6308e5..286a49b 100644 --- a/results/did/did_cs_atte_coverage_metadata.csv +++ b/results/did/did_cs_atte_coverage_metadata.csv @@ -1,2 +1,2 @@ DoubleML Version,Script,Date,Total Runtime (seconds),Python Version -0.10.dev0,did_cs_atte_coverage.py,2025-01-08 16:52:06,16598.133431196213,3.12.8 +0.10.dev0,did_cs_atte_coverage.py,2025-04-24 11:00:22,12399.906484365463,3.12.3 From 14dfe0db546b4920ea3eedae5c1fff961ebbbdb1 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 24 Apr 2025 13:16:12 +0000 Subject: [PATCH 58/60] Update results from script: scripts/did/did_pa_multi.py --- results/did/did_multi_detailed.csv | 96 ++++++++++++++-------------- results/did/did_multi_eventstudy.csv | 96 ++++++++++++++-------------- results/did/did_multi_group.csv | 96 ++++++++++++++-------------- results/did/did_multi_metadata.csv | 2 +- results/did/did_multi_time.csv | 96 ++++++++++++++-------------- 5 files changed, 193 insertions(+), 193 deletions(-) diff --git a/results/did/did_multi_detailed.csv b/results/did/did_multi_detailed.csv index e584ef5..5b60263 100644 --- a/results/did/did_multi_detailed.csv +++ b/results/did/did_multi_detailed.csv @@ -1,49 +1,49 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -LGBM,LGBM,experimental,False,1,0.9,0.3929166666666667,0.6687029507520728,0.4569473540080381,0.066,1.0019963477166332,1000 -LGBM,LGBM,experimental,False,1,0.95,0.48991666666666667,0.7968087119452796,0.4569473540080381,0.131,1.1107772389821786,1000 -LGBM,LGBM,experimental,False,4,0.9,0.5314166666666666,0.5827863000707186,0.32927572636155183,0.206,0.8969333386170385,1000 -LGBM,LGBM,experimental,False,4,0.95,0.6208333333333333,0.6944327082397956,0.32927572636155183,0.298,0.9870085765972824,1000 -LGBM,LGBM,experimental,False,6,0.9,0.8985833333333334,0.5798291764546274,0.1415015522676616,0.902,0.8926496847901934,1000 -LGBM,LGBM,experimental,False,6,0.95,0.9505,0.6909090781183035,0.1415015522676616,0.94,0.9826119522997802,1000 -LGBM,LGBM,experimental,True,1,0.9,0.3985833333333333,0.6685234379502083,0.4558614977424509,0.073,1.0027027615662685,1000 -LGBM,LGBM,experimental,True,1,0.95,0.49141666666666667,0.7965948092486183,0.4558614977424509,0.14,1.1116972038295265,1000 -LGBM,LGBM,experimental,True,4,0.9,0.529,0.5827218897275354,0.3290643441251289,0.21,0.8975401350497161,1000 -LGBM,LGBM,experimental,True,4,0.95,0.6195833333333334,0.6943559585820737,0.3290643441251289,0.286,0.988165661809689,1000 -LGBM,LGBM,experimental,True,6,0.9,0.9005833333333334,0.5798357897778391,0.14062961792513812,0.903,0.8920158735259474,1000 -LGBM,LGBM,experimental,True,6,0.95,0.9526666666666667,0.6909169583789544,0.14062961792513812,0.946,0.9820497847451054,1000 -LGBM,LGBM,observational,False,1,0.9,0.91325,2.7335893497080668,0.7032100492915742,0.97,4.24966855110796,1000 -LGBM,LGBM,observational,False,1,0.95,0.9674166666666666,3.2572726145121886,0.7032100492915742,0.989,4.665238891989982,1000 -LGBM,LGBM,observational,False,4,0.9,0.9081666666666667,3.502596227758532,0.9581715859756315,0.97,5.396052160776311,1000 -LGBM,LGBM,observational,False,4,0.95,0.9659166666666666,4.173600827640763,0.9581715859756315,0.991,5.937512318038689,1000 -LGBM,LGBM,observational,False,6,0.9,0.9283333333333333,2.171679918677507,0.507690184177682,0.966,3.389992202359619,1000 -LGBM,LGBM,observational,False,6,0.95,0.9716666666666667,2.5877162300730143,0.507690184177682,0.986,3.7190046001183736,1000 -LGBM,LGBM,observational,True,1,0.9,0.9136666666666666,1.1116368737676119,0.26925529063955034,0.94,1.7337204258041814,1000 -LGBM,LGBM,observational,True,1,0.95,0.95975,1.3245970345150337,0.26925529063955034,0.979,1.901763207693331,1000 -LGBM,LGBM,observational,True,4,0.9,0.9205,1.415253033640148,0.329332847066125,0.923,2.1884940627932736,1000 -LGBM,LGBM,observational,True,4,0.95,0.964,1.6863780031823952,0.329332847066125,0.964,2.405714926928363,1000 -LGBM,LGBM,observational,True,6,0.9,0.9066666666666666,1.0240923600589003,0.2484225935648514,0.917,1.6017734165577624,1000 -LGBM,LGBM,observational,True,6,0.95,0.9585833333333333,1.220281312373145,0.2484225935648514,0.961,1.7565712317977673,1000 -Linear,Linear,experimental,False,1,0.9,0.8515,0.29472504253429116,0.0813922749648889,0.765,0.45946653721752106,1000 -Linear,Linear,experimental,False,1,0.95,0.9171666666666666,0.35118654890882184,0.0813922749648889,0.861,0.5047523635861321,1000 -Linear,Linear,experimental,False,4,0.9,0.30075,0.975812057155266,0.8193739142204116,0.036,1.4138427377009106,1000 -Linear,Linear,experimental,False,4,0.95,0.3815,1.1627517831169838,0.8193739142204116,0.067,1.57605877958281,1000 -Linear,Linear,experimental,False,6,0.9,0.89825,0.9829577849827824,0.24024745112751242,0.91,1.4202537375432176,1000 -Linear,Linear,experimental,False,6,0.95,0.9493333333333334,1.1712664429966075,0.24024745112751242,0.951,1.5831655301216463,1000 -Linear,Linear,experimental,True,1,0.9,0.8509166666666667,0.2947253078468344,0.08140709028680689,0.762,0.4593988323351278,1000 -Linear,Linear,experimental,True,1,0.95,0.91725,0.3511868650482161,0.08140709028680689,0.864,0.5042913385772815,1000 -Linear,Linear,experimental,True,4,0.9,0.3020833333333333,0.9757488994792876,0.819502522016252,0.039,1.412809617036458,1000 -Linear,Linear,experimental,True,4,0.95,0.3835,1.1626765261043008,0.819502522016252,0.065,1.5757772289647831,1000 -Linear,Linear,experimental,True,6,0.9,0.897,0.9830229866645744,0.24034574478609086,0.908,1.420394273430355,1000 -Linear,Linear,experimental,True,6,0.95,0.9499166666666666,1.171344135592441,0.24034574478609086,0.956,1.5848182567435658,1000 -Linear,Linear,observational,False,1,0.9,0.8973333333333333,0.3186240551118928,0.0778003450354372,0.89,0.49548723415593937,1000 -Linear,Linear,observational,False,1,0.95,0.9491666666666666,0.379663978845845,0.0778003450354372,0.946,0.5446256028987391,1000 -Linear,Linear,observational,False,4,0.9,0.4170833333333333,1.2358847166873828,0.8010746877401096,0.182,1.7662191422551763,1000 -Linear,Linear,observational,False,4,0.95,0.5161666666666667,1.4726474709121475,0.8010746877401096,0.274,1.9752694540622302,1000 -Linear,Linear,observational,False,6,0.9,0.8986666666666666,1.0267086469519957,0.25326747402342975,0.903,1.4829059870672159,1000 -Linear,Linear,observational,False,6,0.95,0.948,1.223398810489494,0.25326747402342975,0.958,1.654277564832196,1000 -Linear,Linear,observational,True,1,0.9,0.8955,0.316626811484083,0.07772309002866071,0.884,0.4926269679922508,1000 -Linear,Linear,observational,True,1,0.95,0.9470833333333334,0.37728411627648417,0.07772309002866071,0.941,0.5413306341435754,1000 -Linear,Linear,observational,True,4,0.9,0.4099166666666667,1.2341893457828894,0.801242331888525,0.186,1.7648003716701655,1000 -Linear,Linear,observational,True,4,0.95,0.5141666666666667,1.470627311878664,0.801242331888525,0.282,1.9736066482922592,1000 -Linear,Linear,observational,True,6,0.9,0.8946666666666666,1.0202628382324073,0.2515765758933131,0.89,1.4739361431017262,1000 -Linear,Linear,observational,True,6,0.95,0.9469166666666666,1.2157181556673127,0.2515765758933131,0.955,1.6441941273713205,1000 +LGBM,LGBM,experimental,False,1,0.9,0.40532081377151796,0.6677253898222073,0.45051314831034145,0.08450704225352113,1.0005469053604612,213 +LGBM,LGBM,experimental,False,1,0.95,0.5007824726134585,0.7956438762517957,0.45051314831034145,0.15492957746478872,1.1095167204679879,213 +LGBM,LGBM,experimental,False,4,0.9,0.548904538341158,0.5814196300250507,0.3237627211845255,0.24413145539906103,0.8948945048168284,213 +LGBM,LGBM,experimental,False,4,0.95,0.6381064162754303,0.6928042204373742,0.3237627211845255,0.3333333333333333,0.9852933278894489,213 +LGBM,LGBM,experimental,False,6,0.9,0.8974960876369327,0.5798375844479007,0.14088912748925403,0.8685446009389671,0.8915452790934116,213 +LGBM,LGBM,experimental,False,6,0.95,0.9464006259780908,0.6909190968602316,0.14088912748925403,0.9436619718309859,0.9825229360947381,213 +LGBM,LGBM,experimental,True,1,0.9,0.4123630672926447,0.6676885234807931,0.4519262895879074,0.06103286384976526,1.0019752546929692,213 +LGBM,LGBM,experimental,True,1,0.95,0.5066510172143975,0.7955999472965198,0.4519262895879074,0.1596244131455399,1.1110236525840373,213 +LGBM,LGBM,experimental,True,4,0.9,0.548904538341158,0.5813589039575363,0.3235983019273521,0.22065727699530516,0.8953221615501692,213 +LGBM,LGBM,experimental,True,4,0.95,0.63302034428795,0.6927318608648866,0.3235983019273521,0.3333333333333333,0.9865207873010946,213 +LGBM,LGBM,experimental,True,6,0.9,0.8959311424100157,0.5799660631056092,0.14000216987912564,0.892018779342723,0.892440611190863,213 +LGBM,LGBM,experimental,True,6,0.95,0.9471830985915493,0.6910721886233918,0.14000216987912564,0.9389671361502347,0.9816012226010797,213 +LGBM,LGBM,observational,False,1,0.9,0.9080594679186228,2.7888919178439227,0.7035607423224498,0.9483568075117371,4.334054524286509,213 +LGBM,LGBM,observational,False,1,0.95,0.9636150234741784,3.3231696888918334,0.7035607423224498,0.971830985915493,4.758567521024827,213 +LGBM,LGBM,observational,False,4,0.9,0.8986697965571204,3.4956058606970917,0.9669737969666872,0.9624413145539906,5.377062497216683,213 +LGBM,LGBM,observational,False,4,0.95,0.9643974960876369,4.165271291532112,0.9669737969666872,0.9859154929577465,5.921434465221159,213 +LGBM,LGBM,observational,False,6,0.9,0.9225352112676056,2.190208929252288,0.5167519307047893,0.9671361502347418,3.4154051265476033,213 +LGBM,LGBM,observational,False,6,0.95,0.969092331768388,2.6097949079569784,0.5167519307047893,0.9859154929577465,3.7483564185778286,213 +LGBM,LGBM,observational,True,1,0.9,0.9064945226917058,1.1368726933892221,0.2783026371207721,0.9389671361502347,1.7717588062983114,213 +LGBM,LGBM,observational,True,1,0.95,0.9620500782472613,1.3546673682932289,0.2783026371207721,0.9671361502347418,1.9429676563761076,213 +LGBM,LGBM,observational,True,4,0.9,0.9158841940532082,1.4254308754317884,0.33866283883400894,0.9014084507042254,2.202675700642339,213 +LGBM,LGBM,observational,True,4,0.95,0.9616588419405321,1.6985056496945854,0.33866283883400894,0.9530516431924883,2.421762282833961,213 +LGBM,LGBM,observational,True,6,0.9,0.9151017214397495,1.0463068305990617,0.24826243692564173,0.92018779342723,1.636975223567781,213 +LGBM,LGBM,observational,True,6,0.95,0.9604851330203443,1.246751486667643,0.24826243692564173,0.9765258215962441,1.7956888077887063,213 +Linear,Linear,experimental,False,1,0.9,0.8615023474178404,0.29480782482194634,0.0786421880740863,0.812206572769953,0.45940764438954385,213 +Linear,Linear,experimental,False,1,0.95,0.926056338028169,0.3512851900886226,0.0786421880740863,0.8826291079812206,0.5045899270443839,213 +Linear,Linear,experimental,False,4,0.9,0.28482003129890454,0.975894733280616,0.8330978501200553,0.018779342723004695,1.412718271492504,213 +Linear,Linear,experimental,False,4,0.95,0.3658059467918623,1.1628502977965955,0.8330978501200553,0.07511737089201878,1.575365705490123,213 +Linear,Linear,experimental,False,6,0.9,0.9049295774647887,0.9845361877515872,0.23869850791621902,0.8967136150234741,1.4224342348752608,213 +Linear,Linear,experimental,False,6,0.95,0.9483568075117371,1.17314722589988,0.23869850791621902,0.9530516431924883,1.5861522128436303,213 +Linear,Linear,experimental,True,1,0.9,0.8630672926447575,0.2947851759266125,0.07861158483452843,0.812206572769953,0.4597746703234241,213 +Linear,Linear,experimental,True,1,0.95,0.9264475743348983,0.35125820226525856,0.07861158483452843,0.892018779342723,0.5049192522960325,213 +Linear,Linear,experimental,True,4,0.9,0.2895148669796557,0.9759084550161325,0.8326923121552289,0.023474178403755867,1.4121969723711594,213 +Linear,Linear,experimental,True,4,0.95,0.365414710485133,1.1628666482529382,0.8326923121552289,0.07042253521126761,1.5761780385299982,213 +Linear,Linear,experimental,True,6,0.9,0.8986697965571204,0.9845444925351251,0.23872704179656282,0.892018779342723,1.4218091878908978,213 +Linear,Linear,experimental,True,6,0.95,0.9483568075117371,1.1731571216598229,0.23872704179656282,0.9483568075117371,1.5857684237069227,213 +Linear,Linear,observational,False,1,0.9,0.9119718309859155,0.31913264481306997,0.07504846382409917,0.9530516431924883,0.4966577096852585,213 +Linear,Linear,observational,False,1,0.95,0.9581377151799687,0.3802700008534462,0.07504846382409917,0.971830985915493,0.5457965923475415,213 +Linear,Linear,observational,False,4,0.9,0.4061032863849765,1.2274527144295637,0.8093030821575489,0.17370892018779344,1.7566478372130891,213 +Linear,Linear,observational,False,4,0.95,0.5093896713615024,1.4626001205144619,0.8093030821575489,0.27699530516431925,1.9631223954139048,213 +Linear,Linear,observational,False,6,0.9,0.9021909233176838,1.0316221276603512,0.24917990085463324,0.9061032863849765,1.488738970418394,213 +Linear,Linear,observational,False,6,0.95,0.954225352112676,1.2292535838683007,0.24917990085463324,0.9342723004694836,1.6622175036443294,213 +Linear,Linear,observational,True,1,0.9,0.9092331768388106,0.3171256867784898,0.07481042183312375,0.9248826291079812,0.493585500375777,213 +Linear,Linear,observational,True,1,0.95,0.9585289514866979,0.377878562854461,0.07481042183312375,0.9671361502347418,0.5423776539443926,213 +Linear,Linear,observational,True,4,0.9,0.3974960876369327,1.2240896932129774,0.8120340183488837,0.16901408450704225,1.7523471284937546,213 +Linear,Linear,observational,True,4,0.95,0.5003912363067292,1.4585928335706568,0.8120340183488837,0.27230046948356806,1.9580510608715704,213 +Linear,Linear,observational,True,6,0.9,0.9025821596244131,1.0267883142861962,0.25013308990604005,0.8967136150234741,1.4811458752504516,213 +Linear,Linear,observational,True,6,0.95,0.9503129890453834,1.223493739973321,0.25013308990604005,0.9483568075117371,1.6532118883170046,213 diff --git a/results/did/did_multi_eventstudy.csv b/results/did/did_multi_eventstudy.csv index 43df8e7..4fa42e2 100644 --- a/results/did/did_multi_eventstudy.csv +++ b/results/did/did_multi_eventstudy.csv @@ -1,49 +1,49 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -LGBM,LGBM,experimental,False,1,0.9,0.2625,0.6636959506532898,0.529022005216395,0.07,0.8721728991362343,1000 -LGBM,LGBM,experimental,False,1,0.95,0.3531666666666667,0.7908425033395988,0.529022005216395,0.127,0.9892636939270536,1000 -LGBM,LGBM,experimental,False,4,0.9,0.3831666666666667,0.541559021624367,0.3761992354288148,0.184,0.7380907993716206,1000 -LGBM,LGBM,experimental,False,4,0.95,0.47683333333333333,0.6453073759844181,0.3761992354288148,0.267,0.8297125623699999,1000 -LGBM,LGBM,experimental,False,6,0.9,0.8986666666666666,0.5396931934137096,0.131798775847129,0.898,0.7343817962892296,1000 -LGBM,LGBM,experimental,False,6,0.95,0.9496666666666667,0.6430841045429312,0.131798775847129,0.948,0.8266988306227046,1000 -LGBM,LGBM,experimental,True,1,0.9,0.261,0.6635055839191404,0.527087926313856,0.076,0.8721274126896164,1000 -LGBM,LGBM,experimental,True,1,0.95,0.352,0.7906156673849134,0.527087926313856,0.131,0.9888732855604295,1000 -LGBM,LGBM,experimental,True,4,0.9,0.38716666666666666,0.5414471271756258,0.3759746162522699,0.183,0.7373893229557413,1000 -LGBM,LGBM,experimental,True,4,0.95,0.4735,0.645174045525094,0.3759746162522699,0.271,0.8297110623941906,1000 -LGBM,LGBM,experimental,True,6,0.9,0.8998333333333334,0.539700022468657,0.13058202268620273,0.903,0.7344364378985526,1000 -LGBM,LGBM,experimental,True,6,0.95,0.9515,0.6430922418638007,0.13058202268620273,0.962,0.8263517532644528,1000 -LGBM,LGBM,observational,False,1,0.9,0.9028333333333334,2.6579867264169623,0.6972663134429383,0.935,3.6873569402706985,1000 -LGBM,LGBM,observational,False,1,0.95,0.961,3.1671865324685577,0.6972663134429383,0.98,4.130308764277612,1000 -LGBM,LGBM,observational,False,4,0.9,0.8981666666666667,3.540948175817156,1.0058202037947572,0.948,4.850270140870862,1000 -LGBM,LGBM,observational,False,4,0.95,0.9651666666666666,4.2192999924176116,1.0058202037947572,0.981,5.4512619973747745,1000 -LGBM,LGBM,observational,False,6,0.9,0.933,2.037060701928239,0.4598193308854795,0.964,2.8400894320026713,1000 -LGBM,LGBM,observational,False,6,0.95,0.9726666666666667,2.427307539517024,0.4598193308854795,0.989,3.1739017288171176,1000 -LGBM,LGBM,observational,True,1,0.9,0.9213333333333333,1.050086270624349,0.25003394058188716,0.935,1.4633549442076819,1000 -LGBM,LGBM,observational,True,1,0.95,0.9665,1.2512549672265916,0.25003394058188716,0.965,1.6361896755022522,1000 -LGBM,LGBM,observational,True,4,0.9,0.9316666666666666,1.3927643183370695,0.31165472354651236,0.931,1.9158339453463717,1000 -LGBM,LGBM,observational,True,4,0.95,0.9691666666666666,1.6595810460973441,0.31165472354651236,0.973,2.150765562497434,1000 -LGBM,LGBM,observational,True,6,0.9,0.916,0.9447577179015779,0.22388654410245656,0.924,1.321144543111028,1000 -LGBM,LGBM,observational,True,6,0.95,0.9633333333333334,1.125748255566801,0.22388654410245656,0.969,1.476804179834048,1000 -Linear,Linear,experimental,False,1,0.9,0.8173333333333334,0.21010934901607603,0.06389413336978436,0.734,0.2995486307475187,1000 -Linear,Linear,experimental,False,1,0.95,0.8883333333333334,0.25036073127667713,0.06389413336978436,0.824,0.33300685508980765,1000 -Linear,Linear,experimental,False,4,0.9,0.18233333333333332,0.9731891323288676,0.9553722273933868,0.035,1.2550593366290492,1000 -Linear,Linear,experimental,False,4,0.95,0.24483333333333332,1.159626375415251,0.9553722273933868,0.062,1.427281521275678,1000 -Linear,Linear,experimental,False,6,0.9,0.8991666666666667,0.983154791767425,0.24096929101420667,0.896,1.2646646579458003,1000 -Linear,Linear,experimental,False,6,0.95,0.9493333333333334,1.1715011910594644,0.24096929101420667,0.954,1.4405338687038451,1000 -Linear,Linear,experimental,True,1,0.9,0.8183333333333334,0.2101078759542198,0.06393519386606976,0.735,0.2997680383709066,1000 -Linear,Linear,experimental,True,1,0.95,0.8886666666666666,0.25035897601521323,0.06393519386606976,0.822,0.33312635411891106,1000 -Linear,Linear,experimental,True,4,0.9,0.18266666666666664,0.9731745067396574,0.9555099105888395,0.036,1.255638708223545,1000 -Linear,Linear,experimental,True,4,0.95,0.24416666666666667,1.1596089479508038,0.9555099105888395,0.063,1.4288279721426538,1000 -Linear,Linear,experimental,True,6,0.9,0.8981666666666667,0.983230871903134,0.2406664821693051,0.897,1.2651069060158553,1000 -Linear,Linear,experimental,True,6,0.95,0.9511666666666666,1.1715918461326484,0.2406664821693051,0.953,1.4391701994081894,1000 -Linear,Linear,observational,False,1,0.9,0.8941666666666667,0.22631561327607266,0.05557872144580866,0.892,0.3226263773017779,1000 -Linear,Linear,observational,False,1,0.95,0.9455,0.2696716862170277,0.05557872144580866,0.937,0.35845697787294845,1000 -Linear,Linear,observational,False,4,0.9,0.3135,1.2862330207052297,0.9346939386488097,0.176,1.6370553622592494,1000 -Linear,Linear,observational,False,4,0.95,0.4105,1.5326411754830194,0.9346939386488097,0.262,1.8677802781216264,1000 -Linear,Linear,observational,False,6,0.9,0.8976666666666666,1.0320265854516255,0.2551950378809458,0.899,1.3250563630817251,1000 -Linear,Linear,observational,False,6,0.95,0.9503333333333334,1.2297355250521091,0.2551950378809458,0.952,1.5088480304498908,1000 -Linear,Linear,observational,True,1,0.9,0.892,0.22505764983928228,0.055525785656232375,0.893,0.3209906260141245,1000 -Linear,Linear,observational,True,1,0.95,0.9461666666666666,0.26817273032844385,0.055525785656232375,0.941,0.35667536776248815,1000 -Linear,Linear,observational,True,4,0.9,0.3061666666666667,1.28541058856118,0.9339704262500759,0.17,1.6355455781060406,1000 -Linear,Linear,observational,True,4,0.95,0.4085,1.5316611871389785,0.9339704262500759,0.262,1.8666482756521672,1000 -Linear,Linear,observational,True,6,0.9,0.8971666666666667,1.0247399978060059,0.25261728155460716,0.89,1.3185452498576644,1000 -Linear,Linear,observational,True,6,0.95,0.9486666666666667,1.2210530203467647,0.25261728155460716,0.946,1.5006187957143757,1000 +LGBM,LGBM,experimental,False,1,0.9,0.26682316118935834,0.6622375824605655,0.5243538462647854,0.056338028169014086,0.8701426791247259,213 +LGBM,LGBM,experimental,False,1,0.95,0.3536776212832551,0.7891047504556321,0.5243538462647854,0.1267605633802817,0.9861633495799307,213 +LGBM,LGBM,experimental,False,4,0.9,0.42018779342723006,0.5397134025420479,0.36782921374426986,0.2347417840375587,0.7367204561944273,213 +LGBM,LGBM,experimental,False,4,0.95,0.5093896713615024,0.6431081852046102,0.36782921374426986,0.3051643192488263,0.8269159137411304,213 +LGBM,LGBM,experimental,False,6,0.9,0.8982785602503913,0.5397256714323407,0.13160704162679182,0.8967136150234741,0.7342757718048839,213 +LGBM,LGBM,experimental,False,6,0.95,0.9452269170579031,0.6431228044890928,0.13160704162679182,0.9389671361502347,0.8250171863682804,213 +LGBM,LGBM,experimental,True,1,0.9,0.27543035993740217,0.6622447288518765,0.5255905786793094,0.07511737089201878,0.8706796918976001,213 +LGBM,LGBM,experimental,True,1,0.95,0.3528951486697966,0.789113265906101,0.5255905786793094,0.12206572769953052,0.9874062771819878,213 +LGBM,LGBM,experimental,True,4,0.9,0.4209702660406886,0.539617367359671,0.36821927198121057,0.215962441314554,0.7357672957148406,213 +LGBM,LGBM,experimental,True,4,0.95,0.5164319248826291,0.6429937522267312,0.36821927198121057,0.30985915492957744,0.8288989451123401,213 +LGBM,LGBM,experimental,True,6,0.9,0.9014084507042254,0.5399225408046261,0.1292906780015874,0.8967136150234741,0.7339466976154942,213 +LGBM,LGBM,experimental,True,6,0.95,0.9507042253521126,0.6433573888150266,0.1292906780015874,0.9436619718309859,0.8263333833176641,213 +LGBM,LGBM,observational,False,1,0.9,0.9123630672926448,2.7269358841905746,0.6816031541387337,0.9342723004694836,3.781203290646457,213 +LGBM,LGBM,observational,False,1,0.95,0.9616588419405321,3.2493445213536303,0.6816031541387337,0.9671361502347418,4.228041077301994,213 +LGBM,LGBM,observational,False,4,0.9,0.9029733959311425,3.5511206170645715,1.018654824118398,0.9483568075117371,4.8575699563427275,213 +LGBM,LGBM,observational,False,4,0.95,0.9663536776212833,4.231421203784447,1.018654824118398,0.9859154929577465,5.458812524946875,213 +LGBM,LGBM,observational,False,6,0.9,0.9295774647887324,2.041863507260759,0.4665627615323348,0.9624413145539906,2.8426224676151968,213 +LGBM,LGBM,observational,False,6,0.95,0.9694835680751174,2.433030435051469,0.4665627615323348,0.9812206572769953,3.18356908577058,213 +LGBM,LGBM,observational,True,1,0.9,0.9100156494522692,1.0814908047044909,0.2600800166830828,0.9577464788732394,1.502244204368126,213 +LGBM,LGBM,observational,True,1,0.95,0.9647887323943662,1.2886757776499587,0.2600800166830828,0.9859154929577465,1.6823665595158872,213 +LGBM,LGBM,observational,True,4,0.9,0.9115805946791862,1.403154807393043,0.3246882962897504,0.9107981220657277,1.9299041686105092,213 +LGBM,LGBM,observational,True,4,0.95,0.960093896713615,1.6719620774534347,0.3246882962897504,0.9765258215962441,2.166895198927391,213 +LGBM,LGBM,observational,True,6,0.9,0.9241001564945227,0.9737752733755018,0.2264381445557355,0.9342723004694836,1.3602874606089688,213 +LGBM,LGBM,observational,True,6,0.95,0.9687010954616588,1.1603248055505775,0.2264381445557355,0.9812206572769953,1.5224187709152517,213 +Linear,Linear,experimental,False,1,0.9,0.8341158059467918,0.20998106737125866,0.061899062784151526,0.7652582159624414,0.2996028187250719,213 +Linear,Linear,experimental,False,1,0.95,0.9029733959311425,0.25020787426885593,0.061899062784151526,0.8591549295774648,0.33240930837800786,213 +Linear,Linear,experimental,False,4,0.9,0.1807511737089202,0.9730009679010637,0.9721307660302038,0.028169014084507043,1.256083983812655,213 +Linear,Linear,experimental,False,4,0.95,0.23708920187793428,1.1594021636704344,0.9721307660302038,0.051643192488262914,1.428396179261707,213 +Linear,Linear,experimental,False,6,0.9,0.906885758998435,0.9854298640899793,0.24339544430970847,0.9107981220657277,1.2656744926088497,213 +Linear,Linear,experimental,False,6,0.95,0.9593114241001566,1.1742121069375506,0.24339544430970847,0.9530516431924883,1.4413505363335342,213 +Linear,Linear,experimental,True,1,0.9,0.8348982785602505,0.2099627194504422,0.061856168769670004,0.7793427230046949,0.29942447062231375,213 +Linear,Linear,experimental,True,1,0.95,0.9045383411580594,0.25018601137272817,0.061856168769670004,0.863849765258216,0.33328487064608875,213 +Linear,Linear,experimental,True,4,0.9,0.1784037558685446,0.9731050866936279,0.9717446920939297,0.023474178403755867,1.2558434801432536,213 +Linear,Linear,experimental,True,4,0.95,0.2386541471048513,1.1595262288639543,0.9717446920939297,0.03755868544600939,1.4299146167743415,213 +Linear,Linear,experimental,True,6,0.9,0.9053208137715181,0.9852714872782632,0.24399193882851944,0.9014084507042254,1.267861160411718,213 +Linear,Linear,experimental,True,6,0.95,0.960093896713615,1.1740233893265342,0.24399193882851944,0.9483568075117371,1.443537485029588,213 +Linear,Linear,observational,False,1,0.9,0.9107981220657277,0.22674203953973415,0.05310829726304523,0.9530516431924883,0.3233082882873686,213 +Linear,Linear,observational,False,1,0.95,0.9585289514866979,0.2701798044502516,0.05310829726304523,0.9765258215962441,0.3592475941554335,213 +Linear,Linear,observational,False,4,0.9,0.2887323943661972,1.2756761732160733,0.9456943329020079,0.14084507042253522,1.6261094879887326,213 +Linear,Linear,observational,False,4,0.95,0.3826291079812207,1.5200619158273276,0.9456943329020079,0.24882629107981222,1.8536382347186822,213 +Linear,Linear,observational,False,6,0.9,0.906885758998435,1.037889651864691,0.25273464054254857,0.9014084507042254,1.3331217150079602,213 +Linear,Linear,observational,False,6,0.95,0.9616588419405321,1.236721799587596,0.25273464054254857,0.9671361502347418,1.515590593938462,213 +Linear,Linear,observational,True,1,0.9,0.9076682316118936,0.22530459943280484,0.0533069330309219,0.9248826291079812,0.3211978013308667,213 +Linear,Linear,observational,True,1,0.95,0.956964006259781,0.2684669889186128,0.0533069330309219,0.9671361502347418,0.3574673488546094,213 +Linear,Linear,observational,True,4,0.9,0.2887323943661972,1.272430628595709,0.9479536730007299,0.13615023474178403,1.6232392076774989,213 +Linear,Linear,observational,True,4,0.95,0.37715179968701096,1.5161946108818285,0.9479536730007299,0.2347417840375587,1.8467379540520792,213 +Linear,Linear,observational,True,6,0.9,0.9084507042253521,1.0317588556139243,0.25525750450001883,0.892018779342723,1.3249439027516539,213 +Linear,Linear,observational,True,6,0.95,0.9546165884194053,1.2294165052737636,0.25525750450001883,0.9436619718309859,1.5099244752599217,213 diff --git a/results/did/did_multi_group.csv b/results/did/did_multi_group.csv index c3ea832..62f4f74 100644 --- a/results/did/did_multi_group.csv +++ b/results/did/did_multi_group.csv @@ -1,49 +1,49 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -LGBM,LGBM,experimental,False,1,0.9,0.36333333333333334,0.7099611603275398,0.5136254795571277,0.063,0.8838008665615663,1000 -LGBM,LGBM,experimental,False,1,0.95,0.44366666666666665,0.8459709009142721,0.5136254795571277,0.125,1.0073964643876039,1000 -LGBM,LGBM,experimental,False,4,0.9,0.5003333333333333,0.6081921535389957,0.3647820057477306,0.208,0.7740280182075162,1000 -LGBM,LGBM,experimental,False,4,0.95,0.586,0.724705649842881,0.3647820057477306,0.293,0.8773684088181728,1000 -LGBM,LGBM,experimental,False,6,0.9,0.892,0.6040687503260035,0.14827667506508013,0.905,0.7676094817648568,1000 -LGBM,LGBM,experimental,False,6,0.95,0.952,0.7197923118663098,0.14827667506508013,0.958,0.8705565266492603,1000 -LGBM,LGBM,experimental,True,1,0.9,0.36566666666666664,0.7097094059811901,0.5114031208693576,0.072,0.8837773053597564,1000 -LGBM,LGBM,experimental,True,1,0.95,0.4523333333333333,0.8456709171079858,0.5114031208693576,0.124,1.007523478162278,1000 -LGBM,LGBM,experimental,True,4,0.9,0.4933333333333333,0.6081403435021401,0.36468811333216045,0.213,0.773486458472449,1000 -LGBM,LGBM,experimental,True,4,0.95,0.58,0.7246439143762045,0.36468811333216045,0.299,0.8761786582171167,1000 -LGBM,LGBM,experimental,True,6,0.9,0.8956666666666666,0.6041257613200308,0.14803198170285703,0.902,0.7681786591736645,1000 -LGBM,LGBM,experimental,True,6,0.95,0.955,0.7198602446556994,0.14803198170285703,0.951,0.8706888223083712,1000 -LGBM,LGBM,observational,False,1,0.9,0.9076666666666666,2.6781898300270406,0.6916972849241111,0.946,3.38857326771682,1000 -LGBM,LGBM,observational,False,1,0.95,0.9653333333333334,3.191260015241048,0.6916972849241111,0.981,3.8456624803104273,1000 -LGBM,LGBM,observational,False,4,0.9,0.9093333333333333,3.5229498626174345,0.9750065503975603,0.937,4.436162638678508,1000 -LGBM,LGBM,observational,False,4,0.95,0.9666666666666667,4.1978536794594765,0.9750065503975603,0.987,5.041432763827293,1000 -LGBM,LGBM,observational,False,6,0.9,0.9413333333333334,2.1219437360077764,0.4704737938297111,0.965,2.694067282189173,1000 -LGBM,LGBM,observational,False,6,0.95,0.9813333333333334,2.528451913076099,0.4704737938297111,0.989,3.0566238417322635,1000 -LGBM,LGBM,observational,True,1,0.9,0.925,1.0932949019073217,0.25390420245544787,0.931,1.3884244485303283,1000 -LGBM,LGBM,observational,True,1,0.95,0.9686666666666667,1.3027412270057395,0.25390420245544787,0.979,1.57225063983022,1000 -LGBM,LGBM,observational,True,4,0.9,0.932,1.4282748970343668,0.3144435220940553,0.944,1.80563805439494,1000 -LGBM,LGBM,observational,True,4,0.95,0.97,1.701894510454578,0.3144435220940553,0.976,2.0500099983055438,1000 -LGBM,LGBM,observational,True,6,0.9,0.9193333333333333,1.0125316512702194,0.23463257391341852,0.938,1.290261546951988,1000 -LGBM,LGBM,observational,True,6,0.95,0.9686666666666667,1.2065058782005826,0.23463257391341852,0.976,1.460865151903143,1000 -Linear,Linear,experimental,False,1,0.9,0.8273333333333334,0.2640444496235159,0.07705628755085145,0.774,0.3388637220600302,1000 -Linear,Linear,experimental,False,1,0.95,0.894,0.3146283675945957,0.07705628755085145,0.856,0.3827834383513776,1000 -Linear,Linear,experimental,False,4,0.9,0.308,1.0788013255399809,0.9245210136614235,0.041,1.3610490892071057,1000 -Linear,Linear,experimental,False,4,0.95,0.3803333333333333,1.2854710655629746,0.9245210136614235,0.072,1.5456985336243014,1000 -Linear,Linear,experimental,False,6,0.9,0.8983333333333333,1.0853277280647347,0.2661813679333065,0.897,1.3669654616053382,1000 -Linear,Linear,experimental,False,6,0.95,0.9473333333333334,1.2932477538272285,0.2661813679333065,0.951,1.5522929783283734,1000 -Linear,Linear,experimental,True,1,0.9,0.8266666666666667,0.2640612943966985,0.07705288842045135,0.77,0.33905877967190373,1000 -Linear,Linear,experimental,True,1,0.95,0.894,0.3146484393798443,0.07705288842045135,0.859,0.3831997341679366,1000 -Linear,Linear,experimental,True,4,0.9,0.3113333333333333,1.078752037208664,0.9242783815647418,0.042,1.3592960972905426,1000 -Linear,Linear,experimental,True,4,0.95,0.38266666666666665,1.2854123348937794,0.9242783815647418,0.072,1.54610897087862,1000 -Linear,Linear,experimental,True,6,0.9,0.8966666666666666,1.085418359490078,0.2662685237358162,0.897,1.367449778023951,1000 -Linear,Linear,experimental,True,6,0.95,0.9483333333333334,1.2933557478314546,0.2662685237358162,0.951,1.5526198245057985,1000 -Linear,Linear,observational,False,1,0.9,0.9013333333333333,0.28420713117141405,0.07010567640313892,0.898,0.3649364269699617,1000 -Linear,Linear,observational,False,1,0.95,0.95,0.3386536845091911,0.07010567640313892,0.948,0.4121346070743879,1000 -Linear,Linear,observational,False,4,0.9,0.4066666666666666,1.37576459282051,0.9124524843108323,0.201,1.7241374780538787,1000 -Linear,Linear,observational,False,4,0.95,0.5053333333333333,1.6393246237546002,0.9124524843108323,0.288,1.9605496470336479,1000 -Linear,Linear,observational,False,6,0.9,0.896,1.131199773808106,0.27818227175878624,0.9,1.4214962923529382,1000 -Linear,Linear,observational,False,6,0.95,0.9456666666666667,1.3479076676827941,0.27818227175878624,0.95,1.6165756168425887,1000 -Linear,Linear,observational,True,1,0.9,0.8986666666666666,0.2824541333099468,0.07017044977152435,0.895,0.36300185021246023,1000 -Linear,Linear,observational,True,1,0.95,0.95,0.33656485872119707,0.07017044977152435,0.946,0.4096976363084026,1000 -Linear,Linear,observational,True,4,0.9,0.4043333333333333,1.3747755268837438,0.9124256763381008,0.19,1.722166983397146,1000 -Linear,Linear,observational,True,4,0.95,0.5013333333333333,1.6381460789998368,0.9124256763381008,0.292,1.960451721705977,1000 -Linear,Linear,observational,True,6,0.9,0.8946666666666666,1.124679848716498,0.27742624426950013,0.896,1.413338723451795,1000 -Linear,Linear,observational,True,6,0.95,0.945,1.3401386977561902,0.27742624426950013,0.948,1.6094449734104723,1000 +LGBM,LGBM,experimental,False,1,0.9,0.3693270735524256,0.708884244644098,0.5076546102817214,0.06103286384976526,0.882195284078658,213 +LGBM,LGBM,experimental,False,1,0.95,0.4647887323943662,0.8446876767298539,0.5076546102817214,0.11267605633802817,1.0067497752917671,213 +LGBM,LGBM,experimental,False,4,0.9,0.5195618153364632,0.6064387804155298,0.359662593918017,0.25821596244131456,0.7713300371315813,213 +LGBM,LGBM,experimental,False,4,0.95,0.5978090766823161,0.7226163769026358,0.359662593918017,0.3380281690140845,0.8748104224057969,213 +LGBM,LGBM,experimental,False,6,0.9,0.9092331768388106,0.6042340581300409,0.1416554625702024,0.9107981220657277,0.7682371008294206,213 +LGBM,LGBM,experimental,False,6,0.95,0.9577464788732394,0.7199892882640683,0.1416554625702024,0.9483568075117371,0.870262886919318,213 +LGBM,LGBM,experimental,True,1,0.9,0.3677621283255086,0.7085175778049067,0.5104390456686334,0.056338028169014086,0.8825002852337448,213 +LGBM,LGBM,experimental,True,1,0.95,0.4507042253521127,0.8442507662428873,0.5104390456686334,0.12206572769953052,1.0062240433084881,213 +LGBM,LGBM,experimental,True,4,0.9,0.5258215962441315,0.6064876511923051,0.36017808744116137,0.25821596244131456,0.7719006127371255,213 +LGBM,LGBM,experimental,True,4,0.95,0.5978090766823161,0.7226746100249068,0.36017808744116137,0.3333333333333333,0.8726253533549294,213 +LGBM,LGBM,experimental,True,6,0.9,0.9014084507042254,0.604203709489697,0.14275606325160778,0.9154929577464789,0.7672972320908118,213 +LGBM,LGBM,experimental,True,6,0.95,0.9530516431924883,0.7199531256286343,0.14275606325160778,0.9483568075117371,0.8695916856047146,213 +LGBM,LGBM,observational,False,1,0.9,0.9107981220657277,2.737968904315236,0.6906077542931626,0.9577464788732394,3.466560664161931,213 +LGBM,LGBM,observational,False,1,0.95,0.971830985915493,3.262491175700692,0.6906077542931626,0.9906103286384976,3.938148528130814,213 +LGBM,LGBM,observational,False,4,0.9,0.8998435054773083,3.4853596050908524,0.981231747763395,0.9483568075117371,4.38755346147407,213 +LGBM,LGBM,observational,False,4,0.95,0.9687010954616588,4.1530621249317745,0.981231747763395,0.9812206572769953,5.000742699990643,213 +LGBM,LGBM,observational,False,6,0.9,0.9342723004694836,2.1582835144043524,0.5017788160614094,0.9530516431924883,2.7425698151441735,213 +LGBM,LGBM,observational,False,6,0.95,0.9702660406885758,2.5717534298168085,0.5017788160614094,0.9953051643192489,3.1128624608102506,213 +LGBM,LGBM,observational,True,1,0.9,0.9280125195618153,1.1093798369638577,0.25610979031670084,0.9530516431924883,1.4076058946929795,213 +LGBM,LGBM,observational,True,1,0.95,0.971830985915493,1.321907609283113,0.25610979031670084,0.9859154929577465,1.5985772932515239,213 +LGBM,LGBM,observational,True,4,0.9,0.9327073552425664,1.4461233643972167,0.31965791533832816,0.92018779342723,1.8268542671941947,213 +LGBM,LGBM,observational,True,4,0.95,0.9687010954616588,1.7231622710852061,0.31965791533832816,0.9624413145539906,2.070646982862953,213 +LGBM,LGBM,observational,True,6,0.9,0.9264475743348983,1.0398792853809842,0.23201299260824648,0.9483568075117371,1.324644293094784,213 +LGBM,LGBM,observational,True,6,0.95,0.9702660406885758,1.2390925941497821,0.23201299260824648,0.9812206572769953,1.4997012284669375,213 +Linear,Linear,experimental,False,1,0.9,0.8560250391236307,0.26407013736077695,0.07094767690782731,0.8169014084507042,0.3389521437809375,213 +Linear,Linear,experimental,False,1,0.95,0.9139280125195618,0.3146589764214549,0.07094767690782731,0.8873239436619719,0.38350827711408936,213 +Linear,Linear,experimental,False,4,0.9,0.27230046948356806,1.0786207639130556,0.9426621361337196,0.03286384976525822,1.3615655693211501,213 +Linear,Linear,experimental,False,4,0.95,0.3552425665101721,1.2852559131141705,0.9426621361337196,0.046948356807511735,1.5443642966188706,213 +Linear,Linear,experimental,False,6,0.9,0.9014084507042254,1.086940152832102,0.2642921344674123,0.892018779342723,1.3702177051651498,213 +Linear,Linear,experimental,False,6,0.95,0.94679186228482,1.295169076442225,0.2642921344674123,0.9483568075117371,1.5571699954658127,213 +Linear,Linear,experimental,True,1,0.9,0.8528951486697965,0.2640439587928754,0.07088851582983956,0.812206572769953,0.339083864893176,213 +Linear,Linear,experimental,True,1,0.95,0.9154929577464789,0.3146277827338141,0.07088851582983956,0.8826291079812206,0.38312094217167864,213 +Linear,Linear,experimental,True,4,0.9,0.27699530516431925,1.078544852418315,0.9421760966442201,0.028169014084507043,1.3631634517660862,213 +Linear,Linear,experimental,True,4,0.95,0.3536776212832551,1.2851654589890942,0.9421760966442201,0.046948356807511735,1.5459949955394454,213 +Linear,Linear,experimental,True,6,0.9,0.8998435054773083,1.0870319591890836,0.26434478098666997,0.8967136150234741,1.367426197613625,213 +Linear,Linear,experimental,True,6,0.95,0.9499217527386542,1.2952784704638494,0.26434478098666997,0.9483568075117371,1.5548813763151852,213 +Linear,Linear,observational,False,1,0.9,0.9248826291079812,0.2846621401319301,0.06429577875305519,0.8967136150234741,0.3655365252469558,213 +Linear,Linear,observational,False,1,0.95,0.9577464788732394,0.3391958611263939,0.06429577875305519,0.971830985915493,0.41327949655526525,213 +Linear,Linear,observational,False,4,0.9,0.39593114241001565,1.3672940532100943,0.9229063221181599,0.2112676056338028,1.7134288502030837,213 +Linear,Linear,observational,False,4,0.95,0.49921752738654146,1.6292313532690044,0.9229063221181599,0.27699530516431925,1.947435370381994,213 +Linear,Linear,observational,False,6,0.9,0.9076682316118936,1.1353183733765209,0.27380744335153234,0.892018779342723,1.4258387377000505,213 +Linear,Linear,observational,False,6,0.95,0.9561815336463223,1.3528152817638088,0.27380744335153234,0.9483568075117371,1.6252330516275495,213 +Linear,Linear,observational,True,1,0.9,0.9264475743348983,0.28301907230361883,0.06401666018609901,0.9154929577464789,0.36387049373088004,213 +Linear,Linear,observational,True,1,0.95,0.9593114241001566,0.3372380250521804,0.06401666018609901,0.9671361502347418,0.4105275870569728,213 +Linear,Linear,observational,True,4,0.9,0.378716744913928,1.361620669698774,0.927537201831293,0.1643192488262911,1.7047616897800275,213 +Linear,Linear,observational,True,4,0.95,0.4851330203442879,1.6224710998516352,0.927537201831293,0.26291079812206575,1.9443472630225822,213 +Linear,Linear,observational,True,6,0.9,0.9076682316118936,1.133591251127291,0.2759477199749895,0.9061032863849765,1.4226242751289748,213 +Linear,Linear,observational,True,6,0.95,0.9561815336463223,1.350757288669516,0.2759477199749895,0.9389671361502347,1.6207174667832518,213 diff --git a/results/did/did_multi_metadata.csv b/results/did/did_multi_metadata.csv index cf6d79f..afcf3e3 100644 --- a/results/did/did_multi_metadata.csv +++ b/results/did/did_multi_metadata.csv @@ -1,2 +1,2 @@ DoubleML Version,Script,Date,Total Runtime (minutes),Python Version,Config File -0.10.dev0,DIDMultiCoverageSimulation,2025-03-22 13:07,161.55725783109665,3.12.9,scripts/did/did_pa_multi_config.yml +0.10.dev0,DIDMultiCoverageSimulation,2025-04-24 13:16,342.5480104605357,3.12.3,scripts/did/did_pa_multi_config.yml diff --git a/results/did/did_multi_time.csv b/results/did/did_multi_time.csv index 69a4f0a..366e2db 100644 --- a/results/did/did_multi_time.csv +++ b/results/did/did_multi_time.csv @@ -1,49 +1,49 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -LGBM,LGBM,experimental,False,1,0.9,0.10133333333333333,0.6746093620810587,0.5882356487545806,0.066,0.8008469053978132,1000 -LGBM,LGBM,experimental,False,1,0.95,0.17366666666666666,0.8038466351337079,0.5882356487545806,0.118,0.9244463745136012,1000 -LGBM,LGBM,experimental,False,4,0.9,0.22366666666666665,0.5442333781676438,0.41763732489029837,0.169,0.6603749834789159,1000 -LGBM,LGBM,experimental,False,4,0.95,0.3196666666666667,0.6484940683567701,0.41763732489029837,0.244,0.7587312838186443,1000 -LGBM,LGBM,experimental,False,6,0.9,0.9083333333333333,0.5395528030415373,0.12968510473975978,0.901,0.6561014307587926,1000 -LGBM,LGBM,experimental,False,6,0.95,0.9543333333333334,0.6429168190965395,0.12968510473975978,0.951,0.7523477661079653,1000 -LGBM,LGBM,experimental,True,1,0.9,0.10733333333333332,0.6743902742947253,0.5864355668337375,0.066,0.8000182338498814,1000 -LGBM,LGBM,experimental,True,1,0.95,0.1713333333333333,0.8035855759344999,0.5864355668337375,0.123,0.9238506660612901,1000 -LGBM,LGBM,experimental,True,4,0.9,0.23166666666666666,0.5441212033941374,0.4171381557101547,0.17,0.6607250720722284,1000 -LGBM,LGBM,experimental,True,4,0.95,0.3196666666666667,0.6483604038698857,0.4171381557101547,0.245,0.7579132011887949,1000 -LGBM,LGBM,experimental,True,6,0.9,0.9063333333333333,0.5394904332086611,0.12863612300950375,0.903,0.6565743997497494,1000 -LGBM,LGBM,experimental,True,6,0.95,0.9523333333333334,0.6428425008568152,0.12863612300950375,0.955,0.7532450411959063,1000 -LGBM,LGBM,observational,False,1,0.9,0.8943333333333334,2.905893095599295,0.7648921426349597,0.92,3.588646368039136,1000 -LGBM,LGBM,observational,False,1,0.95,0.9563333333333334,3.462585191154069,0.7648921426349597,0.975,4.0996633280531105,1000 -LGBM,LGBM,observational,False,4,0.9,0.8876666666666666,3.9146026798923885,1.1190311469389873,0.92,4.790575517259599,1000 -LGBM,LGBM,observational,False,4,0.95,0.963,4.664536795649732,1.1190311469389873,0.982,5.486504879391152,1000 -LGBM,LGBM,observational,False,6,0.9,0.942,2.009962087567071,0.4418856843130645,0.958,2.5103783382326825,1000 -LGBM,LGBM,observational,False,6,0.95,0.9816666666666666,2.3950175489011016,0.4418856843130645,0.984,2.8615887060271743,1000 -LGBM,LGBM,observational,True,1,0.9,0.9303333333333333,1.0974116056549843,0.25912148830825843,0.938,1.3607720502797749,1000 -LGBM,LGBM,observational,True,1,0.95,0.969,1.3076465820769951,0.25912148830825843,0.978,1.5521920303181904,1000 -LGBM,LGBM,observational,True,4,0.9,0.9416666666666667,1.472333292909054,0.3205121679339935,0.94,1.8014934435044807,1000 -LGBM,LGBM,observational,True,4,0.95,0.9743333333333334,1.7543933271979495,0.3205121679339935,0.98,2.0658871704252246,1000 -LGBM,LGBM,observational,True,6,0.9,0.915,0.9286745626922529,0.21897181277799815,0.92,1.15681026947425,1000 -LGBM,LGBM,observational,True,6,0.95,0.9626666666666667,1.1065839941081885,0.21897181277799815,0.96,1.3188454688519913,1000 -Linear,Linear,experimental,False,1,0.9,0.7993333333333333,0.24424430193356436,0.07551069080931783,0.741,0.3130913040114941,1000 -Linear,Linear,experimental,False,1,0.95,0.8723333333333334,0.2910350364160617,0.07551069080931783,0.838,0.3538500363992679,1000 -Linear,Linear,experimental,False,4,0.9,0.036333333333333336,0.9660507125397605,1.0827206081770897,0.031,1.107819485412717,1000 -Linear,Linear,experimental,False,4,0.95,0.06233333333333333,1.151120423600494,1.0827206081770897,0.05,1.287625024067252,1000 -Linear,Linear,experimental,False,6,0.9,0.8896666666666666,0.9631043832739674,0.2382471311709886,0.887,1.1078250173884234,1000 -Linear,Linear,experimental,False,6,0.95,0.9476666666666667,1.1476096557407096,0.2382471311709886,0.946,1.2863233234339295,1000 -Linear,Linear,experimental,True,1,0.9,0.8,0.2442583284424631,0.07557199890938014,0.732,0.3129294069731057,1000 -Linear,Linear,experimental,True,1,0.95,0.8703333333333334,0.2910517500322886,0.07557199890938014,0.839,0.35392920047397675,1000 -Linear,Linear,experimental,True,4,0.9,0.036333333333333336,0.9660295319926757,1.0828776638271536,0.031,1.1077283731317225,1000 -Linear,Linear,experimental,True,4,0.95,0.063,1.1510951854219846,1.0828776638271536,0.047,1.2867549199317392,1000 -Linear,Linear,experimental,True,6,0.9,0.888,0.9631437707318972,0.23828269404302604,0.885,1.107258053590484,1000 -Linear,Linear,experimental,True,6,0.95,0.9483333333333334,1.1476565887916024,0.23828269404302604,0.949,1.2877831442682166,1000 -Linear,Linear,observational,False,1,0.9,0.8906666666666666,0.2745349354396546,0.06791772384944492,0.877,0.35207829288672793,1000 -Linear,Linear,observational,False,1,0.95,0.94,0.3271285524396554,0.06791772384944492,0.927,0.3973383284293281,1000 -Linear,Linear,observational,False,4,0.9,0.17166666666666666,1.3453667150527824,1.069526476442094,0.148,1.5155288354203724,1000 -Linear,Linear,observational,False,4,0.95,0.2553333333333333,1.6031033183113808,1.069526476442094,0.227,1.76788776355175,1000 -Linear,Linear,observational,False,6,0.9,0.8876666666666666,1.0115696911437715,0.2500537801037969,0.885,1.1646692593828614,1000 -Linear,Linear,observational,False,6,0.95,0.947,1.2053596320109472,0.2500537801037969,0.945,1.3520516734344188,1000 -Linear,Linear,observational,True,1,0.9,0.8873333333333334,0.2723311152982007,0.06788449126443423,0.87,0.34906917904913193,1000 -Linear,Linear,observational,True,1,0.95,0.9333333333333333,0.32450253877200813,0.06788449126443423,0.922,0.39431076453237734,1000 -Linear,Linear,observational,True,4,0.9,0.16133333333333336,1.3452145611861124,1.0697056322506917,0.131,1.5155973414877166,1000 -Linear,Linear,observational,True,4,0.95,0.24866666666666665,1.6029220157967403,1.0697056322506917,0.221,1.7687727143970222,1000 -Linear,Linear,observational,True,6,0.9,0.8863333333333334,1.0032499571751785,0.24871625835196373,0.882,1.1544090742288704,1000 -Linear,Linear,observational,True,6,0.95,0.9433333333333334,1.1954460575309986,0.24871625835196373,0.939,1.340743500935446,1000 +LGBM,LGBM,experimental,False,1,0.9,0.0892018779342723,0.6735044298830777,0.5847473306131643,0.06103286384976526,0.8011157200032835,213 +LGBM,LGBM,experimental,False,1,0.95,0.17214397496087636,0.8025300272131505,0.5847473306131643,0.11267605633802817,0.9212869785087825,213 +LGBM,LGBM,experimental,False,4,0.9,0.26917057902973396,0.5421756711901682,0.40575619933105894,0.22065727699530516,0.6593899758823104,213 +LGBM,LGBM,experimental,False,4,0.95,0.3630672926447574,0.6460421592625465,0.40575619933105894,0.27230046948356806,0.7560532967515187,213 +LGBM,LGBM,experimental,False,6,0.9,0.9061032863849765,0.5400510579454025,0.1320131828976933,0.8967136150234741,0.655954994913595,213 +LGBM,LGBM,experimental,False,6,0.95,0.9436619718309859,0.6435105264335905,0.1320131828976933,0.9530516431924883,0.7541743667823617,213 +LGBM,LGBM,experimental,True,1,0.9,0.10172143974960875,0.6733529287914019,0.5852776399276569,0.06103286384976526,0.7967235061979042,213 +LGBM,LGBM,experimental,True,1,0.95,0.17370892018779344,0.8023495025278913,0.5852776399276569,0.13145539906103287,0.9244790434903511,213 +LGBM,LGBM,experimental,True,4,0.9,0.27699530516431925,0.5420776526750094,0.40698586915558177,0.19718309859154928,0.6590010475339207,213 +LGBM,LGBM,experimental,True,4,0.95,0.36619718309859156,0.6459253629978932,0.40698586915558177,0.29107981220657275,0.756935199686189,213 +LGBM,LGBM,experimental,True,6,0.9,0.9092331768388106,0.5402460899427872,0.13118228677637048,0.9342723004694836,0.656709876900506,213 +LGBM,LGBM,experimental,True,6,0.95,0.9624413145539906,0.6437429213922929,0.13118228677637048,0.9577464788732394,0.752708121867163,213 +LGBM,LGBM,observational,False,1,0.9,0.9092331768388106,2.949178578913003,0.7288513967921139,0.9389671361502347,3.640414629214853,213 +LGBM,LGBM,observational,False,1,0.95,0.971830985915493,3.5141630257760554,0.7288513967921139,0.971830985915493,4.150557782712354,213 +LGBM,LGBM,observational,False,4,0.9,0.9014084507042254,3.8964402739946777,1.1223719380630706,0.9530516431924883,4.764333689391444,213 +LGBM,LGBM,observational,False,4,0.95,0.9671361502347418,4.6428949541819975,1.1223719380630706,0.971830985915493,5.471006129563335,213 +LGBM,LGBM,observational,False,6,0.9,0.9327073552425664,2.0285442450363886,0.4469362530691951,0.9436619718309859,2.5322168766535476,213 +LGBM,LGBM,observational,False,6,0.95,0.974960876369327,2.4171595552159215,0.4469362530691951,0.971830985915493,2.88178088183908,213 +LGBM,LGBM,observational,True,1,0.9,0.9311424100156495,1.123106120095932,0.26198849206178,0.9483568075117371,1.3900521401677945,213 +LGBM,LGBM,observational,True,1,0.95,0.9812206572769953,1.3382634844440697,0.26198849206178,0.971830985915493,1.590522570297692,213 +LGBM,LGBM,observational,True,4,0.9,0.9389671361502347,1.5058133543184269,0.3406931806329066,0.9389671361502347,1.8423134951538827,213 +LGBM,LGBM,observational,True,4,0.95,0.974960876369327,1.794287280974358,0.3406931806329066,0.9765258215962441,2.1083548286609535,213 +LGBM,LGBM,observational,True,6,0.9,0.9295774647887324,0.9567250856892477,0.21575142072047634,0.9248826291079812,1.1904853742941865,213 +LGBM,LGBM,observational,True,6,0.95,0.9687010954616588,1.1400082538239402,0.21575142072047634,0.9624413145539906,1.3586919640085193,213 +Linear,Linear,experimental,False,1,0.9,0.8372456964006261,0.24439003484018698,0.06945083196171528,0.7934272300469484,0.3129341078438043,213 +Linear,Linear,experimental,False,1,0.95,0.9061032863849765,0.29120868788489906,0.06945083196171528,0.8967136150234741,0.3539477153716639,213 +Linear,Linear,experimental,False,4,0.9,0.0297339593114241,0.9657374450457906,1.10215836325763,0.018779342723004695,1.1083961248126262,213 +Linear,Linear,experimental,False,4,0.95,0.05007824726134585,1.1507471423579276,1.10215836325763,0.03755868544600939,1.2889435969715142,213 +Linear,Linear,experimental,False,6,0.9,0.8826291079812206,0.9660570269958759,0.24916879933420294,0.863849765258216,1.1099601757570683,213 +Linear,Linear,experimental,False,6,0.95,0.9405320813771518,1.1511279477390344,0.24916879933420294,0.9483568075117371,1.2907822410705019,213 +Linear,Linear,experimental,True,1,0.9,0.8435054773082942,0.2443806338560857,0.06938368490846683,0.7981220657276995,0.31301675619249564,213 +Linear,Linear,experimental,True,1,0.95,0.9061032863849765,0.2911974859214199,0.06938368490846683,0.892018779342723,0.3540111034488695,213 +Linear,Linear,experimental,True,4,0.9,0.028169014084507043,0.9656711081516489,1.101877793396912,0.018779342723004695,1.10638268902308,213 +Linear,Linear,experimental,True,4,0.95,0.051643192488262914,1.1506680970731475,1.101877793396912,0.03755868544600939,1.2854015212203158,213 +Linear,Linear,experimental,True,6,0.9,0.8826291079812206,0.9661738823391016,0.24920436172242275,0.8826291079812206,1.109718677746468,213 +Linear,Linear,experimental,True,6,0.95,0.9499217527386542,1.1512671894687365,0.24920436172242275,0.9436619718309859,1.289880357441484,213 +Linear,Linear,observational,False,1,0.9,0.92018779342723,0.2751888265519432,0.06174150416456478,0.92018779342723,0.35292004587977904,213 +Linear,Linear,observational,False,1,0.95,0.9530516431924883,0.32790771175747974,0.06174150416456478,0.971830985915493,0.3984225349256207,213 +Linear,Linear,observational,False,4,0.9,0.14241001564945227,1.3371389555418136,1.0786049675340639,0.11737089201877934,1.5095232758334527,213 +Linear,Linear,observational,False,4,0.95,0.2331768388106416,1.5932993381573268,1.0786049675340639,0.19248826291079812,1.7603486086872133,213 +Linear,Linear,observational,False,6,0.9,0.892018779342723,1.0174596865123355,0.2598926764856041,0.863849765258216,1.169235918197709,213 +Linear,Linear,observational,False,6,0.95,0.9389671361502347,1.2123779943760464,0.2598926764856041,0.9483568075117371,1.3563715660755367,213 +Linear,Linear,observational,True,1,0.9,0.9186228482003129,0.27330760979256297,0.06141517644317234,0.9154929577464789,0.3497979849970347,213 +Linear,Linear,observational,True,1,0.95,0.9577464788732394,0.32566610372921273,0.06141517644317234,0.9577464788732394,0.39565988623663145,213 +Linear,Linear,observational,True,4,0.9,0.12206572769953052,1.3286076657019632,1.085838237023361,0.09389671361502347,1.496899245381295,213 +Linear,Linear,observational,True,4,0.95,0.19874804381846634,1.5831336793085395,1.085838237023361,0.19248826291079812,1.74994500832392,213 +Linear,Linear,observational,True,6,0.9,0.8857589984350547,1.0121360659183458,0.2604339364788449,0.8779342723004695,1.1644370852327328,213 +Linear,Linear,observational,True,6,0.95,0.9389671361502347,1.2060345091803977,0.2604339364788449,0.9530516431924883,1.3523232762515875,213 From fbf89754ff22f53e2421f24fbd3e0e5950243567 Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Mon, 28 Apr 2025 10:31:41 +0200 Subject: [PATCH 59/60] update plr results --- monte-cover/src/montecover/plm/plr_ate.py | 4 +- results/plm/plr_ate_config.yml | 86 ++++++++++++++++++----- results/plm/plr_ate_coverage.csv | 42 ++++++----- results/plm/plr_ate_metadata.csv | 2 +- scripts/plm/plr_ate_config.yml | 2 + 5 files changed, 100 insertions(+), 36 deletions(-) diff --git a/monte-cover/src/montecover/plm/plr_ate.py b/monte-cover/src/montecover/plm/plr_ate.py index a58b471..ac7f1c3 100644 --- a/monte-cover/src/montecover/plm/plr_ate.py +++ b/monte-cover/src/montecover/plm/plr_ate.py @@ -49,9 +49,9 @@ def _convert_ml_string_to_object(self, ml_string): if ml_string == "Lasso": learner = LassoCV() elif ml_string == "Random Forest": - learner = RandomForestRegressor(n_estimators=100, max_features=20, max_depth=5, min_samples_leaf=2) + learner = RandomForestRegressor(n_estimators=200, max_features=10, max_depth=5, min_samples_leaf=20) elif ml_string == "LGBM": - learner = LGBMRegressor(n_estimators=100, learning_rate=0.05, verbose=-1, n_jobs=1) + learner = LGBMRegressor(n_estimators=500, learning_rate=0.01, verbose=-1, n_jobs=1) else: raise ValueError(f"Unknown learner type: {ml_string}") diff --git a/results/plm/plr_ate_config.yml b/results/plm/plr_ate_config.yml index 18c7f83..af73b18 100644 --- a/results/plm/plr_ate_config.yml +++ b/results/plm/plr_ate_config.yml @@ -83,15 +83,15 @@ dml_parameters: - ccp_alpha - monotonic_cst max_depth: 5 - max_features: 20 + max_features: 10 max_leaf_nodes: null max_samples: null min_impurity_decrease: 0.0 - min_samples_leaf: 2 + min_samples_leaf: 20 min_samples_split: 2 min_weight_fraction_leaf: 0.0 monotonic_cst: null - n_estimators: 100 + n_estimators: 200 n_jobs: null oob_score: false random_state: null @@ -122,15 +122,15 @@ dml_parameters: splitter: best estimator_params: *id001 max_depth: 5 - max_features: 20 + max_features: 10 max_leaf_nodes: null max_samples: null min_impurity_decrease: 0.0 - min_samples_leaf: 2 + min_samples_leaf: 20 min_samples_split: 2 min_weight_fraction_leaf: 0.0 monotonic_cst: null - n_estimators: 100 + n_estimators: 200 n_jobs: null oob_score: false random_state: null @@ -179,15 +179,15 @@ dml_parameters: splitter: best estimator_params: *id001 max_depth: 5 - max_features: 20 + max_features: 10 max_leaf_nodes: null max_samples: null min_impurity_decrease: 0.0 - min_samples_leaf: 2 + min_samples_leaf: 20 min_samples_split: 2 min_weight_fraction_leaf: 0.0 monotonic_cst: null - n_estimators: 100 + n_estimators: 200 n_jobs: null oob_score: false random_state: null @@ -218,15 +218,15 @@ dml_parameters: splitter: best estimator_params: *id001 max_depth: 5 - max_features: 20 + max_features: 10 max_leaf_nodes: null max_samples: null min_impurity_decrease: 0.0 - min_samples_leaf: 2 + min_samples_leaf: 20 min_samples_split: 2 min_weight_fraction_leaf: 0.0 monotonic_cst: null - n_estimators: 100 + n_estimators: 200 n_jobs: null oob_score: false random_state: null @@ -270,12 +270,12 @@ dml_parameters: class_weight: null colsample_bytree: 1.0 importance_type: split - learning_rate: 0.05 + learning_rate: 0.01 max_depth: -1 min_child_samples: 20 min_child_weight: 0.001 min_split_gain: 0.0 - n_estimators: 100 + n_estimators: 500 n_jobs: 1 num_leaves: 31 objective: null @@ -306,12 +306,12 @@ dml_parameters: class_weight: null colsample_bytree: 1.0 importance_type: split - learning_rate: 0.05 + learning_rate: 0.01 max_depth: -1 min_child_samples: 20 min_child_weight: 0.001 min_split_gain: 0.0 - n_estimators: 100 + n_estimators: 500 n_jobs: 1 num_leaves: 31 objective: null @@ -322,6 +322,60 @@ dml_parameters: subsample_for_bin: 200000 subsample_freq: 0 verbose: -1 + - ml_g: !!python/tuple + - LGBM + - !!python/object:lightgbm.sklearn.LGBMRegressor + _Booster: null + _best_iteration: -1 + _best_score: {} + _class_map: null + _class_weight: null + _classes: null + _evals_result: {} + _n_classes: -1 + _n_features: -1 + _n_features_in: -1 + _objective: null + _other_params: + verbose: -1 + boosting_type: gbdt + class_weight: null + colsample_bytree: 1.0 + importance_type: split + learning_rate: 0.01 + max_depth: -1 + min_child_samples: 20 + min_child_weight: 0.001 + min_split_gain: 0.0 + n_estimators: 500 + n_jobs: 1 + num_leaves: 31 + objective: null + random_state: null + reg_alpha: 0.0 + reg_lambda: 0.0 + subsample: 1.0 + subsample_for_bin: 200000 + subsample_freq: 0 + verbose: -1 + ml_m: !!python/tuple + - Lasso + - !!python/object:sklearn.linear_model._coordinate_descent.LassoCV + _sklearn_version: 1.5.2 + alphas: null + copy_X: true + cv: null + eps: 0.001 + fit_intercept: true + max_iter: 1000 + n_alphas: 100 + n_jobs: null + positive: false + precompute: auto + random_state: null + selection: cyclic + tol: 0.0001 + verbose: false score: - partialling out - IV-type diff --git a/results/plm/plr_ate_coverage.csv b/results/plm/plr_ate_coverage.csv index 1346d57..87a505d 100644 --- a/results/plm/plr_ate_coverage.csv +++ b/results/plm/plr_ate_coverage.csv @@ -1,17 +1,25 @@ -Learner g,Learner m,score,level,Coverage,CI Length,Bias,repetition -Lasso,Lasso,IV-type,0.9,0.881,0.1393979255576113,0.0352891099128789,1000 -Lasso,Lasso,IV-type,0.95,0.945,0.16610287331091153,0.0352891099128789,1000 -Lasso,Lasso,partialling out,0.9,0.908,0.14646362984437974,0.034686755904342816,1000 -Lasso,Lasso,partialling out,0.95,0.956,0.17452217926042807,0.034686755904342816,1000 -Lasso,Random Forest,IV-type,0.9,0.898,0.14672410325315619,0.036150217819390894,1000 -Lasso,Random Forest,IV-type,0.95,0.954,0.1748325524704008,0.036150217819390894,1000 -Lasso,Random Forest,partialling out,0.9,0.817,0.143330638432391,0.04191262539042403,1000 -Lasso,Random Forest,partialling out,0.95,0.886,0.17078898973477283,0.04191262539042403,1000 -Random Forest,Lasso,IV-type,0.9,0.877,0.141921407652651,0.035804568203505666,1000 -Random Forest,Lasso,IV-type,0.95,0.948,0.16910978768971624,0.035804568203505666,1000 -Random Forest,Lasso,partialling out,0.9,0.903,0.15198241550336503,0.03618790663815028,1000 -Random Forest,Lasso,partialling out,0.95,0.954,0.1810982179746172,0.03618790663815028,1000 -Random Forest,Random Forest,IV-type,0.9,0.907,0.1493755431098695,0.03649624902429271,1000 -Random Forest,Random Forest,IV-type,0.95,0.949,0.1779919379264572,0.03649624902429271,1000 -Random Forest,Random Forest,partialling out,0.9,0.884,0.14638253610723148,0.036967300943126565,1000 -Random Forest,Random Forest,partialling out,0.95,0.942,0.17442555011265587,0.036967300943126565,1000 +Learner g,Learner m,Score,level,Coverage,CI Length,Bias,repetition +LGBM,LGBM,IV-type,0.9,0.873,0.1600979705787658,0.041736453670531866,1000 +LGBM,LGBM,IV-type,0.95,0.937,0.19076849829726017,0.041736453670531866,1000 +LGBM,LGBM,partialling out,0.9,0.807,0.14701046434404016,0.043407336971130486,1000 +LGBM,LGBM,partialling out,0.95,0.887,0.17517377275621215,0.043407336971130486,1000 +LGBM,Lasso,IV-type,0.9,0.878,0.14908437061246727,0.03862236976140604,1000 +LGBM,Lasso,IV-type,0.95,0.926,0.17764498449616647,0.03862236976140604,1000 +LGBM,Lasso,partialling out,0.9,0.892,0.15981114790450912,0.039529461666836616,1000 +LGBM,Lasso,partialling out,0.95,0.945,0.19042672800093632,0.039529461666836616,1000 +Lasso,Lasso,IV-type,0.9,0.877,0.1404646476549414,0.03601132554422347,1000 +Lasso,Lasso,IV-type,0.95,0.928,0.16737395108830316,0.03601132554422347,1000 +Lasso,Lasso,partialling out,0.9,0.9,0.14736731076791165,0.03607425067346851,1000 +Lasso,Lasso,partialling out,0.95,0.938,0.17559898149657663,0.03607425067346851,1000 +Lasso,Random Forest,IV-type,0.9,0.839,0.13067912086907693,0.03663040619086667,1000 +Lasso,Random Forest,IV-type,0.95,0.901,0.1557137767385692,0.03663040619086667,1000 +Lasso,Random Forest,partialling out,0.9,0.753,0.14303542962976423,0.04845002977336067,1000 +Lasso,Random Forest,partialling out,0.95,0.854,0.17043722675016001,0.04845002977336067,1000 +Random Forest,Lasso,IV-type,0.9,0.883,0.14162830043619654,0.03632778967870182,1000 +Random Forest,Lasso,IV-type,0.95,0.933,0.16876052889948315,0.03632778967870182,1000 +Random Forest,Lasso,partialling out,0.9,0.888,0.1512642580778129,0.037711493804103186,1000 +Random Forest,Lasso,partialling out,0.95,0.948,0.18024248062130577,0.037711493804103186,1000 +Random Forest,Random Forest,IV-type,0.9,0.852,0.13195953745670919,0.036614704598155204,1000 +Random Forest,Random Forest,IV-type,0.95,0.911,0.15723948720656877,0.036614704598155204,1000 +Random Forest,Random Forest,partialling out,0.9,0.896,0.14282075762578683,0.03605962387417277,1000 +Random Forest,Random Forest,partialling out,0.95,0.94,0.17018142928016597,0.03605962387417277,1000 diff --git a/results/plm/plr_ate_metadata.csv b/results/plm/plr_ate_metadata.csv index b96ed32..16eb5fb 100644 --- a/results/plm/plr_ate_metadata.csv +++ b/results/plm/plr_ate_metadata.csv @@ -1,2 +1,2 @@ DoubleML Version,Script,Date,Total Runtime (minutes),Python Version,Config File -0.10.dev0,PLRATECoverageSimulation,2025-03-21 17:43,12.395700534184774,3.12.9,scripts/plm/plr_ate_config.yml +0.10.dev0,PLRATECoverageSimulation,2025-04-28 10:01,17.98821387688319,3.12.9,scripts/plm/plr_ate_config.yml diff --git a/scripts/plm/plr_ate_config.yml b/scripts/plm/plr_ate_config.yml index 93ee95c..e2067bc 100644 --- a/scripts/plm/plr_ate_config.yml +++ b/scripts/plm/plr_ate_config.yml @@ -24,6 +24,8 @@ dml_parameters: ml_m: ["Lasso"] - ml_g: ["LGBM"] ml_m: ["LGBM"] + - ml_g: ["LGBM"] + ml_m: ["Lasso"] score: ["partialling out", "IV-type"] From b9dac9161b562358a99d6176b50057f9276ca24c Mon Sep 17 00:00:00 2001 From: SvenKlaassen Date: Mon, 28 Apr 2025 13:18:20 +0200 Subject: [PATCH 60/60] rerun did multi sim --- doc/did/did_multi.qmd | 21 +++++- results/did/did_multi_detailed.csv | 96 ++++++++++++++-------------- results/did/did_multi_eventstudy.csv | 96 ++++++++++++++-------------- results/did/did_multi_group.csv | 96 ++++++++++++++-------------- results/did/did_multi_metadata.csv | 2 +- results/did/did_multi_time.csv | 96 ++++++++++++++-------------- 6 files changed, 213 insertions(+), 194 deletions(-) diff --git a/doc/did/did_multi.qmd b/doc/did/did_multi.qmd index ef05bda..0cfed2e 100644 --- a/doc/did/did_multi.qmd +++ b/doc/did/did_multi.qmd @@ -62,7 +62,13 @@ def make_pretty(df, level, n_rep): ## ATTE Coverage -The simulations are based on the the [make_did_SZ2020](https://docs.doubleml.org/stable/api/generated/doubleml.datasets.make_did_SZ2020.html)-DGP with $1000$ observations. Learners are only set to boosting, due to time constraints (and the nonlinearity of some of the DGPs). +The simulations are based on the the [make_did_CS2021](https://docs.doubleml.org/dev/api/generated/doubleml.did.datasets.make_did_CS2021.html)-DGP with $2000$ observations. Learners are both set to either boosting or a linear (logistic) model. Due to time constraints we only consider the following DGPs: + + - Type 1: Linear outcome model and treatment assignment + - Type 4: Nonlinear outcome model and treatment assignment + - Type 6: Randomized treatment assignment and nonlinear outcome model + +The non-uniform results (coverage, ci length and bias) refer to averaged values over all $ATTs$ (point-wise confidende intervals). ::: {.callout-note title="Metadata" collapse="true"} @@ -110,6 +116,8 @@ make_pretty(df_ate_9, level, n_rep) ### Experimental Score +The results are only valid for the DGP 6, as the experimental score assumes a randomized treatment assignment. + ```{python} #| echo: false score = "experimental" @@ -130,6 +138,10 @@ make_pretty(df_ate_9, level, n_rep) ## Aggregated Effects +These simulations test different types of aggregation, as described in [DiD User Guide](https://docs.doubleml.org/dev/guide/models.html#difference-in-differences-models-did). + +The non-uniform results (coverage, ci length and bias) refer to averaged values over all $ATTs$ (point-wise confidende intervals). + ### Group Effects ```{python} @@ -166,6 +178,8 @@ make_pretty(df_ate_9, level, n_rep) #### Experimental Score +The results are only valid for the DGP 6, as the experimental score assumes a randomized treatment assignment. + ```{python} #| echo: false score = "experimental" @@ -220,6 +234,8 @@ make_pretty(df_ate_9, level, n_rep) #### Experimental Score +The results are only valid for the DGP 6, as the experimental score assumes a randomized treatment assignment. + ```{python} #| echo: false score = "experimental" @@ -274,6 +290,9 @@ make_pretty(df_ate_9, level, n_rep) #### Experimental Score +The results are only valid for the DGP 6, as the experimental score assumes a randomized treatment assignment. + + ```{python} #| echo: false score = "experimental" diff --git a/results/did/did_multi_detailed.csv b/results/did/did_multi_detailed.csv index 5b60263..4b6d870 100644 --- a/results/did/did_multi_detailed.csv +++ b/results/did/did_multi_detailed.csv @@ -1,49 +1,49 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -LGBM,LGBM,experimental,False,1,0.9,0.40532081377151796,0.6677253898222073,0.45051314831034145,0.08450704225352113,1.0005469053604612,213 -LGBM,LGBM,experimental,False,1,0.95,0.5007824726134585,0.7956438762517957,0.45051314831034145,0.15492957746478872,1.1095167204679879,213 -LGBM,LGBM,experimental,False,4,0.9,0.548904538341158,0.5814196300250507,0.3237627211845255,0.24413145539906103,0.8948945048168284,213 -LGBM,LGBM,experimental,False,4,0.95,0.6381064162754303,0.6928042204373742,0.3237627211845255,0.3333333333333333,0.9852933278894489,213 -LGBM,LGBM,experimental,False,6,0.9,0.8974960876369327,0.5798375844479007,0.14088912748925403,0.8685446009389671,0.8915452790934116,213 -LGBM,LGBM,experimental,False,6,0.95,0.9464006259780908,0.6909190968602316,0.14088912748925403,0.9436619718309859,0.9825229360947381,213 -LGBM,LGBM,experimental,True,1,0.9,0.4123630672926447,0.6676885234807931,0.4519262895879074,0.06103286384976526,1.0019752546929692,213 -LGBM,LGBM,experimental,True,1,0.95,0.5066510172143975,0.7955999472965198,0.4519262895879074,0.1596244131455399,1.1110236525840373,213 -LGBM,LGBM,experimental,True,4,0.9,0.548904538341158,0.5813589039575363,0.3235983019273521,0.22065727699530516,0.8953221615501692,213 -LGBM,LGBM,experimental,True,4,0.95,0.63302034428795,0.6927318608648866,0.3235983019273521,0.3333333333333333,0.9865207873010946,213 -LGBM,LGBM,experimental,True,6,0.9,0.8959311424100157,0.5799660631056092,0.14000216987912564,0.892018779342723,0.892440611190863,213 -LGBM,LGBM,experimental,True,6,0.95,0.9471830985915493,0.6910721886233918,0.14000216987912564,0.9389671361502347,0.9816012226010797,213 -LGBM,LGBM,observational,False,1,0.9,0.9080594679186228,2.7888919178439227,0.7035607423224498,0.9483568075117371,4.334054524286509,213 -LGBM,LGBM,observational,False,1,0.95,0.9636150234741784,3.3231696888918334,0.7035607423224498,0.971830985915493,4.758567521024827,213 -LGBM,LGBM,observational,False,4,0.9,0.8986697965571204,3.4956058606970917,0.9669737969666872,0.9624413145539906,5.377062497216683,213 -LGBM,LGBM,observational,False,4,0.95,0.9643974960876369,4.165271291532112,0.9669737969666872,0.9859154929577465,5.921434465221159,213 -LGBM,LGBM,observational,False,6,0.9,0.9225352112676056,2.190208929252288,0.5167519307047893,0.9671361502347418,3.4154051265476033,213 -LGBM,LGBM,observational,False,6,0.95,0.969092331768388,2.6097949079569784,0.5167519307047893,0.9859154929577465,3.7483564185778286,213 -LGBM,LGBM,observational,True,1,0.9,0.9064945226917058,1.1368726933892221,0.2783026371207721,0.9389671361502347,1.7717588062983114,213 -LGBM,LGBM,observational,True,1,0.95,0.9620500782472613,1.3546673682932289,0.2783026371207721,0.9671361502347418,1.9429676563761076,213 -LGBM,LGBM,observational,True,4,0.9,0.9158841940532082,1.4254308754317884,0.33866283883400894,0.9014084507042254,2.202675700642339,213 -LGBM,LGBM,observational,True,4,0.95,0.9616588419405321,1.6985056496945854,0.33866283883400894,0.9530516431924883,2.421762282833961,213 -LGBM,LGBM,observational,True,6,0.9,0.9151017214397495,1.0463068305990617,0.24826243692564173,0.92018779342723,1.636975223567781,213 -LGBM,LGBM,observational,True,6,0.95,0.9604851330203443,1.246751486667643,0.24826243692564173,0.9765258215962441,1.7956888077887063,213 -Linear,Linear,experimental,False,1,0.9,0.8615023474178404,0.29480782482194634,0.0786421880740863,0.812206572769953,0.45940764438954385,213 -Linear,Linear,experimental,False,1,0.95,0.926056338028169,0.3512851900886226,0.0786421880740863,0.8826291079812206,0.5045899270443839,213 -Linear,Linear,experimental,False,4,0.9,0.28482003129890454,0.975894733280616,0.8330978501200553,0.018779342723004695,1.412718271492504,213 -Linear,Linear,experimental,False,4,0.95,0.3658059467918623,1.1628502977965955,0.8330978501200553,0.07511737089201878,1.575365705490123,213 -Linear,Linear,experimental,False,6,0.9,0.9049295774647887,0.9845361877515872,0.23869850791621902,0.8967136150234741,1.4224342348752608,213 -Linear,Linear,experimental,False,6,0.95,0.9483568075117371,1.17314722589988,0.23869850791621902,0.9530516431924883,1.5861522128436303,213 -Linear,Linear,experimental,True,1,0.9,0.8630672926447575,0.2947851759266125,0.07861158483452843,0.812206572769953,0.4597746703234241,213 -Linear,Linear,experimental,True,1,0.95,0.9264475743348983,0.35125820226525856,0.07861158483452843,0.892018779342723,0.5049192522960325,213 -Linear,Linear,experimental,True,4,0.9,0.2895148669796557,0.9759084550161325,0.8326923121552289,0.023474178403755867,1.4121969723711594,213 -Linear,Linear,experimental,True,4,0.95,0.365414710485133,1.1628666482529382,0.8326923121552289,0.07042253521126761,1.5761780385299982,213 -Linear,Linear,experimental,True,6,0.9,0.8986697965571204,0.9845444925351251,0.23872704179656282,0.892018779342723,1.4218091878908978,213 -Linear,Linear,experimental,True,6,0.95,0.9483568075117371,1.1731571216598229,0.23872704179656282,0.9483568075117371,1.5857684237069227,213 -Linear,Linear,observational,False,1,0.9,0.9119718309859155,0.31913264481306997,0.07504846382409917,0.9530516431924883,0.4966577096852585,213 -Linear,Linear,observational,False,1,0.95,0.9581377151799687,0.3802700008534462,0.07504846382409917,0.971830985915493,0.5457965923475415,213 -Linear,Linear,observational,False,4,0.9,0.4061032863849765,1.2274527144295637,0.8093030821575489,0.17370892018779344,1.7566478372130891,213 -Linear,Linear,observational,False,4,0.95,0.5093896713615024,1.4626001205144619,0.8093030821575489,0.27699530516431925,1.9631223954139048,213 -Linear,Linear,observational,False,6,0.9,0.9021909233176838,1.0316221276603512,0.24917990085463324,0.9061032863849765,1.488738970418394,213 -Linear,Linear,observational,False,6,0.95,0.954225352112676,1.2292535838683007,0.24917990085463324,0.9342723004694836,1.6622175036443294,213 -Linear,Linear,observational,True,1,0.9,0.9092331768388106,0.3171256867784898,0.07481042183312375,0.9248826291079812,0.493585500375777,213 -Linear,Linear,observational,True,1,0.95,0.9585289514866979,0.377878562854461,0.07481042183312375,0.9671361502347418,0.5423776539443926,213 -Linear,Linear,observational,True,4,0.9,0.3974960876369327,1.2240896932129774,0.8120340183488837,0.16901408450704225,1.7523471284937546,213 -Linear,Linear,observational,True,4,0.95,0.5003912363067292,1.4585928335706568,0.8120340183488837,0.27230046948356806,1.9580510608715704,213 -Linear,Linear,observational,True,6,0.9,0.9025821596244131,1.0267883142861962,0.25013308990604005,0.8967136150234741,1.4811458752504516,213 -Linear,Linear,observational,True,6,0.95,0.9503129890453834,1.223493739973321,0.25013308990604005,0.9483568075117371,1.6532118883170046,213 +LGBM,LGBM,experimental,False,1,0.9,0.4075,0.6680449671616123,0.4536971478292392,0.106,1.0014645995766545,1000 +LGBM,LGBM,experimental,False,1,0.95,0.4969166666666667,0.796024676138938,0.4536971478292392,0.149,1.1101910211253438,1000 +LGBM,LGBM,experimental,False,4,0.9,0.5299166666666666,0.5832956540561086,0.33011501262366927,0.221,0.8979294468476701,1000 +LGBM,LGBM,experimental,False,4,0.95,0.6176666666666666,0.695039640948207,0.33011501262366927,0.302,0.9884075405086947,1000 +LGBM,LGBM,experimental,False,6,0.9,0.89775,0.5802322315200278,0.1421029922499711,0.891,0.8927725918322601,1000 +LGBM,LGBM,experimental,False,6,0.95,0.9469166666666666,0.69138934785114,0.1421029922499711,0.948,0.9827083539024966,1000 +LGBM,LGBM,experimental,True,1,0.9,0.4046666666666667,0.6678639885704151,0.45277355982980805,0.085,1.0010411944316,1000 +LGBM,LGBM,experimental,True,1,0.95,0.4968333333333333,0.7958090268465587,0.45277355982980805,0.143,1.1099170693556415,1000 +LGBM,LGBM,experimental,True,4,0.9,0.5294166666666666,0.5833160278609535,0.32982215913570107,0.212,0.8981881991531053,1000 +LGBM,LGBM,experimental,True,4,0.95,0.6166666666666666,0.6950639178340466,0.32982215913570107,0.297,0.9891633208675981,1000 +LGBM,LGBM,experimental,True,6,0.9,0.89975,0.580193622985627,0.14218113073558258,0.901,0.8924214431904512,1000 +LGBM,LGBM,experimental,True,6,0.95,0.9490833333333334,0.691343342944879,0.14218113073558258,0.941,0.9821856487700115,1000 +LGBM,LGBM,observational,False,1,0.9,0.9114166666666667,2.745442581507895,0.7067512182439725,0.956,4.267995889646912,1000 +LGBM,LGBM,observational,False,1,0.95,0.9645833333333333,3.271396611351424,0.7067512182439725,0.987,4.685018272931908,1000 +LGBM,LGBM,observational,False,4,0.9,0.90725,3.522756602113769,0.964041513740829,0.962,5.420041663733542,1000 +LGBM,LGBM,observational,False,4,0.95,0.9638333333333333,4.197623395365736,0.964041513740829,0.992,5.964308172387913,1000 +LGBM,LGBM,observational,False,6,0.9,0.9243333333333333,2.1873521785120444,0.5149849766795307,0.961,3.4127245573450833,1000 +LGBM,LGBM,observational,False,6,0.95,0.96975,2.6063908794939334,0.5149849766795307,0.983,3.744841077573908,1000 +LGBM,LGBM,observational,True,1,0.9,0.9086666666666666,1.1201454805349786,0.27275770285583456,0.928,1.746888265672863,1000 +LGBM,LGBM,observational,True,1,0.95,0.9575833333333333,1.334735664815871,0.27275770285583456,0.973,1.916447134945182,1000 +LGBM,LGBM,observational,True,4,0.9,0.9208333333333334,1.415823117191095,0.3279182075028663,0.928,2.1893552276764523,1000 +LGBM,LGBM,observational,True,4,0.95,0.9615833333333333,1.6870572996314692,0.3279182075028663,0.968,2.408008384167633,1000 +LGBM,LGBM,observational,True,6,0.9,0.9035833333333334,1.0342009611787182,0.25272266117158226,0.925,1.6169600815502123,1000 +LGBM,LGBM,observational,True,6,0.95,0.9551666666666666,1.2323264535360365,0.25272266117158226,0.979,1.7730857540946194,1000 +Linear,Linear,experimental,False,1,0.9,0.8538333333333333,0.29474516889634966,0.08084244811337131,0.777,0.45978521833536623,1000 +Linear,Linear,experimental,False,1,0.95,0.9159166666666666,0.3512105309483955,0.08084244811337131,0.87,0.5045503638584217,1000 +Linear,Linear,experimental,False,4,0.9,0.3103333333333333,0.9755748479295066,0.8059915763717771,0.042,1.4116936904642545,1000 +Linear,Linear,experimental,False,4,0.95,0.3874166666666667,1.16246913089087,0.8059915763717771,0.078,1.5738462873560166,1000 +Linear,Linear,experimental,False,6,0.9,0.905,0.9844757965076787,0.23586020264982355,0.904,1.421142814988169,1000 +Linear,Linear,experimental,False,6,0.95,0.9513333333333334,1.1730752652943266,0.23586020264982355,0.957,1.5854008375388589,1000 +Linear,Linear,experimental,True,1,0.9,0.8529166666666667,0.2947409209064057,0.08090529833241722,0.773,0.4595811381839562,1000 +Linear,Linear,experimental,True,1,0.95,0.9155,0.3512054691561725,0.08090529833241722,0.873,0.5044085624001035,1000 +Linear,Linear,experimental,True,4,0.9,0.30975,0.9755981107617252,0.8057657027853717,0.045,1.4127941326439093,1000 +Linear,Linear,experimental,True,4,0.95,0.38825,1.1624968502651534,0.8057657027853717,0.082,1.5745211647752397,1000 +Linear,Linear,experimental,True,6,0.9,0.90425,0.9845527716230539,0.23562373204232834,0.902,1.4213288951702785,1000 +Linear,Linear,experimental,True,6,0.95,0.9529166666666666,1.1731669868015593,0.23562373204232834,0.954,1.5855821588385934,1000 +Linear,Linear,observational,False,1,0.9,0.9013333333333333,0.3180945635163335,0.07688429889402026,0.893,0.4947430553763157,1000 +Linear,Linear,observational,False,1,0.95,0.9528333333333334,0.379033050694909,0.07688429889402026,0.939,0.543298878262958,1000 +Linear,Linear,observational,False,4,0.9,0.41125,1.2376859429116744,0.7929800095241654,0.179,1.7688886396548633,1000 +Linear,Linear,observational,False,4,0.95,0.517,1.4747937643389757,0.7929800095241654,0.271,1.9773822754488526,1000 +Linear,Linear,observational,False,6,0.9,0.9018333333333334,1.0288570593763655,0.2510929759491061,0.907,1.4841286685672213,1000 +Linear,Linear,observational,False,6,0.95,0.951,1.225958801790062,0.2510929759491061,0.952,1.6571596022563468,1000 +Linear,Linear,observational,True,1,0.9,0.9031666666666667,0.31609423050346813,0.07696990405262741,0.896,0.4919409315123034,1000 +Linear,Linear,observational,True,1,0.95,0.951,0.3766495068962009,0.07696990405262741,0.938,0.540169288119527,1000 +Linear,Linear,observational,True,4,0.9,0.4071666666666667,1.2320142323935404,0.7928492798685264,0.177,1.7614082912050193,1000 +Linear,Linear,observational,True,4,0.95,0.5160833333333333,1.4680355044159439,0.7928492798685264,0.27,1.9699921213258018,1000 +Linear,Linear,observational,True,6,0.9,0.8995833333333334,1.0226446037500223,0.25004589301052516,0.908,1.4775056202619612,1000 +Linear,Linear,observational,True,6,0.95,0.9493333333333334,1.2185562043286982,0.25004589301052516,0.958,1.6496021973448636,1000 diff --git a/results/did/did_multi_eventstudy.csv b/results/did/did_multi_eventstudy.csv index 4fa42e2..001f0d3 100644 --- a/results/did/did_multi_eventstudy.csv +++ b/results/did/did_multi_eventstudy.csv @@ -1,49 +1,49 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -LGBM,LGBM,experimental,False,1,0.9,0.26682316118935834,0.6622375824605655,0.5243538462647854,0.056338028169014086,0.8701426791247259,213 -LGBM,LGBM,experimental,False,1,0.95,0.3536776212832551,0.7891047504556321,0.5243538462647854,0.1267605633802817,0.9861633495799307,213 -LGBM,LGBM,experimental,False,4,0.9,0.42018779342723006,0.5397134025420479,0.36782921374426986,0.2347417840375587,0.7367204561944273,213 -LGBM,LGBM,experimental,False,4,0.95,0.5093896713615024,0.6431081852046102,0.36782921374426986,0.3051643192488263,0.8269159137411304,213 -LGBM,LGBM,experimental,False,6,0.9,0.8982785602503913,0.5397256714323407,0.13160704162679182,0.8967136150234741,0.7342757718048839,213 -LGBM,LGBM,experimental,False,6,0.95,0.9452269170579031,0.6431228044890928,0.13160704162679182,0.9389671361502347,0.8250171863682804,213 -LGBM,LGBM,experimental,True,1,0.9,0.27543035993740217,0.6622447288518765,0.5255905786793094,0.07511737089201878,0.8706796918976001,213 -LGBM,LGBM,experimental,True,1,0.95,0.3528951486697966,0.789113265906101,0.5255905786793094,0.12206572769953052,0.9874062771819878,213 -LGBM,LGBM,experimental,True,4,0.9,0.4209702660406886,0.539617367359671,0.36821927198121057,0.215962441314554,0.7357672957148406,213 -LGBM,LGBM,experimental,True,4,0.95,0.5164319248826291,0.6429937522267312,0.36821927198121057,0.30985915492957744,0.8288989451123401,213 -LGBM,LGBM,experimental,True,6,0.9,0.9014084507042254,0.5399225408046261,0.1292906780015874,0.8967136150234741,0.7339466976154942,213 -LGBM,LGBM,experimental,True,6,0.95,0.9507042253521126,0.6433573888150266,0.1292906780015874,0.9436619718309859,0.8263333833176641,213 -LGBM,LGBM,observational,False,1,0.9,0.9123630672926448,2.7269358841905746,0.6816031541387337,0.9342723004694836,3.781203290646457,213 -LGBM,LGBM,observational,False,1,0.95,0.9616588419405321,3.2493445213536303,0.6816031541387337,0.9671361502347418,4.228041077301994,213 -LGBM,LGBM,observational,False,4,0.9,0.9029733959311425,3.5511206170645715,1.018654824118398,0.9483568075117371,4.8575699563427275,213 -LGBM,LGBM,observational,False,4,0.95,0.9663536776212833,4.231421203784447,1.018654824118398,0.9859154929577465,5.458812524946875,213 -LGBM,LGBM,observational,False,6,0.9,0.9295774647887324,2.041863507260759,0.4665627615323348,0.9624413145539906,2.8426224676151968,213 -LGBM,LGBM,observational,False,6,0.95,0.9694835680751174,2.433030435051469,0.4665627615323348,0.9812206572769953,3.18356908577058,213 -LGBM,LGBM,observational,True,1,0.9,0.9100156494522692,1.0814908047044909,0.2600800166830828,0.9577464788732394,1.502244204368126,213 -LGBM,LGBM,observational,True,1,0.95,0.9647887323943662,1.2886757776499587,0.2600800166830828,0.9859154929577465,1.6823665595158872,213 -LGBM,LGBM,observational,True,4,0.9,0.9115805946791862,1.403154807393043,0.3246882962897504,0.9107981220657277,1.9299041686105092,213 -LGBM,LGBM,observational,True,4,0.95,0.960093896713615,1.6719620774534347,0.3246882962897504,0.9765258215962441,2.166895198927391,213 -LGBM,LGBM,observational,True,6,0.9,0.9241001564945227,0.9737752733755018,0.2264381445557355,0.9342723004694836,1.3602874606089688,213 -LGBM,LGBM,observational,True,6,0.95,0.9687010954616588,1.1603248055505775,0.2264381445557355,0.9812206572769953,1.5224187709152517,213 -Linear,Linear,experimental,False,1,0.9,0.8341158059467918,0.20998106737125866,0.061899062784151526,0.7652582159624414,0.2996028187250719,213 -Linear,Linear,experimental,False,1,0.95,0.9029733959311425,0.25020787426885593,0.061899062784151526,0.8591549295774648,0.33240930837800786,213 -Linear,Linear,experimental,False,4,0.9,0.1807511737089202,0.9730009679010637,0.9721307660302038,0.028169014084507043,1.256083983812655,213 -Linear,Linear,experimental,False,4,0.95,0.23708920187793428,1.1594021636704344,0.9721307660302038,0.051643192488262914,1.428396179261707,213 -Linear,Linear,experimental,False,6,0.9,0.906885758998435,0.9854298640899793,0.24339544430970847,0.9107981220657277,1.2656744926088497,213 -Linear,Linear,experimental,False,6,0.95,0.9593114241001566,1.1742121069375506,0.24339544430970847,0.9530516431924883,1.4413505363335342,213 -Linear,Linear,experimental,True,1,0.9,0.8348982785602505,0.2099627194504422,0.061856168769670004,0.7793427230046949,0.29942447062231375,213 -Linear,Linear,experimental,True,1,0.95,0.9045383411580594,0.25018601137272817,0.061856168769670004,0.863849765258216,0.33328487064608875,213 -Linear,Linear,experimental,True,4,0.9,0.1784037558685446,0.9731050866936279,0.9717446920939297,0.023474178403755867,1.2558434801432536,213 -Linear,Linear,experimental,True,4,0.95,0.2386541471048513,1.1595262288639543,0.9717446920939297,0.03755868544600939,1.4299146167743415,213 -Linear,Linear,experimental,True,6,0.9,0.9053208137715181,0.9852714872782632,0.24399193882851944,0.9014084507042254,1.267861160411718,213 -Linear,Linear,experimental,True,6,0.95,0.960093896713615,1.1740233893265342,0.24399193882851944,0.9483568075117371,1.443537485029588,213 -Linear,Linear,observational,False,1,0.9,0.9107981220657277,0.22674203953973415,0.05310829726304523,0.9530516431924883,0.3233082882873686,213 -Linear,Linear,observational,False,1,0.95,0.9585289514866979,0.2701798044502516,0.05310829726304523,0.9765258215962441,0.3592475941554335,213 -Linear,Linear,observational,False,4,0.9,0.2887323943661972,1.2756761732160733,0.9456943329020079,0.14084507042253522,1.6261094879887326,213 -Linear,Linear,observational,False,4,0.95,0.3826291079812207,1.5200619158273276,0.9456943329020079,0.24882629107981222,1.8536382347186822,213 -Linear,Linear,observational,False,6,0.9,0.906885758998435,1.037889651864691,0.25273464054254857,0.9014084507042254,1.3331217150079602,213 -Linear,Linear,observational,False,6,0.95,0.9616588419405321,1.236721799587596,0.25273464054254857,0.9671361502347418,1.515590593938462,213 -Linear,Linear,observational,True,1,0.9,0.9076682316118936,0.22530459943280484,0.0533069330309219,0.9248826291079812,0.3211978013308667,213 -Linear,Linear,observational,True,1,0.95,0.956964006259781,0.2684669889186128,0.0533069330309219,0.9671361502347418,0.3574673488546094,213 -Linear,Linear,observational,True,4,0.9,0.2887323943661972,1.272430628595709,0.9479536730007299,0.13615023474178403,1.6232392076774989,213 -Linear,Linear,observational,True,4,0.95,0.37715179968701096,1.5161946108818285,0.9479536730007299,0.2347417840375587,1.8467379540520792,213 -Linear,Linear,observational,True,6,0.9,0.9084507042253521,1.0317588556139243,0.25525750450001883,0.892018779342723,1.3249439027516539,213 -Linear,Linear,observational,True,6,0.95,0.9546165884194053,1.2294165052737636,0.25525750450001883,0.9436619718309859,1.5099244752599217,213 +LGBM,LGBM,experimental,False,1,0.9,0.2773333333333333,0.6626045518107705,0.522867855758196,0.094,0.8719689840220125,1000 +LGBM,LGBM,experimental,False,1,0.95,0.36283333333333334,0.7895420214067043,0.522867855758196,0.158,0.9886637771221886,1000 +LGBM,LGBM,experimental,False,4,0.9,0.3938333333333333,0.5423717102556455,0.3757379581307739,0.194,0.7392960751600857,1000 +LGBM,LGBM,experimental,False,4,0.95,0.479,0.6462757542168954,0.3757379581307739,0.264,0.8306962596909588,1000 +LGBM,LGBM,experimental,False,6,0.9,0.8956666666666666,0.5400804810404962,0.13314000614919386,0.898,0.7351650544241372,1000 +LGBM,LGBM,experimental,False,6,0.95,0.9466666666666667,0.6435455862138364,0.13314000614919386,0.947,0.8273243164555155,1000 +LGBM,LGBM,experimental,True,1,0.9,0.2768333333333333,0.6622937180897325,0.5217226242176525,0.091,0.8717138733867956,1000 +LGBM,LGBM,experimental,True,1,0.95,0.3658333333333333,0.7891716401834556,0.5217226242176525,0.152,0.9876529061875685,1000 +LGBM,LGBM,experimental,True,4,0.9,0.3933333333333333,0.5423615108665333,0.375147127868488,0.204,0.7392089258951966,1000 +LGBM,LGBM,experimental,True,4,0.95,0.48483333333333334,0.6462636008951672,0.375147127868488,0.262,0.8313951598985703,1000 +LGBM,LGBM,experimental,True,6,0.9,0.8941666666666667,0.5400583613596837,0.13242666462844116,0.902,0.7355833403327472,1000 +LGBM,LGBM,experimental,True,6,0.95,0.9496666666666667,0.6435192289884688,0.13242666462844116,0.951,0.8267752210686313,1000 +LGBM,LGBM,observational,False,1,0.9,0.9066666666666666,2.6785002267926212,0.7027830335731305,0.935,3.7134051819110248,1000 +LGBM,LGBM,observational,False,1,0.95,0.9621666666666666,3.191629875799755,0.7027830335731305,0.984,4.160656505059937,1000 +LGBM,LGBM,observational,False,4,0.9,0.9005,3.580959271775508,1.0129156667143928,0.947,4.897774689889189,1000 +LGBM,LGBM,observational,False,4,0.95,0.9635,4.266976153855569,1.0129156667143928,0.984,5.498501266877488,1000 +LGBM,LGBM,observational,False,6,0.9,0.9366666666666666,2.047082334441657,0.4715072811284397,0.958,2.853576675766446,1000 +LGBM,LGBM,observational,False,6,0.95,0.9741666666666666,2.439249051193658,0.4715072811284397,0.987,3.1892914408734887,1000 +LGBM,LGBM,observational,True,1,0.9,0.9201666666666666,1.0641709628573668,0.25287090705292425,0.932,1.4824539176803035,1000 +LGBM,LGBM,observational,True,1,0.95,0.9665,1.2680379131724926,0.25287090705292425,0.978,1.6577133825348924,1000 +LGBM,LGBM,observational,True,4,0.9,0.9326666666666666,1.3943564202709642,0.30856807690289556,0.944,1.9168017330682388,1000 +LGBM,LGBM,observational,True,4,0.95,0.9703333333333334,1.6614781525626372,0.30856807690289556,0.971,2.148511682362267,1000 +LGBM,LGBM,observational,True,6,0.9,0.9151666666666667,0.9573320328321949,0.22907488070446952,0.913,1.3370821918396925,1000 +LGBM,LGBM,observational,True,6,0.95,0.9591666666666666,1.1407314759521614,0.22907488070446952,0.962,1.4957947189981935,1000 +Linear,Linear,experimental,False,1,0.9,0.817,0.21006790406781498,0.06498524801296603,0.737,0.29976758759741007,1000 +Linear,Linear,experimental,False,1,0.95,0.8856666666666666,0.25031134657484,0.06498524801296603,0.833,0.33300535734848774,1000 +Linear,Linear,experimental,False,4,0.9,0.18933333333333333,0.9734427949194336,0.942138101911535,0.038,1.2558595558187573,1000 +Linear,Linear,experimental,False,4,0.95,0.24733333333333332,1.1599286330347671,0.942138101911535,0.069,1.4288651478016126,1000 +Linear,Linear,experimental,False,6,0.9,0.9065,0.9849523054847754,0.23403368036933778,0.906,1.2670326741245848,1000 +Linear,Linear,experimental,False,6,0.95,0.952,1.1736430607614226,0.23403368036933778,0.955,1.4435472811359242,1000 +Linear,Linear,experimental,True,1,0.9,0.8145,0.21006532690992177,0.06500905435434473,0.734,0.29970221642180794,1000 +Linear,Linear,experimental,True,1,0.95,0.8853333333333334,0.25030827570180275,0.06500905435434473,0.834,0.33296575349616914,1000 +Linear,Linear,experimental,True,4,0.9,0.189,0.9734779604068052,0.9419454231659742,0.038,1.25555326975786,1000 +Linear,Linear,experimental,True,4,0.95,0.24633333333333332,1.1599705352974472,0.9419454231659742,0.066,1.4299298399327454,1000 +Linear,Linear,experimental,True,6,0.9,0.9061666666666667,0.9850538588038303,0.23377313789727483,0.912,1.2674797492572467,1000 +Linear,Linear,experimental,True,6,0.95,0.9508333333333334,1.1737640690047073,0.23377313789727483,0.95,1.4423184941823244,1000 +Linear,Linear,observational,False,1,0.9,0.9008333333333334,0.22585835702659715,0.055198305642099925,0.903,0.3219559925076124,1000 +Linear,Linear,observational,False,1,0.95,0.9493333333333334,0.2691268317898658,0.055198305642099925,0.951,0.3578971740736594,1000 +Linear,Linear,observational,False,4,0.9,0.3001666666666667,1.2881377082934642,0.9264616976612766,0.163,1.639263108397286,1000 +Linear,Linear,observational,False,4,0.95,0.4008333333333333,1.5349107507288475,0.9264616976612766,0.244,1.8723351782709725,1000 +Linear,Linear,observational,False,6,0.9,0.8998333333333334,1.0342754505626182,0.2518778497516304,0.909,1.3276970785481759,1000 +Linear,Linear,observational,False,6,0.95,0.9535,1.2324152131115282,0.2518778497516304,0.955,1.5123233523398487,1000 +Linear,Linear,observational,True,1,0.9,0.8995,0.22457078985998344,0.055139777813084254,0.904,0.32046882903257323,1000 +Linear,Linear,observational,True,1,0.95,0.9498333333333334,0.2675926008814802,0.055139777813084254,0.947,0.355693484257242,1000 +Linear,Linear,observational,True,4,0.9,0.2946666666666667,1.2826973392587848,0.9269334367870915,0.157,1.6336078115558887,1000 +Linear,Linear,observational,True,4,0.95,0.39716666666666667,1.5284281511857252,0.9269334367870915,0.246,1.8624810463087826,1000 +Linear,Linear,observational,True,6,0.9,0.9,1.0272584761953654,0.25114610536900006,0.903,1.3196383656761783,1000 +Linear,Linear,observational,True,6,0.95,0.9505,1.2240539724425055,0.25114610536900006,0.947,1.504218761028933,1000 diff --git a/results/did/did_multi_group.csv b/results/did/did_multi_group.csv index 62f4f74..4577e7d 100644 --- a/results/did/did_multi_group.csv +++ b/results/did/did_multi_group.csv @@ -1,49 +1,49 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -LGBM,LGBM,experimental,False,1,0.9,0.3693270735524256,0.708884244644098,0.5076546102817214,0.06103286384976526,0.882195284078658,213 -LGBM,LGBM,experimental,False,1,0.95,0.4647887323943662,0.8446876767298539,0.5076546102817214,0.11267605633802817,1.0067497752917671,213 -LGBM,LGBM,experimental,False,4,0.9,0.5195618153364632,0.6064387804155298,0.359662593918017,0.25821596244131456,0.7713300371315813,213 -LGBM,LGBM,experimental,False,4,0.95,0.5978090766823161,0.7226163769026358,0.359662593918017,0.3380281690140845,0.8748104224057969,213 -LGBM,LGBM,experimental,False,6,0.9,0.9092331768388106,0.6042340581300409,0.1416554625702024,0.9107981220657277,0.7682371008294206,213 -LGBM,LGBM,experimental,False,6,0.95,0.9577464788732394,0.7199892882640683,0.1416554625702024,0.9483568075117371,0.870262886919318,213 -LGBM,LGBM,experimental,True,1,0.9,0.3677621283255086,0.7085175778049067,0.5104390456686334,0.056338028169014086,0.8825002852337448,213 -LGBM,LGBM,experimental,True,1,0.95,0.4507042253521127,0.8442507662428873,0.5104390456686334,0.12206572769953052,1.0062240433084881,213 -LGBM,LGBM,experimental,True,4,0.9,0.5258215962441315,0.6064876511923051,0.36017808744116137,0.25821596244131456,0.7719006127371255,213 -LGBM,LGBM,experimental,True,4,0.95,0.5978090766823161,0.7226746100249068,0.36017808744116137,0.3333333333333333,0.8726253533549294,213 -LGBM,LGBM,experimental,True,6,0.9,0.9014084507042254,0.604203709489697,0.14275606325160778,0.9154929577464789,0.7672972320908118,213 -LGBM,LGBM,experimental,True,6,0.95,0.9530516431924883,0.7199531256286343,0.14275606325160778,0.9483568075117371,0.8695916856047146,213 -LGBM,LGBM,observational,False,1,0.9,0.9107981220657277,2.737968904315236,0.6906077542931626,0.9577464788732394,3.466560664161931,213 -LGBM,LGBM,observational,False,1,0.95,0.971830985915493,3.262491175700692,0.6906077542931626,0.9906103286384976,3.938148528130814,213 -LGBM,LGBM,observational,False,4,0.9,0.8998435054773083,3.4853596050908524,0.981231747763395,0.9483568075117371,4.38755346147407,213 -LGBM,LGBM,observational,False,4,0.95,0.9687010954616588,4.1530621249317745,0.981231747763395,0.9812206572769953,5.000742699990643,213 -LGBM,LGBM,observational,False,6,0.9,0.9342723004694836,2.1582835144043524,0.5017788160614094,0.9530516431924883,2.7425698151441735,213 -LGBM,LGBM,observational,False,6,0.95,0.9702660406885758,2.5717534298168085,0.5017788160614094,0.9953051643192489,3.1128624608102506,213 -LGBM,LGBM,observational,True,1,0.9,0.9280125195618153,1.1093798369638577,0.25610979031670084,0.9530516431924883,1.4076058946929795,213 -LGBM,LGBM,observational,True,1,0.95,0.971830985915493,1.321907609283113,0.25610979031670084,0.9859154929577465,1.5985772932515239,213 -LGBM,LGBM,observational,True,4,0.9,0.9327073552425664,1.4461233643972167,0.31965791533832816,0.92018779342723,1.8268542671941947,213 -LGBM,LGBM,observational,True,4,0.95,0.9687010954616588,1.7231622710852061,0.31965791533832816,0.9624413145539906,2.070646982862953,213 -LGBM,LGBM,observational,True,6,0.9,0.9264475743348983,1.0398792853809842,0.23201299260824648,0.9483568075117371,1.324644293094784,213 -LGBM,LGBM,observational,True,6,0.95,0.9702660406885758,1.2390925941497821,0.23201299260824648,0.9812206572769953,1.4997012284669375,213 -Linear,Linear,experimental,False,1,0.9,0.8560250391236307,0.26407013736077695,0.07094767690782731,0.8169014084507042,0.3389521437809375,213 -Linear,Linear,experimental,False,1,0.95,0.9139280125195618,0.3146589764214549,0.07094767690782731,0.8873239436619719,0.38350827711408936,213 -Linear,Linear,experimental,False,4,0.9,0.27230046948356806,1.0786207639130556,0.9426621361337196,0.03286384976525822,1.3615655693211501,213 -Linear,Linear,experimental,False,4,0.95,0.3552425665101721,1.2852559131141705,0.9426621361337196,0.046948356807511735,1.5443642966188706,213 -Linear,Linear,experimental,False,6,0.9,0.9014084507042254,1.086940152832102,0.2642921344674123,0.892018779342723,1.3702177051651498,213 -Linear,Linear,experimental,False,6,0.95,0.94679186228482,1.295169076442225,0.2642921344674123,0.9483568075117371,1.5571699954658127,213 -Linear,Linear,experimental,True,1,0.9,0.8528951486697965,0.2640439587928754,0.07088851582983956,0.812206572769953,0.339083864893176,213 -Linear,Linear,experimental,True,1,0.95,0.9154929577464789,0.3146277827338141,0.07088851582983956,0.8826291079812206,0.38312094217167864,213 -Linear,Linear,experimental,True,4,0.9,0.27699530516431925,1.078544852418315,0.9421760966442201,0.028169014084507043,1.3631634517660862,213 -Linear,Linear,experimental,True,4,0.95,0.3536776212832551,1.2851654589890942,0.9421760966442201,0.046948356807511735,1.5459949955394454,213 -Linear,Linear,experimental,True,6,0.9,0.8998435054773083,1.0870319591890836,0.26434478098666997,0.8967136150234741,1.367426197613625,213 -Linear,Linear,experimental,True,6,0.95,0.9499217527386542,1.2952784704638494,0.26434478098666997,0.9483568075117371,1.5548813763151852,213 -Linear,Linear,observational,False,1,0.9,0.9248826291079812,0.2846621401319301,0.06429577875305519,0.8967136150234741,0.3655365252469558,213 -Linear,Linear,observational,False,1,0.95,0.9577464788732394,0.3391958611263939,0.06429577875305519,0.971830985915493,0.41327949655526525,213 -Linear,Linear,observational,False,4,0.9,0.39593114241001565,1.3672940532100943,0.9229063221181599,0.2112676056338028,1.7134288502030837,213 -Linear,Linear,observational,False,4,0.95,0.49921752738654146,1.6292313532690044,0.9229063221181599,0.27699530516431925,1.947435370381994,213 -Linear,Linear,observational,False,6,0.9,0.9076682316118936,1.1353183733765209,0.27380744335153234,0.892018779342723,1.4258387377000505,213 -Linear,Linear,observational,False,6,0.95,0.9561815336463223,1.3528152817638088,0.27380744335153234,0.9483568075117371,1.6252330516275495,213 -Linear,Linear,observational,True,1,0.9,0.9264475743348983,0.28301907230361883,0.06401666018609901,0.9154929577464789,0.36387049373088004,213 -Linear,Linear,observational,True,1,0.95,0.9593114241001566,0.3372380250521804,0.06401666018609901,0.9671361502347418,0.4105275870569728,213 -Linear,Linear,observational,True,4,0.9,0.378716744913928,1.361620669698774,0.927537201831293,0.1643192488262911,1.7047616897800275,213 -Linear,Linear,observational,True,4,0.95,0.4851330203442879,1.6224710998516352,0.927537201831293,0.26291079812206575,1.9443472630225822,213 -Linear,Linear,observational,True,6,0.9,0.9076682316118936,1.133591251127291,0.2759477199749895,0.9061032863849765,1.4226242751289748,213 -Linear,Linear,observational,True,6,0.95,0.9561815336463223,1.350757288669516,0.2759477199749895,0.9389671361502347,1.6207174667832518,213 +LGBM,LGBM,experimental,False,1,0.9,0.3693333333333333,0.7090618838563275,0.5111796103100933,0.098,0.8834434530622941,1000 +LGBM,LGBM,experimental,False,1,0.95,0.457,0.8448993469067663,0.5111796103100933,0.15,1.0080037041506986,1000 +LGBM,LGBM,experimental,False,4,0.9,0.497,0.6087390167901283,0.36720880128006417,0.217,0.774260771043429,1000 +LGBM,LGBM,experimental,False,4,0.95,0.5726666666666667,0.7253572775981572,0.36720880128006417,0.294,0.877573878123127,1000 +LGBM,LGBM,experimental,False,6,0.9,0.8963333333333334,0.6042015023199375,0.1487014306219813,0.898,0.7683506574226486,1000 +LGBM,LGBM,experimental,False,6,0.95,0.946,0.7199504956236503,0.1487014306219813,0.95,0.8706934749916513,1000 +LGBM,LGBM,experimental,True,1,0.9,0.3693333333333333,0.7088276284561316,0.5100920077392831,0.095,0.8831117334680723,1000 +LGBM,LGBM,experimental,True,1,0.95,0.4593333333333333,0.8446202143809021,0.5100920077392831,0.149,1.0075868805021413,1000 +LGBM,LGBM,experimental,True,4,0.9,0.48733333333333334,0.608736701830607,0.3667881388739205,0.216,0.7745575652923691,1000 +LGBM,LGBM,experimental,True,4,0.95,0.5736666666666667,0.7253545191537504,0.3667881388739205,0.295,0.8778827366167912,1000 +LGBM,LGBM,experimental,True,6,0.9,0.899,0.604250930969376,0.1495234417868854,0.898,0.7682500838441857,1000 +LGBM,LGBM,experimental,True,6,0.95,0.9453333333333334,0.7200093934922003,0.1495234417868854,0.95,0.8709685843875979,1000 +LGBM,LGBM,observational,False,1,0.9,0.9,2.6971392785657455,0.6901553548374239,0.919,3.411470555576068,1000 +LGBM,LGBM,observational,False,1,0.95,0.9613333333333334,3.2138396758589907,0.6901553548374239,0.97,3.8678725516778805,1000 +LGBM,LGBM,observational,False,4,0.9,0.9003333333333333,3.5517665818725503,0.9862765905072444,0.937,4.473068863007264,1000 +LGBM,LGBM,observational,False,4,0.95,0.9633333333333334,4.232190918328146,0.9862765905072444,0.982,5.078528143642635,1000 +LGBM,LGBM,observational,False,6,0.9,0.9333333333333333,2.1375025707197612,0.47971143636998764,0.958,2.7140218542317642,1000 +LGBM,LGBM,observational,False,6,0.95,0.9773333333333334,2.5469914081273513,0.47971143636998764,0.984,3.078750950800444,1000 +LGBM,LGBM,observational,True,1,0.9,0.9256666666666666,1.1007812174115272,0.25632528420376455,0.937,1.3967609545848296,1000 +LGBM,LGBM,observational,True,1,0.95,0.9656666666666667,1.3116617221335285,0.25632528420376455,0.969,1.5846481814277837,1000 +LGBM,LGBM,observational,True,4,0.9,0.9343333333333333,1.429297891139419,0.31328855982491516,0.938,1.808718069226331,1000 +LGBM,LGBM,observational,True,4,0.95,0.9646666666666667,1.7031134831153947,0.31328855982491516,0.967,2.0527141926185926,1000 +LGBM,LGBM,observational,True,6,0.9,0.9136666666666666,1.0219925280244282,0.2348945180206688,0.936,1.3014898205564045,1000 +LGBM,LGBM,observational,True,6,0.95,0.9653333333333334,1.2177792081775416,0.2348945180206688,0.978,1.474241987153884,1000 +Linear,Linear,experimental,False,1,0.9,0.8226666666666667,0.26405110817914795,0.0758088186934543,0.776,0.3392838427555131,1000 +Linear,Linear,experimental,False,1,0.95,0.8933333333333334,0.31463630175299984,0.0758088186934543,0.874,0.38300653689933123,1000 +Linear,Linear,experimental,False,4,0.9,0.3053333333333333,1.0785313702835313,0.9123130979795715,0.045,1.3606427802370482,1000 +Linear,Linear,experimental,False,4,0.95,0.3843333333333333,1.2851493940346341,0.9123130979795715,0.079,1.5446620015837293,1000 +Linear,Linear,experimental,False,6,0.9,0.9056666666666666,1.0870764263273311,0.2607121561223498,0.901,1.3682204780882954,1000 +Linear,Linear,experimental,False,6,0.95,0.9513333333333334,1.29533145632717,0.2607121561223498,0.948,1.556289105889985,1000 +Linear,Linear,experimental,True,1,0.9,0.824,0.26405675304370047,0.07591124645446254,0.772,0.3393263236958688,1000 +Linear,Linear,experimental,True,1,0.95,0.8926666666666666,0.31464302802398175,0.07591124645446254,0.87,0.382883555108476,1000 +Linear,Linear,experimental,True,4,0.9,0.30466666666666664,1.0784761507853573,0.9121132500261275,0.044,1.3601992647180394,1000 +Linear,Linear,experimental,True,4,0.95,0.3833333333333333,1.285083595944219,0.9121132500261275,0.076,1.5456058645388697,1000 +Linear,Linear,experimental,True,6,0.9,0.905,1.0871122885581,0.2601381436753874,0.897,1.3681142199253378,1000 +Linear,Linear,experimental,True,6,0.95,0.9513333333333334,1.2953741888108152,0.2601381436753874,0.948,1.5560366914154038,1000 +Linear,Linear,observational,False,1,0.9,0.907,0.2838406291881686,0.06854380714075585,0.903,0.3644989223278674,1000 +Linear,Linear,observational,False,1,0.95,0.9536666666666667,0.3382169704602,0.06854380714075585,0.955,0.4119659171700313,1000 +Linear,Linear,observational,False,4,0.9,0.3896666666666666,1.3793090866961302,0.9060696880499091,0.182,1.727333391598365,1000 +Linear,Linear,observational,False,4,0.95,0.502,1.6435481487089234,0.9060696880499091,0.277,1.9678561123774285,1000 +Linear,Linear,observational,False,6,0.9,0.9006666666666666,1.1329773275418917,0.2756511834772872,0.897,1.4227222931693604,1000 +Linear,Linear,observational,False,6,0.95,0.95,1.3500257535973816,0.2756511834772872,0.956,1.6192696646621554,1000 +Linear,Linear,observational,True,1,0.9,0.905,0.28206805358565534,0.06847739799438014,0.903,0.3623012265377661,1000 +Linear,Linear,observational,True,1,0.95,0.9546666666666667,0.3361048163548895,0.06847739799438014,0.955,0.4091813447198787,1000 +Linear,Linear,observational,True,4,0.9,0.3823333333333333,1.372259681779957,0.9050872305577908,0.182,1.7192091248898727,1000 +Linear,Linear,observational,True,4,0.95,0.493,1.6351482646573883,0.9050872305577908,0.267,1.957658584559894,1000 +Linear,Linear,observational,True,6,0.9,0.901,1.127050772935463,0.2741295722587394,0.894,1.4170565606861187,1000 +Linear,Linear,observational,True,6,0.95,0.9463333333333334,1.3429638282134566,0.2741295722587394,0.955,1.6106885004026728,1000 diff --git a/results/did/did_multi_metadata.csv b/results/did/did_multi_metadata.csv index afcf3e3..7bdadd5 100644 --- a/results/did/did_multi_metadata.csv +++ b/results/did/did_multi_metadata.csv @@ -1,2 +1,2 @@ DoubleML Version,Script,Date,Total Runtime (minutes),Python Version,Config File -0.10.dev0,DIDMultiCoverageSimulation,2025-04-24 13:16,342.5480104605357,3.12.3,scripts/did/did_pa_multi_config.yml +0.10.dev0,DIDMultiCoverageSimulation,2025-04-28 13:09,156.835364429156,3.12.9,scripts/did/did_pa_multi_config.yml diff --git a/results/did/did_multi_time.csv b/results/did/did_multi_time.csv index 366e2db..5602827 100644 --- a/results/did/did_multi_time.csv +++ b/results/did/did_multi_time.csv @@ -1,49 +1,49 @@ Learner g,Learner m,Score,In-sample-norm.,DGP,level,Coverage,CI Length,Bias,Uniform Coverage,Uniform CI Length,repetition -LGBM,LGBM,experimental,False,1,0.9,0.0892018779342723,0.6735044298830777,0.5847473306131643,0.06103286384976526,0.8011157200032835,213 -LGBM,LGBM,experimental,False,1,0.95,0.17214397496087636,0.8025300272131505,0.5847473306131643,0.11267605633802817,0.9212869785087825,213 -LGBM,LGBM,experimental,False,4,0.9,0.26917057902973396,0.5421756711901682,0.40575619933105894,0.22065727699530516,0.6593899758823104,213 -LGBM,LGBM,experimental,False,4,0.95,0.3630672926447574,0.6460421592625465,0.40575619933105894,0.27230046948356806,0.7560532967515187,213 -LGBM,LGBM,experimental,False,6,0.9,0.9061032863849765,0.5400510579454025,0.1320131828976933,0.8967136150234741,0.655954994913595,213 -LGBM,LGBM,experimental,False,6,0.95,0.9436619718309859,0.6435105264335905,0.1320131828976933,0.9530516431924883,0.7541743667823617,213 -LGBM,LGBM,experimental,True,1,0.9,0.10172143974960875,0.6733529287914019,0.5852776399276569,0.06103286384976526,0.7967235061979042,213 -LGBM,LGBM,experimental,True,1,0.95,0.17370892018779344,0.8023495025278913,0.5852776399276569,0.13145539906103287,0.9244790434903511,213 -LGBM,LGBM,experimental,True,4,0.9,0.27699530516431925,0.5420776526750094,0.40698586915558177,0.19718309859154928,0.6590010475339207,213 -LGBM,LGBM,experimental,True,4,0.95,0.36619718309859156,0.6459253629978932,0.40698586915558177,0.29107981220657275,0.756935199686189,213 -LGBM,LGBM,experimental,True,6,0.9,0.9092331768388106,0.5402460899427872,0.13118228677637048,0.9342723004694836,0.656709876900506,213 -LGBM,LGBM,experimental,True,6,0.95,0.9624413145539906,0.6437429213922929,0.13118228677637048,0.9577464788732394,0.752708121867163,213 -LGBM,LGBM,observational,False,1,0.9,0.9092331768388106,2.949178578913003,0.7288513967921139,0.9389671361502347,3.640414629214853,213 -LGBM,LGBM,observational,False,1,0.95,0.971830985915493,3.5141630257760554,0.7288513967921139,0.971830985915493,4.150557782712354,213 -LGBM,LGBM,observational,False,4,0.9,0.9014084507042254,3.8964402739946777,1.1223719380630706,0.9530516431924883,4.764333689391444,213 -LGBM,LGBM,observational,False,4,0.95,0.9671361502347418,4.6428949541819975,1.1223719380630706,0.971830985915493,5.471006129563335,213 -LGBM,LGBM,observational,False,6,0.9,0.9327073552425664,2.0285442450363886,0.4469362530691951,0.9436619718309859,2.5322168766535476,213 -LGBM,LGBM,observational,False,6,0.95,0.974960876369327,2.4171595552159215,0.4469362530691951,0.971830985915493,2.88178088183908,213 -LGBM,LGBM,observational,True,1,0.9,0.9311424100156495,1.123106120095932,0.26198849206178,0.9483568075117371,1.3900521401677945,213 -LGBM,LGBM,observational,True,1,0.95,0.9812206572769953,1.3382634844440697,0.26198849206178,0.971830985915493,1.590522570297692,213 -LGBM,LGBM,observational,True,4,0.9,0.9389671361502347,1.5058133543184269,0.3406931806329066,0.9389671361502347,1.8423134951538827,213 -LGBM,LGBM,observational,True,4,0.95,0.974960876369327,1.794287280974358,0.3406931806329066,0.9765258215962441,2.1083548286609535,213 -LGBM,LGBM,observational,True,6,0.9,0.9295774647887324,0.9567250856892477,0.21575142072047634,0.9248826291079812,1.1904853742941865,213 -LGBM,LGBM,observational,True,6,0.95,0.9687010954616588,1.1400082538239402,0.21575142072047634,0.9624413145539906,1.3586919640085193,213 -Linear,Linear,experimental,False,1,0.9,0.8372456964006261,0.24439003484018698,0.06945083196171528,0.7934272300469484,0.3129341078438043,213 -Linear,Linear,experimental,False,1,0.95,0.9061032863849765,0.29120868788489906,0.06945083196171528,0.8967136150234741,0.3539477153716639,213 -Linear,Linear,experimental,False,4,0.9,0.0297339593114241,0.9657374450457906,1.10215836325763,0.018779342723004695,1.1083961248126262,213 -Linear,Linear,experimental,False,4,0.95,0.05007824726134585,1.1507471423579276,1.10215836325763,0.03755868544600939,1.2889435969715142,213 -Linear,Linear,experimental,False,6,0.9,0.8826291079812206,0.9660570269958759,0.24916879933420294,0.863849765258216,1.1099601757570683,213 -Linear,Linear,experimental,False,6,0.95,0.9405320813771518,1.1511279477390344,0.24916879933420294,0.9483568075117371,1.2907822410705019,213 -Linear,Linear,experimental,True,1,0.9,0.8435054773082942,0.2443806338560857,0.06938368490846683,0.7981220657276995,0.31301675619249564,213 -Linear,Linear,experimental,True,1,0.95,0.9061032863849765,0.2911974859214199,0.06938368490846683,0.892018779342723,0.3540111034488695,213 -Linear,Linear,experimental,True,4,0.9,0.028169014084507043,0.9656711081516489,1.101877793396912,0.018779342723004695,1.10638268902308,213 -Linear,Linear,experimental,True,4,0.95,0.051643192488262914,1.1506680970731475,1.101877793396912,0.03755868544600939,1.2854015212203158,213 -Linear,Linear,experimental,True,6,0.9,0.8826291079812206,0.9661738823391016,0.24920436172242275,0.8826291079812206,1.109718677746468,213 -Linear,Linear,experimental,True,6,0.95,0.9499217527386542,1.1512671894687365,0.24920436172242275,0.9436619718309859,1.289880357441484,213 -Linear,Linear,observational,False,1,0.9,0.92018779342723,0.2751888265519432,0.06174150416456478,0.92018779342723,0.35292004587977904,213 -Linear,Linear,observational,False,1,0.95,0.9530516431924883,0.32790771175747974,0.06174150416456478,0.971830985915493,0.3984225349256207,213 -Linear,Linear,observational,False,4,0.9,0.14241001564945227,1.3371389555418136,1.0786049675340639,0.11737089201877934,1.5095232758334527,213 -Linear,Linear,observational,False,4,0.95,0.2331768388106416,1.5932993381573268,1.0786049675340639,0.19248826291079812,1.7603486086872133,213 -Linear,Linear,observational,False,6,0.9,0.892018779342723,1.0174596865123355,0.2598926764856041,0.863849765258216,1.169235918197709,213 -Linear,Linear,observational,False,6,0.95,0.9389671361502347,1.2123779943760464,0.2598926764856041,0.9483568075117371,1.3563715660755367,213 -Linear,Linear,observational,True,1,0.9,0.9186228482003129,0.27330760979256297,0.06141517644317234,0.9154929577464789,0.3497979849970347,213 -Linear,Linear,observational,True,1,0.95,0.9577464788732394,0.32566610372921273,0.06141517644317234,0.9577464788732394,0.39565988623663145,213 -Linear,Linear,observational,True,4,0.9,0.12206572769953052,1.3286076657019632,1.085838237023361,0.09389671361502347,1.496899245381295,213 -Linear,Linear,observational,True,4,0.95,0.19874804381846634,1.5831336793085395,1.085838237023361,0.19248826291079812,1.74994500832392,213 -Linear,Linear,observational,True,6,0.9,0.8857589984350547,1.0121360659183458,0.2604339364788449,0.8779342723004695,1.1644370852327328,213 -Linear,Linear,observational,True,6,0.95,0.9389671361502347,1.2060345091803977,0.2604339364788449,0.9530516431924883,1.3523232762515875,213 +LGBM,LGBM,experimental,False,1,0.9,0.11766666666666666,0.6731572956149301,0.5832820839737466,0.099,0.7989776290413337,1000 +LGBM,LGBM,experimental,False,1,0.95,0.1923333333333333,0.8021163912201231,0.5832820839737466,0.149,0.9224993978404457,1000 +LGBM,LGBM,experimental,False,4,0.9,0.23366666666666666,0.5447994479218712,0.4179640524001073,0.178,0.6614136904463536,1000 +LGBM,LGBM,experimental,False,4,0.95,0.319,0.64916858207206,0.4179640524001073,0.256,0.7590437921742824,1000 +LGBM,LGBM,experimental,False,6,0.9,0.8966666666666666,0.5401491345809801,0.13172564187495983,0.889,0.6572599396615105,1000 +LGBM,LGBM,experimental,False,6,0.95,0.947,0.6436273919529943,0.13172564187495983,0.944,0.7536910938049102,1000 +LGBM,LGBM,experimental,True,1,0.9,0.122,0.6728842898473247,0.5812558555265437,0.081,0.7992162215772003,1000 +LGBM,LGBM,experimental,True,1,0.95,0.189,0.8017910847835437,0.5812558555265437,0.146,0.9225442459658868,1000 +LGBM,LGBM,experimental,True,4,0.9,0.232,0.5447888656854911,0.41729708994692727,0.175,0.6612781336972435,1000 +LGBM,LGBM,experimental,True,4,0.95,0.3163333333333333,0.6491559725596747,0.41729708994692727,0.245,0.7593858569402892,1000 +LGBM,LGBM,experimental,True,6,0.9,0.895,0.5400820206526399,0.13313828900767166,0.898,0.657255686550692,1000 +LGBM,LGBM,experimental,True,6,0.95,0.9483333333333334,0.643547420774859,0.13313828900767166,0.949,0.7539574257806553,1000 +LGBM,LGBM,observational,False,1,0.9,0.9056666666666666,2.932074123585019,0.7666467112765889,0.927,3.627128157933152,1000 +LGBM,LGBM,observational,False,1,0.95,0.9603333333333334,3.4937818101659124,0.7666467112765889,0.971,4.134373063899901,1000 +LGBM,LGBM,observational,False,4,0.9,0.894,3.9470940097005456,1.1195205693916876,0.917,4.8219415231624065,1000 +LGBM,LGBM,observational,False,4,0.95,0.963,4.7032526030567565,1.1195205693916876,0.974,5.523120200075401,1000 +LGBM,LGBM,observational,False,6,0.9,0.94,2.0192816252583667,0.44586147823817046,0.951,2.520911291299334,1000 +LGBM,LGBM,observational,False,6,0.95,0.978,2.406122462996927,0.44586147823817046,0.981,2.872779021079969,1000 +LGBM,LGBM,observational,True,1,0.9,0.9186666666666666,1.1060802678030524,0.2591448910709429,0.936,1.3677990581020218,1000 +LGBM,LGBM,observational,True,1,0.95,0.9686666666666667,1.3179759301271605,0.2591448910709429,0.977,1.5635220501464264,1000 +LGBM,LGBM,observational,True,4,0.9,0.9393333333333334,1.4819923634298338,0.3238962695469174,0.942,1.8118202975608613,1000 +LGBM,LGBM,observational,True,4,0.95,0.9726666666666667,1.7659028196139692,0.3238962695469174,0.975,2.076024587088288,1000 +LGBM,LGBM,observational,True,6,0.9,0.9113333333333333,0.9380198886395359,0.22149912971044713,0.915,1.168142275483958,1000 +LGBM,LGBM,observational,True,6,0.95,0.959,1.117719636806323,0.22149912971044713,0.97,1.332778139436294,1000 +Linear,Linear,experimental,False,1,0.9,0.809,0.24421211418873565,0.0747953478696107,0.731,0.3129524804889013,1000 +Linear,Linear,experimental,False,1,0.95,0.8713333333333334,0.29099668235246956,0.0747953478696107,0.831,0.35399876781734435,1000 +Linear,Linear,experimental,False,4,0.9,0.043,0.9663538590791207,1.0689268228491702,0.028,1.108520717140313,1000 +Linear,Linear,experimental,False,4,0.95,0.06433333333333333,1.1514816449818062,1.0689268228491702,0.056,1.2879051357588465,1000 +Linear,Linear,experimental,False,6,0.9,0.9066666666666666,0.9649068007812591,0.2282038734944421,0.908,1.109649411051833,1000 +Linear,Linear,experimental,False,6,0.95,0.952,1.1497573686687854,0.2282038734944421,0.953,1.288897606292505,1000 +Linear,Linear,experimental,True,1,0.9,0.8106666666666666,0.2442280575242452,0.07485718090249471,0.728,0.3131318505282238,1000 +Linear,Linear,experimental,True,1,0.95,0.8726666666666666,0.2910156800084799,0.07485718090249471,0.82,0.3541142507514428,1000 +Linear,Linear,experimental,True,4,0.9,0.042666666666666665,0.9663449229057717,1.0688692022966637,0.03,1.1082765484152255,1000 +Linear,Linear,experimental,True,4,0.95,0.06566666666666666,1.1514709968744994,1.0688692022966637,0.058,1.2875170435425758,1000 +Linear,Linear,experimental,True,6,0.9,0.9076666666666666,0.9649155510560861,0.22794459905668404,0.904,1.1089614225796234,1000 +Linear,Linear,experimental,True,6,0.95,0.952,1.1497677952643406,0.22794459905668404,0.952,1.2880674463360156,1000 +Linear,Linear,observational,False,1,0.9,0.8943333333333334,0.2738229128603023,0.06635918882753755,0.895,0.3510261719057856,1000 +Linear,Linear,observational,False,1,0.95,0.9426666666666667,0.3262801252064697,0.06635918882753755,0.942,0.3962985772301901,1000 +Linear,Linear,observational,False,4,0.9,0.157,1.3476988150235807,1.0609716999786731,0.127,1.5178150153968673,1000 +Linear,Linear,observational,False,4,0.95,0.2353333333333333,1.6058821868235793,1.0609716999786731,0.199,1.7707432791400486,1000 +Linear,Linear,observational,False,6,0.9,0.9023333333333333,1.0120647290620877,0.2445371914010156,0.907,1.1635536083727016,1000 +Linear,Linear,observational,False,6,0.95,0.953,1.2059495060732854,0.2445371914010156,0.952,1.352300935685489,1000 +Linear,Linear,observational,True,1,0.9,0.8933333333333334,0.2716532701291881,0.06653792879408746,0.884,0.34799487649074823,1000 +Linear,Linear,observational,True,1,0.95,0.9446666666666667,0.32369483643510083,0.06653792879408746,0.937,0.3932733826041723,1000 +Linear,Linear,observational,True,4,0.9,0.15433333333333335,1.3420280358592838,1.0605559236011748,0.119,1.511075555942128,1000 +Linear,Linear,observational,True,4,0.95,0.233,1.5991250366770944,1.0605559236011748,0.186,1.7640803706984969,1000 +Linear,Linear,observational,True,6,0.9,0.9013333333333333,1.0055268502646775,0.2433058652713604,0.9,1.1573364189497195,1000 +Linear,Linear,observational,True,6,0.95,0.953,1.198159142986716,0.2433058652713604,0.955,1.3448712678433115,1000