You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The R implementation of synthpop is a tool for producing synthetic versions of microdata containing confidential information so that they are safe to be released to users for exploratory analysis. The key objective of generating synthetic data is to replace sensitive original values with synthetic ones causing minimal distortion of the statistical information contained in the dataset. Variables, which can be categorical or continuous, are synthesised one-by-one using sequential modelling. Replacements are generated by drawing from conditional distributions fitted to the original data using parametric or classification and regression trees models.
5
+
Python implementation of the R package [synthpop](https://cran.r-project.org/web/packages/synthpop/index.html).
6
6
7
-
This is a reimplementation in Python which allows synthetic data to be generated via the method .generate() after the algorithm had been fit to the original data via the method .fit(). The process can be largely automated, if default settings are used, or with methods defined by the user. Optional parameters can be used to influence the disclosure risk and the analytical quality of the synthetic data.
7
+
With this library synthetic tabular data can be produced. Synthetic data refers to artificially generated data that mimics real-world data in structure and statistical properties but does not directly originate from actual events or individuals. It supports processing numerical and categorical data using sequential modelling techniques. Artificial data are generated by drawing from conditional distributions fitted to the original data using parametric (e.g., Gaussian copula) or classification and regression trees (CART) models.
8
8
9
-
Development status and roadmap
10
-
This project is in Alpha status and the roadmap can be found here.
9
+
This Python library is a reimplementation of the R package `synthpop`. Synthetic data can be generated using the `.generate()` method after fitting the a synntesizer to the original data with the `.fit()` method. The process can be largely automated using default settings or customized through user-defined settings. Optional parameters can be used to influence the disclosure risk and the analytical quality of the synthetic data.
10
+
11
+
☁️ [Web app](https://local-first-bias-detection.s3.eu-central-1.amazonaws.com/synthetic-data.html) – a demo of synthetic data generation using `python-synthpop` through [WebAssembly](https://github.com/NGO-Algorithm-Audit/local-first-web-tool)
We will use the US adult census dataset, which is a freely available open dataset extracted from the US census bureau database. The dataset is initially designed for a binary classification problem and the task is to predict whether a person earns over $50,000 a year. The dataset is a mixture of discrete and continuous features, including age, working status (workclass), education, marital status, race, sex, relationship and hours worked per week.
33
34
34
35
```
@@ -44,12 +45,12 @@ Out[2]:
44
45
4 28 Private 338409 Bachelors 13 Married-civ-spouse Prof-specialty Wife Black Female 0 0 40 Cuba <=50K
45
46
```
46
47
47
-
### synthpop
48
+
### python-synthpop
48
49
49
50
Use default parameters for the Adult dataset:
50
51
51
52
```
52
-
In [1]: from synthpop import Synthpop
53
+
In [1]: from python-synthpop import Synthpop
53
54
54
55
In [2]: from datasets.adult import df, dtypes
55
56
@@ -159,7 +160,7 @@ income 1 1 1 1 1
159
160
### Define the visit sequence for the Adult dataset:
160
161
161
162
```
162
-
In [1]: from synthpop import Synthpop
163
+
In [1]: from python-synthpop import Synthpop
163
164
164
165
In [2]: from datasets.adult import df, dtypes
165
166
@@ -224,8 +225,4 @@ workclass 1 0 0 0 0
224
225
fnlwgt 1 1 0 1 1
225
226
education 1 1 0 0 1
226
227
marital-status 1 1 0 0 0
227
-
```
228
-
229
-
# License
230
-
231
-
This project is being developed at Hazy Limited and is released under MIT license.
0 commit comments