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, andmeasurements.parentsnames where each one is.Nonemeasures theshareof the columns, or every column whenshareisNonetoo.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 withoutcolumns.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 of1 / (1 + 0.5**2) = 0.8.noise (
Noise|None) – The family of the measurement noise, fromandrey.data.noise, withoutheteroscedasticorvariance_range.Noneis Gaussian.
- Return type:
- Raises:
ValueError – If
columnsis empty or holds a repeated, negative, or fractional column,columnsandshareare both given,shareis not in(0, 1],noise_scaleis not finite and positive, ornoisesets its own scales.
Examples
>>> from andrey.data.measurement import noisy_children >>> noisy_children([0, 2], noise_scale=1.0).columns (0, 2)