API reference

andrey.data.measurement.noisy_children#

andrey.data.measurement.noisy_children(columns=None, *, share=None, noise_scale=0.5, noise=None)[source]#

Measurement columns: for each selected variable, a child that is it plus independent noise.

Parameters:
  • columns (Sequence[int] | None) – The measured columns, as columns of the sample without measurements, after its column shuffle. A sample that shuffles its columns moves them again with the measurement columns, and measurements.parents names where each one is. None measures the share of the columns, or every column when share is None too.

  • share (float | None) – The share of the columns to measure, in (0, 1], rounded to a whole number of at least one column; which ones is drawn from the model’s seed. Given without columns.

  • noise_scale (float) – The standard deviation of the measurement noise as a multiple of the standard deviation of the measured column, finite and positive. The default gives each measurement a reliability of 1 / (1 + 0.5**2) = 0.8.

  • noise (Noise | None) – The family of the measurement noise, from andrey.data.noise, without heteroscedastic or variance_range. None is Gaussian.

Return type:

NoisyChildren

Raises:

ValueError – If columns is empty or holds a repeated, negative, or fractional column, columns and share are both given, share is not in (0, 1], noise_scale is not finite and positive, or noise sets its own scales.

Examples

>>> from andrey.data.measurement import noisy_children
>>> noisy_children([0, 2], noise_scale=1.0).columns
(0, 2)