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.10.12 installed
  • Required Python packages (you can install them using pip):
    • pandas==1.5.3
    • numpy==1.23.5
    • joblib==1.3.2
    • scikit-learn==1.2.2
    • lightgbm==4.0.0

Usage

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

from PySRAG.PySRAG import SRAG, GBMTrainer

# from https://opendatasus.saude.gov.br/dataset/srag-2021-a-2023
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]])

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.2.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

PySRAG-0.1.2-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: PySRAG-0.1.2.tar.gz
  • Upload date:
  • Size: 7.1 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.2.tar.gz
Algorithm Hash digest
SHA256 1b38c17ffce713ab584c33e029eaf2a904cba55f392080a5f2d14a9a121006d9
MD5 179590f33c4467048ee95679cf46a559
BLAKE2b-256 f3c8c653ee57750c3af22ad4a3d3080f6fbc5375a74ab2e7a4905abae2804ee6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: PySRAG-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 920416a6da42509e29673fbe6c211fa1e7fd0e16a5338bfa092b5c2fe96062d8
MD5 f9b2b5db83ae7630f0ac78d1172bd207
BLAKE2b-256 e1ca11c1c842dcf0af91535fa4341ff4d4264cff93d5263acc82f3eaaa7feb1e

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