View source: R/approach_vaeac_torch_modules.R
mcar_mask_generator | R Documentation |
A mask generator which masks the entries in the input completely at random.
mcar_mask_generator(masking_ratio = 0.5, paired_sampling = FALSE)
masking_ratio |
Numeric between 0 and 1. The probability for an entry in the generated mask to be 1 (masked). |
paired_sampling |
Boolean. If we are doing paired sampling. So include both S and |
The mask generator mask each element in the batch
(N x p) using a component-wise independent Bernoulli
distribution with probability masking_ratio
. Default values for masking_ratio
is 0.5, so all
masks are equally likely to be generated, including the empty and full masks.
The function returns a mask of the same shape as the input batch
, and the batch
can contain
missing values, indicated by the "NaN" token, which will always be masked.
Input: (N, p)
where N is the number of observations in the batch
and p
is the number of features.
Output: (N, p)
, same shape as the input
Lars Henry Berge Olsen
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.