Skip to main content

This Python package provides tools for analyzing and processing data related to Severe Acute Respiratory Syndrome (SARS) and other respiratory viruses. It includes functions for data preprocessing, feature engineering, and training Gradient Boosting Models (GBMs) for binary or multiclass classification.

Project description

PySRAG

This Python package provides tools for analyzing and processing data related to Severe Acute Respiratory Syndrome (SARS) and other respiratory viruses. It includes functions for data preprocessing, feature engineering, and training Gradient Boosting Models (GBMs) for binary or multiclass classification.

Getting Started

These instructions will help you get started with using the PySRAG package.

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Python 3 installed
  • Required Python packages (you can install them using pip):
    • pandas==1.5.3
    • numpy==1.23.5
    • scikit-learn==1.2.2
    • lightgbm==4.0.0

Installation

You can install the PySRAG package using pip:

pip install PySRAG

Usage

Here's an example of how to use the SRAG package:

from pysrag.data import SRAG
from pysrag.model import GBMTrainer

# from https://opendatasus.saude.gov.br/dataset/srag-2021-a-2024
filepath = 'https://s3.sa-east-1.amazonaws.com/ckan.saude.gov.br/SRAG/2023/INFLUD23-16-10-2023.csv' 

# Initialize the SRAG class
srag = SRAG(filepath)

# Generate training data
X, y = srag.generate_training_data(lag=None, objective='multiclass')

# Train a Gradient Boosting Model
trainer = GBMTrainer(objective='multiclass', eval_metric='multi_logloss')
trainer.fit(X, y)

# Get Prevalences
trainer.model.predict_proba(X)
array([[0.36010109, 0.00913779, 0.01018454, 0.0413374 , 0.57923918],
       [0.26766377, 0.16900332, 0.13882407, 0.10029527, 0.32421357],
       [0.01113844, 0.0879723 , 0.00920112, 0.87940126, 0.01228688],
       ...,
       [0.02176705, 0.03438226, 0.01555221, 0.11300813, 0.81529035],
       [0.02176705, 0.03438226, 0.01555221, 0.11300813, 0.81529035],
       [0.08954213, 0.17430267, 0.041657  , 0.66829007, 0.02620812]])

Web Application

The PySRAG package includes a web application that allows users to interactively explore data related to Severe Acute Respiratory Syndrome (SARS) in Brazil. This web-based interface provides a practical way for users to visualize data without needing deep technical knowledge of Python or the underlying code.

Accessing the Web Application

To access the web application, visit:

PySRAG Web App

This link will take you to a hosted version of our application, equipped with preloaded data and features for easy exploration.

Features

The web application offers the following features:

  • Data Visualization: Interactive graphs display processed data, giving insights into the distribution of respiratory viruses.
  • Data Filtering: Users can apply filters based on city and patient age to narrow down the data and focus on specific demographics or regions.

How to Use

  1. Navigate to the Dashboard: Start on the dashboard, which provides an overview of the visualizations.
  2. Apply Filters: Use the filtering options to select specific cities or age ranges to view customized data visualizations.
  3. Explore Visualizations: Interact with the visual data representations to gain deeper insights into the trends and patterns.

Support

If you encounter any issues while using the web application or have suggestions for improvements, please submit an issue on our GitHub page.

This web application is designed to make the data analysis capabilities of the PySRAG package accessible to both technical and non-technical users, enhancing understanding and facilitating research on respiratory viruses.

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

PySRAG-0.1.6.tar.gz (115.2 kB view details)

Uploaded Source

Built Distribution

PySRAG-0.1.6-py3-none-any.whl (119.0 kB view details)

Uploaded Python 3

File details

Details for the file PySRAG-0.1.6.tar.gz.

File metadata

  • Download URL: PySRAG-0.1.6.tar.gz
  • Upload date:
  • Size: 115.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.5

File hashes

Hashes for PySRAG-0.1.6.tar.gz
Algorithm Hash digest
SHA256 d2dc539ec366fb271e313bfd7a6a511557108f6839ed04d3cb84528dc0ef62d2
MD5 8ab98b8efa58beef6e9fc6b90fa9a8cb
BLAKE2b-256 6986fe194d2fdcd0e82be44eee7b662af1fd9fbf2298eb6b658fc70613f62261

See more details on using hashes here.

File details

Details for the file PySRAG-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: PySRAG-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 119.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.5

File hashes

Hashes for PySRAG-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 91c1b220aef79764d2253602e7b6691749978abf4a27b0be14b56f51b17eefe2
MD5 2eb3b1c17407c5c5dd9b59bd673b0b8d
BLAKE2b-256 b6d5f2386ca1922a9b31b58018790c7eb71f4167182e85cfbe99d457cd3342f2

See more details on using hashes here.

Supported by

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