Skip to main content

STELAR Synthetic Correlation Data

Project description

STELAR Synthetic Correlated Data Generator

Work in progress.

Overview

This module generates synthetic data with the same correlations as a given dataset.

Installation

python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps stelar_synth_corr_data

Usage outside STELAR KLMS

import pandas as pd
from stelar_synth_corr_data import generate_synthetic_data

# Load your dataset
data = pd.read_csv('your_dataset.csv')
# Generate synthetic data
synthetic_data = generate_synthetic_data(data, num_samples=1000)

# Save the synthetic data to a CSV file
synthetic_data.to_csv('synthetic_data.csv', index=False)

Parameters

  • data: The input dataset (Pandas DataFrame) from which to derive correlations.
  • num_samples: The number of samples to generate in the synthetic dataset.
  • random_state: An optional seed for reproducibility.

Output

  • A Pandas DataFrame containing the synthetic data with the same correlations as the input dataset.
  • The synthetic data will have the same column names and data types as the input dataset.
  • The synthetic data will be saved to a CSV file with the specified filename.

Usage inside STELAR KLMS

Load dataset from KLMS, create synthetic data and upload as resource:

from stelar_synth_corr_data import stelar
datasetname = 'your_dataset_name'
resource_name = 'filename.csv'
data = stelar.generate_synthetic_data_from_klms_to_klms(
    datasetname, resource_name, num_samples=1000, credentials
)

Use own dataset, create synthetic data and upload as resource:

import pandas as pd
from stelar_synth_corr_data import stelar
df = pd.read_csv('your_dataset.csv')
resource_name = 'filename.csv'
data = stelar.generate_synthetic_data_from_own_to_klms(
    df, resource_name, num_samples=1000, credentials
)

Parameters

  • data: The input dataset (Pandas DataFrame) from which to derive correlations.
  • num_samples: The number of samples to generate in the synthetic dataset.
  • random_state: An optional seed for reproducibility.
  • datasetname: The name of the dataset in KLMS (if using KLMS).
  • resource_name: The name of the resource to save the synthetic data to in KLMS (if using KLMS).
  • credentials: A dictionary containing the credentials for accessing KLMS (if using KLMS).

To use this module inside STELAR KLMS, you need to have the following credentials:

  • username: Your STELAR KLMS username.
  • password: Your STELAR KLMS password.
  • url: The URL of the STELAR KLMS instance.
  • bucket: The name of the bucket where the dataset is stored.

For example:

credentials = {
    'username': 'your_username',
    'password': 'your_password',
    'url': 'https://klms.stelar.gr/stelar',
    'bucket': 'klms-bucket'
}

Output

  • A Pandas DataFrame containing the synthetic data with the same correlations as the input dataset.
  • The synthetic data will have the same column names and data types as the input dataset.
  • The synthetic data will be saved to a CSV file with the specified filename.

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

stelar_synth_corr_data-0.1.0.tar.gz (45.9 kB view details)

Uploaded Source

Built Distribution

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

stelar_synth_corr_data-0.1.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stelar_synth_corr_data-0.1.0.tar.gz
  • Upload date:
  • Size: 45.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for stelar_synth_corr_data-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0637bc40859c59e527d00733a732b7ec3190646029c15421221a588874174947
MD5 7bb659b86714b26425e4a7812bba2aa5
BLAKE2b-256 c8b385b6518db051583d2aaea0b469f129599a164426f490ea838c338efb7270

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for stelar_synth_corr_data-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 69927f01c17295366fd814a9bb055754740a025d6c7b0fa925a35e5e50f5a3d1
MD5 e849ac91b2ee02578b03e1edaa58eea9
BLAKE2b-256 346e6495cf041b688a4b2828d36c6a5242002b6a843925c77a18327fffeb297f

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