File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -537,9 +537,18 @@ def estimate_effect(
537537 is_linear = bool (diagnosis .get ("linearity" , True )) if diagnosis else True
538538 is_gaussian = bool (diagnosis .get ("gaussian_error" , True )) if diagnosis else True
539539
540+ # --- Time-series warning (causal effect estimation assumes i.i.d.) ---
541+ if diagnosis and diagnosis .get ("time_series" ):
542+ warnings_list : list [str ] = [
543+ "Time-series structure detected — causal effect estimation "
544+ "assumes i.i.d. samples. Results may be biased if temporal "
545+ "lag structure matters. Consider time-series-specific methods."
546+ ]
547+ else :
548+ warnings_list : list [str ] = []
549+
540550 # --- Inference policy (honest gate) ---
541551 graph_kind = classify_graph_kind (adj )
542- warnings_list : list [str ] = []
543552
544553 if graph_kind == "dag" :
545554 inference_policy = {
You can’t perform that action at this time.
0 commit comments