GithubHelp home page GithubHelp logo

sdv-dev / copulas Goto Github PK

View Code? Open in Web Editor NEW
507.0 22.0 104.0 22.33 MB

A library to model multivariate data using copulas.

Home Page: https://sdv.dev/Copulas/

License: Other

Python 95.28% Makefile 2.07% R 1.47% MATLAB 1.18%
machine-learning copulas synthetic-data data-generation synthetic-data-generation generative-ai generative-model tabular-data

copulas's Introduction

This repository is part of The Synthetic Data Vault Project, a project from DataCebo.

Development Status PyPi Shield Downloads Unit Tests Coverage Status Slack


Overview

Copulas is a Python library for modeling multivariate distributions and sampling from them using copula functions. Given a table of numerical data, use Copulas to learn the distribution and generate new synthetic data following the same statistical properties.

Key Features:

  • Model multivariate data. Choose from a variety of univariate distributions and copulas โ€“ including Archimedian Copulas, Gaussian Copulas and Vine Copulas.

  • Compare real and synthetic data visually after building your model. Visualizations are available as 1D histograms, 2D scatterplots and 3D scatterplots.

  • Access & manipulate learned parameters. With complete access to the internals of the model, set or tune parameters to your choosing.

Install

Install the Copulas library using pip or conda.

pip install copulas
conda install -c conda-forge copulas

Usage

Get started using a demo dataset. This dataset contains 3 numerical columns.

from copulas.datasets import sample_trivariate_xyz

real_data = sample_trivariate_xyz()
real_data.head()

Model the data using a copula and use it to create synthetic data. The Copulas library offers many options including Gaussian Copula, Vine Copulas and Archimedian Copulas.

from copulas.multivariate import GaussianMultivariate

copula = GaussianMultivariate()
copula.fit(real_data)

synthetic_data = copula.sample(len(real_data))

Visualize the real and synthetic data side-by-side. Let's do this in 3D so see our full dataset.

from copulas.visualization import compare_3d

compare_3d(real_data, synthetic_data)

Quickstart

Tutorials

Click below to run the code yourself on a Colab Notebook and discover new features.

Tutorial Notebook

Community & Support

Learn more about Copulas library from our documentation site.

Questions or issues? Join our Slack channel to discuss more about Copulas and synthetic data. If you find a bug or have a feature request, you can also open an issue on our GitHub.

Interested in contributing to Copulas? Read our Contribution Guide to get started.

Credits

The Copulas open source project first started at the Data to AI Lab at MIT in 2018. Thank you to our team of contributors who have built and maintained the library over the years!

View Contributors




The Synthetic Data Vault Project was first created at MIT's Data to AI Lab in 2016. After 4 years of research and traction with enterprise, we created DataCebo in 2020 with the goal of growing the project. Today, DataCebo is the proud developer of SDV, the largest ecosystem for synthetic data generation & evaluation. It is home to multiple libraries that support synthetic data, including:

  • ๐Ÿ”„ Data discovery & transformation. Reverse the transforms to reproduce realistic data.
  • ๐Ÿง  Multiple machine learning models -- ranging from Copulas to Deep Learning -- to create tabular, multi table and time series data.
  • ๐Ÿ“Š Measuring quality and privacy of synthetic data, and comparing different synthetic data generation models.

Get started using the SDV package -- a fully integrated solution and your one-stop shop for synthetic data. Or, use the standalone libraries for specific needs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.