privpack.utils.data_generator module¶
Some introduction on how to generate data.
API Documentation¶
DataGenerate module is used to generate data for theoretical experiments. Currently the following types of data are supported:
Gaussian Data: Completely Uncorrelated, from PPAN Paper [1]
Bivariate Binary Data: Completely Uncorrelated, Completely Correlated, From a random distribution
References¶
[1] Tripathy, Ardhendu, Ye Wang, and Prakash Ishwar (2017). “Privacy-Preserving Ad-versarial Networks.
Module Contents¶
-
class
privpack.utils.data_generator.DataGenerator¶ Bases:
objectDataGenerator is a simple class used to generate different types of data mostly used for experiments.
Includes:
Gaussian Data: Completely Uncorrelated, from PPAN Paper [1]
Bivariate Binary Data: Completely Uncorrelated, Completely Correlated, From a random distribution
[1] Tripathy, Ardhendu, Ye Wang, and Prakash Ishwar (2017). “Privacy-Preserving Ad-versarial Networks.
-
generate_binary_data(acc_dist)¶ Returns pytorch tensor with @amount number of entries.
-
generate_gauss_mixture_data(cov, seed=None, num_samples=10000, train_ratio=0.8)¶ Returns pytorch tensor with @amount number of entries.
Return numpy array with: 2x2 completely correlated distrubion + accumulated distribution
Return numpy array with: 2x2 completely uncorrelated distrubion + accumulated distribution
-
get_ppan_distribution_params(y_dim)¶
-
random_binary_dist()¶ Return numpy array with: 2x2 random distrubion + accumulated distribution