cleverly.validation.BootstrapMeasurementError#

class cleverly.validation.BootstrapMeasurementError(variables: tuple[str, ...], numeric_noise: RelativeGaussianNoise = RelativeGaussianNoise(standard_deviation=0.1), categorical_change_probability: float = 0.1, resampling: Literal['auto', 'iid', 'cluster'] = 'auto')[source]#

Declare bootstrap measurement-error validation for adjustment variables.

Parameters:
variablestuple of str

Original logical adjustment-variable names to perturb.

numeric_noiseRelativeGaussianNoise

Relative law for each selected numeric variable.

categorical_change_probabilityfloat

Probability that a selected categorical value changes to another level.

resampling{“auto”, “iid”, “cluster”}

Bootstrap unit. "auto" uses clusters when the fit declares them.

Methods#

Attributes#

BootstrapMeasurementError.categorical_change_probability: float = 0.1#
BootstrapMeasurementError.numeric_noise: RelativeGaussianNoise = RelativeGaussianNoise(standard_deviation=0.1)#
BootstrapMeasurementError.resampling: Literal['auto', 'iid', 'cluster'] = 'auto'#
BootstrapMeasurementError.variables: tuple[str, ...]#