Package: SynthesizerPlus 0.2.9

Bogdan Oancea

SynthesizerPlus: Synthetic Data Generation with Copulas, Evaluation and Multi-Format I/O

Generates synthetic versions of numeric, categorical, mixed-type and time-series data. Marginal distributions are modelled with interpolated empirical quantile functions and dependence with Gaussian or Student-t copulas (Sklar, 1959). Discrete and categorical variables enter the copula through the distributional transform (Ruschendorf, 2009, <doi:10.1016/j.jspi.2009.05.030>), and their latent correlations are estimated by maximum likelihood as polychoric (Olsson, 1979, <doi:10.1007/BF02296207>) and polyserial (Olsson, Drasgow and Dorans, 1982, <doi:10.1007/BF02294164>) correlations. Missing values are modelled by missingness indicators inside the copula, so that missingness may depend on other variables. Supports stratified models, a closeness parameter with calibration to a target distance or disclosure-risk level, chunked generation of very large data sets, copula vector-autoregressive and bootstrap time-series synthesis, augmentation of small training sets for machine learning, and random generation from multivariate distributions and elliptical and Archimedean copulas. Fidelity, utility and disclosure risk are assessed with marginal distances, association matrices, propensity score mean-squared error (Snoke et al., 2018, <doi:10.1111/rssa.12358>), confidence-interval overlap, correct attribution probability and distance to closest record, with 'ggplot2' visualisations. Data can be read from and written to CSV, TSV, RDS, RData, Parquet, Feather, HDF5, JSON, NDJSON, Excel, SPSS, Stata, SAS and fst files. The empirical-quantile and copula approach builds on ideas of the 'synthesizer' package by Mark van der Loo.

Authors:Bogdan Oancea [aut, cre, cph]

SynthesizerPlus_0.2.9.tar.gz
SynthesizerPlus_0.2.9.zip(r-4.7-any)SynthesizerPlus_0.2.9.zip(r-4.6-any)
SynthesizerPlus_0.2.9.tar.gz(r-4.7-any)SynthesizerPlus_0.2.9.tar.gz(r-4.6-any)
SynthesizerPlus_0.2.9.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
SynthesizerPlus/json (API)

