andrey.data.missingness.self_masking#
- andrey.data.missingness.self_masking(rate, *, observed=0.3, form='logistic')[source]#
Self-masking missing values.
Each indicator depends on its own column.
- Parameters:
rate (
float) – The expected share of missing values in each column that can go missing, in(0, 1); in(0.01, 0.9)forform="quantile".observed (
float) – The share of the columns that are always observed, in[0, 1), rounded to a whole number of columns; which ones is drawn.form (
str) – How an indicator depends on its own column (seeandrey.data.missingness).
- Return type:
- Raises:
ValueError – If
rateorobservedis out of range orformis not one of the forms.
Examples
>>> from andrey.data.missingness import self_masking >>> self_masking(0.2).name 'self_masking'