@@ -28,7 +28,7 @@ def predict_dte(
2828 alpha : float = 0.05 ,
2929 variance_type = "moment" ,
3030 n_bootstrap = 500 ,
31- verbose : bool = True ,
31+ display_progress : bool = True ,
3232 ) -> Tuple [np .ndarray , np .ndarray , np .ndarray ]:
3333 """
3434 Compute Distribution Treatment Effects (DTE) based on the estimator for the distribution function.
@@ -45,7 +45,7 @@ def predict_dte(
4545 variance_type (str, optional): Variance type to be used to compute confidence intervals.
4646 Available values are "moment", "simple", and "uniform". Defaults to "moment".
4747 n_bootstrap (int, optional): Number of bootstrap samples. Defaults to 500.
48- verbose (bool, optional): Whether to display a progress bar. Defaults to True.
48+ display_progress (bool, optional): Whether to display a progress bar. Defaults to True.
4949
5050 Returns:
5151 Tuple[np.ndarray, np.ndarray, np.ndarray]: A tuple containing:
@@ -87,7 +87,7 @@ def predict_dte(
8787 alpha ,
8888 variance_type ,
8989 n_bootstrap ,
90- verbose ,
90+ display_progress ,
9191 )
9292
9393 def predict_pte (
@@ -98,7 +98,7 @@ def predict_pte(
9898 alpha : float = 0.05 ,
9999 variance_type = "moment" ,
100100 n_bootstrap = 500 ,
101- verbose : bool = True ,
101+ display_progress : bool = True ,
102102 ) -> Tuple [np .ndarray , np .ndarray , np .ndarray ]:
103103 """
104104 Compute Probability Treatment Effects (PTE) based on the estimator for the distribution function.
@@ -116,7 +116,7 @@ def predict_pte(
116116 variance_type (str, optional): Variance type to be used to compute confidence intervals.
117117 Available values are "moment", "simple", and "uniform". Defaults to "moment".
118118 n_bootstrap (int, optional): Number of bootstrap samples. Defaults to 500.
119- verbose (bool, optional): Whether to display a progress bar. Defaults to True.
119+ display_progress (bool, optional): Whether to display a progress bar. Defaults to True.
120120
121121 Returns:
122122 Tuple[np.ndarray, np.ndarray, np.ndarray]: A tuple containing:
@@ -161,7 +161,7 @@ def predict_pte(
161161 alpha ,
162162 variance_type ,
163163 n_bootstrap ,
164- verbose ,
164+ display_progress ,
165165 )
166166
167167 def predict_qte (
@@ -171,7 +171,7 @@ def predict_qte(
171171 quantiles : Optional [np .ndarray ] = None ,
172172 alpha : float = 0.05 ,
173173 n_bootstrap = 500 ,
174- verbose : bool = True ,
174+ display_progress : bool = True ,
175175 ) -> Tuple [np .ndarray , np .ndarray , np .ndarray ]:
176176 """
177177 Compute Quantile Treatment Effects (QTE) based on the estimator for the distribution function.
@@ -186,7 +186,7 @@ def predict_qte(
186186 quantiles (np.ndarray, optional): Quantiles used for QTE. Defaults to [0.1, 0.2, ..., 0.9].
187187 alpha (float, optional): Significance level of the confidence bound. Defaults to 0.05.
188188 n_bootstrap (int, optional): Number of bootstrap samples. Defaults to 500.
189- verbose (bool, optional): Whether to display a progress bar. Defaults to True.
189+ display_progress (bool, optional): Whether to display a progress bar. Defaults to True.
190190
191191 Returns:
192192 Tuple[np.ndarray, np.ndarray, np.ndarray]: A tuple containing:
@@ -236,7 +236,7 @@ def predict_qte(
236236
237237 qtes = np .zeros ((n_bootstrap , qte .shape [0 ]))
238238 bootstrap_iter = range (n_bootstrap )
239- if verbose :
239+ if display_progress :
240240 bootstrap_iter = tqdm (bootstrap_iter , desc = "Bootstrap QTE" )
241241 for b in bootstrap_iter :
242242 bootstrap_indexes = np .random .choice (indexes , size = n_obs , replace = True )
@@ -266,7 +266,7 @@ def _compute_dtes(
266266 alpha : float ,
267267 variance_type : str ,
268268 n_bootstrap : int ,
269- verbose : bool = False ,
269+ display_progress : bool = False ,
270270 ) -> Tuple [np .ndarray , np .ndarray , np .ndarray ]:
271271 """Compute expected DTEs."""
272272 treatment_cdf , treatment_cdf_mat , _ = self ._compute_cumulative_distribution (
@@ -275,15 +275,15 @@ def _compute_dtes(
275275 self .covariates ,
276276 self .treatment_arms ,
277277 self .outcomes ,
278- verbose = verbose ,
278+ display_progress = display_progress ,
279279 )
280280 control_cdf , control_cdf_mat , _ = self ._compute_cumulative_distribution (
281281 control_treatment_arm ,
282282 locations ,
283283 self .covariates ,
284284 self .treatment_arms ,
285285 self .outcomes ,
286- verbose = verbose ,
286+ display_progress = display_progress ,
287287 )
288288
289289 dte = treatment_cdf - control_cdf
@@ -320,7 +320,7 @@ def _compute_ptes(
320320 alpha : float ,
321321 variance_type : str ,
322322 n_bootstrap : int ,
323- verbose : bool = False ,
323+ display_progress : bool = False ,
324324 ) -> Tuple [np .ndarray , np .ndarray , np .ndarray ]:
325325 """Compute expected PTEs."""
326326 treatment_pdf , treatment_pdf_mat , _ = self ._compute_interval_probability (
@@ -329,15 +329,15 @@ def _compute_ptes(
329329 self .covariates ,
330330 self .treatment_arms ,
331331 self .outcomes ,
332- verbose = verbose ,
332+ display_progress = display_progress ,
333333 )
334334 control_pdf , control_pdf_mat , _ = self ._compute_interval_probability (
335335 control_treatment_arm ,
336336 locations ,
337337 self .covariates ,
338338 self .treatment_arms ,
339339 self .outcomes ,
340- verbose = verbose ,
340+ display_progress = display_progress ,
341341 )
342342
343343 pte = treatment_pdf - control_pdf
@@ -417,15 +417,15 @@ def find_quantile(quantile, arm):
417417 return result
418418
419419 def predict (
420- self , treatment_arm : int , locations : np .ndarray , verbose : bool = True
420+ self , treatment_arm : int , locations : np .ndarray , display_progress : bool = True
421421 ) -> np .ndarray :
422422 """
423423 Compute cumulative distribution values.
424424
425425 Args:
426426 treatment_arm (int): The index of the treatment arm.
427427 outcomes (np.ndarray): Scalar values to be used for computing the cumulative distribution.
428- verbose (bool, optional): Whether to display a progress bar. Defaults to True.
428+ display_progress (bool, optional): Whether to display a progress bar. Defaults to True.
429429
430430 Returns:
431431 np.ndarray: Estimated cumulative distribution values for the input.
@@ -446,7 +446,7 @@ def predict(
446446 self .covariates ,
447447 self .treatment_arms ,
448448 self .outcomes ,
449- verbose = verbose ,
449+ display_progress = display_progress ,
450450 )[0 ]
451451
452452 def _compute_cumulative_distribution (
@@ -456,7 +456,7 @@ def _compute_cumulative_distribution(
456456 covariates : np .ndarray ,
457457 treatment_arms : np .ndarray ,
458458 outcomes : np .array ,
459- verbose : bool = False ,
459+ display_progress : bool = False ,
460460 ) -> Tuple [np .ndarray , np .ndarray , np .ndarray ]:
461461 """
462462 Compute the cumulative distribution values.
@@ -467,7 +467,7 @@ def _compute_cumulative_distribution(
467467 covariates: (np.ndarray): An array of covariates variables in the observed data.
468468 treatment_arms (np.ndarray): An array of treatment arms in the observed data.
469469 outcomes (np.ndarray): An array of outcomes in the observed data.
470- verbose (bool): Whether to display a progress bar.
470+ display_progress (bool): Whether to display a progress bar.
471471
472472 Returns:
473473 Tuple[np.ndarray, np.ndarray, np.ndarray]: Estimated cumulative distribution values, prediction for each observation, and superset prediction for each observation.
0 commit comments