Skip to main content

Non-Parametric Gaussian Copula synthesizer for tabular data

Project description

NPGC

npgc is a lightweight Python package for fitting a non-parametric Gaussian copula to tabular data and generating synthetic samples from the learned distribution.

Installation

pip install npgc

Quick Start

import pandas as pd

from npgc import NPGC

df = pd.DataFrame(
    {
        "age": [21, 34, 45, 52],
        "income": [42000, 68000, 91000, 120000],
        "segment": ["A", "B", "B", "C"],
    }
)

model = NPGC()
model.fit(df, random_state=42)

synthetic = model.sample(100, seed=42)
print(synthetic.head())

Features

  • Works directly with pandas DataFrames
  • Supports numeric and categorical columns
  • Preserves cross-column dependence with a Gaussian copula
  • Includes model save/load helpers for reuse

Development

Install development dependencies with:

uv sync --group dev

Run the test suite with:

.\.venv\Scripts\python -m pytest

Build distributions locally with:

$env:UV_CACHE_DIR='.uv-cache'
uv build

Release

After building, upload the artifacts in dist/ to PyPI:

uv publish

Or with Twine:

python -m twine upload dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

npgc-0.1.0.tar.gz (3.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

npgc-0.1.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file npgc-0.1.0.tar.gz.

File metadata

  • Download URL: npgc-0.1.0.tar.gz
  • Upload date:
  • Size: 3.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for npgc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9b22fc999a1bb8ece5fef379a0e725825b5d1fc3067d2c783c1268838032aacf
MD5 f2a41efad8d42b06c5ce3296c9847979
BLAKE2b-256 37ee2e8e6a15e375130b7fb56e52f956390e39269286340e764b8039f757ec61

See more details on using hashes here.

File details

Details for the file npgc-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: npgc-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for npgc-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a2a29f9cff0b641a4526f0383277a2d0133a5b27cf219b0b9528d7c33b86623
MD5 618512af6d5c646c2efd34438e61ebd0
BLAKE2b-256 8ef0508d2692dead8cb875bed848153ec0c9e7a7bbdc2b5646cdb4b5984e1d3f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page