FoldSelectionConfig#

class causalpy.checks.placebo_in_time.FoldSelectionConfig[source]#

Configuration for placebo fold selection.

n_folds#

Number of placebo folds.

Type:

int

selection_method#

How to choose placebo windows (“sequential” or “random”).

Type:

str

min_training_pct#

Minimum fraction of training data before each fold (random mode).

Type:

float

min_gap#

Minimum gap between folds in observations (random mode).

Type:

int

allow_overlap#

Whether folds can overlap (random mode).

Type:

bool

exclude_periods#

Period labels to exclude (random mode).

Type:

set[str] | None

Methods

Attributes

__init__(n_folds=3, selection_method='sequential', min_training_pct=0.3, min_gap=1, allow_overlap=False, exclude_periods=None)#
Parameters:
  • n_folds (int)

  • selection_method (Literal['sequential', 'random'])

  • min_training_pct (float)

  • min_gap (int)

  • allow_overlap (bool)

  • exclude_periods (set[str] | None)

Return type:

None

classmethod __new__(*args, **kwargs)#