rdt-1.9.3.dev0


توضیحات

Reversible Data Transforms
ویژگی مقدار
سیستم عامل -
نام فایل rdt-1.9.3.dev0
نام rdt
نسخه کتابخانه 1.9.3.dev0
نگهدارنده []
ایمیل نگهدارنده []
نویسنده -
ایمیل نویسنده "DataCebo, Inc." <info@sdv.dev>
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/rdt/
مجوز BSL-1.1
<div align="center"> <br/> <p align="center"> <i>This repository is part of <a href="https://sdv.dev">The Synthetic Data Vault Project</a>, a project from <a href="https://datacebo.com">DataCebo</a>.</i> </p> [![Development Status](https://img.shields.io/badge/Development%20Status-5%20--%20Production/Stable-green)](https://pypi.org/search/?q=&o=&c=Development+Status+%3A%3A+5+-+Production%2FStable) [![PyPi Shield](https://img.shields.io/pypi/v/RDT.svg)](https://pypi.python.org/pypi/RDT) [![Unit Tests](https://github.com/sdv-dev/RDT/actions/workflows/unit.yml/badge.svg)](https://github.com/sdv-dev/RDT/actions/workflows/unit.yml) [![Downloads](https://pepy.tech/badge/rdt)](https://pepy.tech/project/rdt) [![Coverage Status](https://codecov.io/gh/sdv-dev/RDT/branch/main/graph/badge.svg)](https://codecov.io/gh/sdv-dev/RDT) [![Slack](https://img.shields.io/badge/Community-Slack-blue?style=plastic&logo=slack)](https://bit.ly/sdv-slack-invite) <div align="left"> <br/> <p align="center"> <a href="https://github.com/sdv-dev/RDT"> <img align="center" width=40% src="https://github.com/sdv-dev/SDV/blob/stable/docs/images/RDT-DataCebo.png"></img> </a> </p> </div> </div> # Overview RDT (Reversible Data Transforms) is a Python library that transforms raw data into fully numerical data, ready for data science. The transforms are reversible, allowing you to convert from numerical data back into your original format. <img align="center" src="https://github.com/sdv-dev/SDV/blob/stable/docs/images/rdt_main_tranformation.png"></img> # Install Install **RDT** using ``pip`` or ``conda``. We recommend using a virtual environment to avoid conflicts with other software on your device. ```bash pip install rdt ``` ```bash conda install -c conda-forge rdt ``` For more information about using reversible data transformations, visit the [RDT Documentation](https://docs.sdv.dev/rdt). # Quickstart In this short series of tutorials we will guide you through a series of steps that will help you getting started using **RDT** to transform columns, tables and datasets. ## Load the demo data After you have installed RDT, you can get started using the demo dataset. ```python3 from rdt import get_demo customers = get_demo() ``` This dataset contains some randomly generated values that describe the customers of an online marketplace. ``` last_login email_optin credit_card age dollars_spent 0 2021-06-26 False VISA 29 99.99 1 2021-02-10 False VISA 18 NaN 2 NaT False AMEX 21 2.50 3 2020-09-26 True NaN 45 25.00 4 2020-12-22 NaN DISCOVER 32 19.99 ``` Let's transform this data so that each column is converted to full, numerical data ready for data science. ## Creating the HyperTransformer & config The ``HyperTransformer`` is capable of transforming multi-column datasets. ```python3 from rdt import HyperTransformer ht = HyperTransformer() ``` The `HyperTransformer` needs to know about the columns in your dataset and which transformers to apply to each. These are described by a config. We can ask the `HyperTransformer` to automatically detect it based on the data we plan to use. ```python3 ht.detect_initial_config(data=customers) ``` This will create and set the config. ``` Config: { "sdtypes": { "last_login": "datetime", "email_optin": "boolean", "credit_card": "categorical", "age": "numerical", "dollars_spent": "numerical" }, "transformers": { "last_login": "UnixTimestampEncoder()", "email_optin": "BinaryEncoder()", "credit_card": "FrequencyEncoder()", "age": "FloatFormatter()", "dollars_spent": "FloatFormatter()" } } ``` The `sdtypes` dictionary describes the semantic data types of each of your columns and the `transformers` dictionary describes which transformer to use for each column. You can customize the transformers and their settings. (See the [Transformers Glossary](https://docs.sdv.dev/rdt/transformers-glossary/browse-transformers) for more information). ## Fitting & using the HyperTransformer The `HyperTransformer` references the config while learning the data during the `fit` stage. ```python3 ht.fit(customers) ``` Once the transformer is fit, it's ready to use. Use the transform method to transform all columns of your dataset at once. ```python3 transformed_data = ht.transform(customers) ``` ``` last_login.value email_optin.value credit_card.value age.value dollars_spent.value 0 1.624666e+18 0.0 0.2 29 99.99 1 1.612915e+18 0.0 0.2 18 36.87 2 1.611814e+18 0.0 0.5 21 2.50 3 1.601078e+18 1.0 0.7 45 25.00 4 1.608595e+18 0.0 0.9 32 19.99 ``` The ``HyperTransformer`` applied the assigned transformer to each individual column. Each column now contains fully numerical data that you can use for your project! When you're done with your project, you can also transform the data back to the original format using the `reverse_transform` method. ```python3 original_format_data = ht.reverse_transform(transformed_data) ``` ``` last_login email_optin credit_card age dollars_spent 0 NaT False VISA 29 99.99 1 2021-02-10 False VISA 18 NaN 2 NaT False AMEX 21 NaN 3 2020-09-26 True NaN 45 25.00 4 2020-12-22 False DISCOVER 32 19.99 ``` # What's Next? To learn more about reversible data transformations, visit the [RDT Documentation](https://docs.sdv.dev/rdt). --- <div align="center"> <a href="https://datacebo.com"><img align="center" width=40% src="https://github.com/sdv-dev/SDV/blob/stable/docs/images/DataCebo.png"></img></a> </div> <br/> <br/> [The Synthetic Data Vault Project](https://sdv.dev) was first created at MIT's [Data to AI Lab]( https://dai.lids.mit.edu/) in 2016. After 4 years of research and traction with enterprise, we created [DataCebo](https://datacebo.com) 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](https://sdv.dev/SDV/getting_started/install.html) -- a fully integrated solution and your one-stop shop for synthetic data. Or, use the standalone libraries for specific needs.


نیازمندی

مقدار نام
ython_versio numpy>=1.21.0;
ython_versio numpy>=1.23.3;
ython_versio numpy>=1.26.0;
ython_versio numpy>=2.1.0;
ython_versio numpy>=2.3.2;
ython_versio pandas<3,>=1.4.0;
ython_versio pandas<3,>=1.5.0;
ython_versio pandas<3,>=2.1.1;
ython_versio pandas<3,>=2.2.3;
ython_versio pandas<3,>=2.3.3;
ython_versio scipy>=1.7.3;
ython_versio scipy>=1.9.2;
ython_versio scipy>=1.12.0;
ython_versio scipy>=1.14.1;
ython_versio scipy>=1.16.1;
ython_versio scikit-learn>=1.0.2;
ython_versio scikit-learn>=1.1.0;
ython_versio scikit-learn>=1.1.3;
ython_versio scikit-learn>=1.3.1;
ython_versio scikit-learn>=1.5.2;
ython_versio scikit-learn>=1.8.0;
- Faker!=37.11.0,>=17
- python-dateutil>=2.9
ython_versio copulas>=0.12.1;
ython_versio copulas>=0.14.0;
xtr pyarrow>=17.0.0;
xtr rdt[pyarrow];
xtr rdt[copulas];
xtr pytest>=3.4.2;
xtr pytest-cov>=2.6.0;
xtr jupyter<2,>=1.0.0;
xtr pytest-subtests<1.0,>=0.5;
xtr pytest-runner>=2.11.1;
xtr tomli<3,>=2.0.0;
xtr rdt[test];
xtr build<2,>=1.0.0;
xtr bump-my-version>=0.18.3;
xtr pip>=9.0.1;
xtr watchdog<5,>=1.0.1;
xtr ruff<1,>=0.3.2;
xtr twine>=1.10.0;
xtr wheel>=0.30.0;
xtr coverage<8,>=4.5.12;
xtr tabulate<1,>=0.8.9;
xtr invoke;
xtr rundoc<0.5,>=0.4.3;


زبان مورد نیاز

مقدار نام
<3.15,>=3.9 Python


نحوه نصب


نصب پکیج whl rdt-1.9.3.dev0:

    pip install rdt-1.9.3.dev0.whl


نصب پکیج tar.gz rdt-1.9.3.dev0:

    pip install rdt-1.9.3.dev0.tar.gz