Skip to main content

TaGra: TAbular data preprocessing to GRAph representation.

Project description

TaGra (Table to Graph)

TaGra is a comprehensive Python library designed to simplify the preprocessing of data, the construction of graphs from data tables, and the analysis of those graphs. It provides automated tools for handling missing data, scaling, encoding, and graph construction, making it easier for data scientists and researchers to focus on their analysis and results.

Features

  • Automated Data Preprocessing: Clean and transform your data with options for handling missing values, scaling, encoding, and more.
  • Graph Construction: Build graphs from data tables using various methods such as K-Nearest Neighbors (KNN), distance thresholds, and similarity measures.
  • Graph Analysis: Perform statistical analysis on graphs, including degree distribution, centrality measures, community detection, and neighbor analysis.
  • Visualization: Generate insightful visualizations to understand your data and graph structures.

Installation

To install TaGra, simply use pip:

pip install tagra

Quickstart

python3 examples/examples_usage.py -c examples/example_config.json

You can edit the option in examples/example_config.json and adapt them as you wish. The default option will produce a prepreocessing and a graph based on the moons dataset (SciKit Learn).

Usage

Data Preprocessing

from tagra.preprocessing import preprocess_dataframe

# Example usage
df = preprocess_dataframe(
    input_path='data.csv',
    output_path=None,
    numeric_columns=[],
    categorical_columns=[],
    unknown_column_action='infer',
    ignore_columns=[],
    numeric_threshold=0.05,
    numeric_scaling='standard',
    categorical_encoding='one-hot',
    nan_action='infer',
    nan_threshold=0.6,
    verbose=True,
    manifold_learning=None,
    manifold_dimension=2
)

Graph construction

from tagra.graph import construct_graph

Example usage

graph = construct_graph( data_path='data.csv', preprocessed_data_path=None, method='knn', k=5, output_path=None, verbose=True )

Graph Analysis

from tagra.analysis import analyze_graph

# Example usage
results = analyze_graph(
    graph_path='graph.pickle',
    degree_distribution=True,
    centrality_measures=['closeness', 'giant_connected_component'],
    community_detection='hierarchical',
    neighbor_analysis=True,
    attribute=None
)

Detailed Documentation

For a comprehensive guide on how to use each feature of TaGra, including detailed parameter descriptions and additional examples, please refer to the full documentation.

Contributing

We welcome contributions from the community. If you would like to contribute, please read our Contributing Guide for more information on how to get started.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Support

If you have any questions or need help, please feel free to open an issue on our GitHub repository.


Thank you for using TaGra! We hope it makes your data preprocessing and graph analysis tasks easier and more efficient.

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

TaGra-0.1.5.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

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

TaGra-0.1.5-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file TaGra-0.1.5.tar.gz.

File metadata

  • Download URL: TaGra-0.1.5.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for TaGra-0.1.5.tar.gz
Algorithm Hash digest
SHA256 dce9c4f95cc6c43ce3b79ff583a0075e6c3bd52d8f44c2c219a1bb43c23d56cf
MD5 2a329631f9f1db6d308810768763442d
BLAKE2b-256 4065cf7ccb4896c3c65adb9275077da3eb9334b39413b9eca711be4865ee59e1

See more details on using hashes here.

File details

Details for the file TaGra-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: TaGra-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for TaGra-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1650418d88f16e6cb28598725da9f5891af0394f5b652b45d472c6fee139d8a7
MD5 01e0042a3c2084ffe8c8747f4efd75ce
BLAKE2b-256 ae2c1cde3138354586cc3642cdeaac28b6ac7605da605c61d1b8c6c5fabec455

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