peal.data.dataset_generators.MNISTConfounderDatasetGenerator¶
- class peal.data.dataset_generators.MNISTConfounderDatasetGenerator[source]¶
Bases:
objectTwo-digit MNIST subset with a red background as confounder.
Every digit image is resized to 32x32, tiled to RGB and its red channel is raised to a random background intensity;
Confounderis 1 when that intensity is >= 128. Note the confounder is drawn independently of the digit, so the columns are not correlated by construction. A constant 8x8 central hint mask is written for every image.- Parameters:
Methods
Write
imgs/,masks/anddata.csv(ImgName, Feature, Confounder) into the dataset folder.