in causalPartition.py [0:0]
def __init__(self, df, probabilities, treatment, ratio_train=0.5):
"""
Ratio_train is the ratio in the training set, which is used to split the sample in the beginning to help construct honest estimator.
By default it is 50% vs 50% to make the training and estimation sets have the roguhly same widths for CIs_contain_zero
"""
self.df = df
self.probabilities = probabilities
self.treatment = treatment
self.idx_tr = np.random.random(len(df)) < ratio_train # sample the training set
self.idx_est = np.logical_not(self.idx_tr) # sample the estimation set
self.df_train = df[self.idx_tr]
self.df_est = df[np.logical_not(self.idx_tr)]
self.result_separate = None
self.est_result_separate_eht = None