Skip to content

rudra496/Stroke

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stroke Rehabilitation Activity Classification

License: MIT

Overview

This repository contains the code, notebooks, figures, and documentation for a machine learning framework that classifies upper-extremity rehabilitation activities from wearable IMU data using Random Forest and LSTM models. The project uses the PrimSeq (StrokeRehab) dataset and achieves 92.5% accuracy under LOSO validation.

Key features:

  • Stratified sampling and feature engineering.
  • Comparative analysis (RF vs. LSTM).
  • Few-shot personalization.
  • Interpretable insights (e.g., feature importance, ROC curves).

This is based on a 67-page research document (see /docs/) and Jupyter notebooks for full reproducibility.

Requirements

  • Python 3.8+
  • Install dependencies: pip install -r requirements.txt (Example contents: numpy, pandas, scikit-learn, tensorflow, matplotlib)

Folder Structure

  • /notebooks/: Jupyter notebooks for data processing, model training, and evaluation.
  • /code/: Utility scripts.
  • /figures/: Generated plots (e.g., confusion matrices, ROC curves).
  • /tables/: CSV/text files for results (e.g., performance metrics).
  • /docs/: Full 67-page PDF report with embedded code and figures.
  • /data/: Small data samples; full data hosted externally (see below).

How to Run

  1. Clone the repo: git clone https://github.com/rudra496/Stroke.git
  2. Install deps: pip install -r requirements.txt
  3. Download full data: Run bash download_data.sh (links to Zenodo/Figshare).
  4. Open notebook: jupyter notebook notebooks/main_analysis.ipynb
  5. Train model: Follow cells for sampling, training, and evaluation.

Example output: 92.5% accuracy on test set.

Data

  • Sample Data: In /data/sample_data.csv (small subset for testing).
  • Full 1GB Dataset: Hosted on [Zenodo DOI: insert-your-DOI-here] (or Kaggle/Figshare link). Download and place in /data/full/ (ignored by .gitignore).
    • Why external? To keep repo lightweight; full data includes raw IMU readings from 40 subjects.

Results

  • See /tables/performance.csv for metrics.
  • Figures in /figures/ match the paper (e.g., ROC with AUC 0.95).

Citation

If using this work, cite:

About

🧠 Stroke detection using CNN-based medical image analysis — deep learning for healthcare

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors