ControlDesign#
- class rojak.atmosphere.feature_composite.ControlDesign(label, *, observation_offset)[source]#
How to build one control: a resampling with the feature removed, used to estimate the counterfactual.
A centre at time
tis paired with the observations made att + observation_offset, at the centre’s place. The same features therefore see traffic from another time, e.g. a week earlier withobservation_offset=np.timedelta64(-7, "D").- label#
Name of the control, e.g.
"obs-7D". It labels thecontroldimension of the counts, so it must be unique among the controls of one composite.- Type:
- observation_offset#
Offset from the centre’s time to the time the control’s observations were made. Keyword only.
- Type:
- Raises:
ValueError – If
labelis empty.TypeError – If
observation_offsetis not anumpy.timedelta64.
- Parameters:
label (str)
observation_offset (timedelta64)
- __init__(label, *, observation_offset)[source]#
- Parameters:
label (str)
observation_offset (timedelta64)
- Return type:
None
Methods
__init__(label, *, observation_offset)Attributes