# Install 'SynthesizerPlus' in R:
install.packages('SynthesizerPlus', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/bogdanoancea/synthesizerplus/issues

Datasets:

On CRAN:

Conda:

3.65 score 41 exports 17 dependencies

Last updated from:0432dc5c4c. Checks:6 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK163
source / vignettesOK243
linux-releaseOK192
windows-develOK129
windows-releaseOK171
wasm-releaseOK115

Exports:association_matrixaugment_dataautoplotcalibrate_closenessci_overlapcompare_syntheticcopula_correlationdcrdisclosure_riskdiscriminator_aucfit_synthesizergenerategenerate_to_filemake_corrmargin_categoricalmargin_empiricalmarginal_metricsmatch_typesperturbationplot_acfplot_associationplot_categoricalplot_dcrplot_marginalsplot_pairsplot_qqplot_tspmser_copular_dirichletr_mvdistr_mvlnormr_mvmixturer_mvnormr_mvskewnormr_mvtread_datasupported_formatssynthesizets_windowswrite_data

Dependencies:clicpp11farverggplot2gluegtableisobandlabelinglifecycleR6RColorBrewerrlangS7scalesvctrsviridisLitewithr

Augmenting small training sets for machine learning
What augmentation can and cannot do | Tabular data: 60 observations | Time series: forecasting from a short history | Checklist

Last update: 2026-10-16
Started: 2026-10-16

Controlling how close synthetic data are to the real data
One knob: closeness | Record level: further from real records, same distributions | Distribution level: scenarios | Hitting a target distance | Use with augmentation

Last update: 2026-10-16
Started: 2026-10-16

Evaluating and visualising synthetic data
Everything at once: compare_synthetic() | Marginal fidelity | Dependence | General utility: can a classifier tell them apart? | Specific utility: do analyses give the same answers? | Disclosure risk: distance to closest record | Plots from a comparison object | References

Last update: 2026-10-16
Started: 2026-10-16

Generating data from multivariate distributions
Correlation matrices | Classical multivariate distributions | Copulas | Arbitrary margins: r_mvdist() | References

Last update: 2026-10-16
Started: 2026-10-16

Getting started with SynthesizerPlus
The model in one paragraph | Fit once, generate many times | Supported column types | Missing values | Stratified models | Controlling the dependence | Heavy tails: the t copula | Identifiers, model size and privacy | Multiple synthetic data sets | Where next

Last update: 2026-10-16
Started: 2026-10-16

Reading and writing data: CSV, Parquet, HDF5 and more
Supported formats | Writing and reading | Parquet and Feather (Apache Arrow) | HDF5 | JSON, NDJSON, Excel, SPSS, Stata, SAS, fst | Synthesising straight from a file to a file | Very large synthetic data sets

Last update: 2026-10-16
Started: 2026-10-16

Regularising high-variance models with synthetic data
The idea | How much synthetic data? | Where the gain comes from: bias and variance | Seeing the variance | Compared with bagging | Tuning the amount of synthetic data | Summary | References

Last update: 2026-10-16
Started: 2026-10-16

Releasing confidential microdata as synthetic data
The confidential file | Step 1: how risky would releasing the real data be? | Step 2: a synthetic file | Step 3: near-copies and the amount of noise | Step 4: set the noise to meet a risk threshold | Step 5: check the released file | Targeted noise | Good practice | References

Last update: 2026-10-16
Started: 2026-10-16

Synthetic time series
Copula-VAR | Several series | Bootstraps | Practical notes | References

Last update: 2026-10-16
Started: 2026-10-16

Readme and manuals

Help Manual

Help pageTopics
Mixed-type association matrixassociation_matrix
Augment a small training set with synthetic dataaugment_data augment_data.data.frame augment_data.default augment_data.matrix augment_data.ts
Plot a comparison of real and synthetic dataautoplot.sp_comparison plot.sp_comparison
Calibrate the closeness of synthetic to real datacalibrate_closeness
Simulated census-like microdatacensus_sim
Confidence-interval overlap of regression coefficientsci_overlap
Compare synthetic data with the real datacompare_synthetic
Inspect a fitted synthesizercopula_correlation summary.sp_synthesizer
Distance to closest record (disclosure risk)dcr
Disclosure risk of synthetic microdatadisclosure_risk
Discriminator AUCdiscriminator_auc
Fit a synthetic-data modelfit_synthesizer fit_synthesizer.data.frame fit_synthesizer.default fit_synthesizer.matrix
Fit a synthesizer to a (multivariate) time seriesfit_synthesizer.ts
Generate synthetic data from a fitted modelgenerate generate.sp_synthesizer generate.sp_ts_synthesizer
Generate a large synthetic data set directly to diskgenerate_to_file
Build a correlation matrix with a given structuremake_corr
Marginal quantile functions for r_mvdist()margin_categorical margin_empirical
Compare marginal distributions of real and synthetic datamarginal_metrics
Coerce the columns of a data frame to the classes of a templatematch_types
Multivariate random number generatorsmvdist r_dirichlet r_mvlnorm r_mvmixture r_mvnorm r_mvskewnorm r_mvt
Perturbations of the synthetic data distributionperturbation
Plot association matrices of real and synthetic dataplot_association
Plot distances to the closest recordplot_dcr
Plot marginal distributions of real and synthetic dataplot_categorical plot_marginals
Scatter-plot matrix of real and/or synthetic dataplot_pairs
Quantile-quantile plots of synthetic against real dataplot_qq
Plot real and synthetic time seriesplot_acf plot_ts
Propensity-score utility (pMSE)pmse
Sample from a copular_copula
Generate data from a copula with arbitrary marginal distributionsr_mvdist
Read a data set from a fileread_data
Simulate several synthetic data setssimulate.sp_synthesizer simulate.sp_ts_synthesizer
Supported file formatssupported_formats
Fit a synthesizer and generate synthetic data in one stepsynthesize
Build a lagged-feature table from one or more time seriests_windows
Write a data set to a filewrite_data