Example package for the iSTAGING Workshop
Project description
Workshop SPARE_SCORES Model Training & Testing
This project involves training and testing a SPARE_SCORES model using the SPARE framework. The provided CLI tool allows users to easily train a model on a given dataset and test it on another dataset.
Table of Contents
Installation
-
Clone the repository:
git clone https://github.com/yourusername/iSTAGING_Workshop.git cd iSTAGING_Workshop
-
Create a virtual environment:
conda create -n workshop python=3.8 conda activate workshop
-
Install the dependencies:
pip install numpy pandas scikit-learn spare-scores
Usage
The CLI tool supports both training and testing modes. It can be invoked as follows:
-
Training:
python iSTAGING_Workshop/cli.py --action train --input path/to/train_data.csv --output path/to/save_model.pkl.gz
-
Testing:
python iSTAGING_Workshop/cli.py --action test --input path/to/test_data.csv --model path/to/saved_model.pkl.gz --output path/to/save_results.csv
CLI arguments
Required CLI arguments
-a, --action
: The action to be performed, either train or test.-i, --input
: The dataset to be used for training/testing, provided as a CSV file.
Optional Arguments
-m, --model, --model_file
: The model file to be used for testing. Required for testing.-o, --output
: The filename for the model to be saved (if training) or the test results to be saved (if testing).-h, --help
: Show the help message and exit.-V, --version
: Display the version of the package.
Examples
-
Training a Model
To train a model with the provided training dataset:
python cli.py --action train --input data/train_data.csv --output my_model.pkl.gz
-
Testing a Model
To test the provided model:
python cli.py --action test --input test_data.csv --model model/test.pkl.gz --output predictions.csv
Contributing
Contributions are welcome! Please fork the repository and submit a pull request with your changes. Check out the CONTRIBUTING.md for more info! Also check out the Code of Conduct of the project.
License
This project is licensed under the CBICA License - see the LICENSE file for details.
References
-
SPARE-AD
Davatzikos, C., Xu, F., An, Y., Fan, Y. & Resnick, S. M. Longitudinal progression of Alzheimer's-like patterns of atrophy in normal older adults: the SPARE-AD index. Brain 132, 2026-2035, doi:10.1093/brain/awp091 (2009).
@article{davatzikos2009sparead, title={Longitudinal progression of Alzheimer's-like patterns of atrophy in normal older adults: the SPARE-AD index}, author={Davatzikos, Christos and Xu, Feng and An, Yaakov and Fan, Yong and Resnick, Susan M}, journal={Brain}, volume={132}, pages={2026--2035}, year={2009}, publisher={Oxford University Press}, doi={10.1093/brain/awp091} }
-
SPARE-BA
Habes, M. et al. Advanced brain aging: relationship with epidemiologic and genetic risk factors, and overlap with Alzheimer disease atrophy patterns. Transl Psychiatry 6, e775, doi:10.1038/tp.2016.39 (2016).
@article{habes2016spareba, title={Advanced brain aging: relationship with epidemiologic and genetic risk factors, and overlap with Alzheimer disease atrophy patterns}, author={Habes, Mollie and others}, journal={Translational Psychiatry}, volume={6}, pages={e775}, year={2016}, publisher={Nature Publishing Group}, doi={10.1038/tp.2016.39} }
-
diSPARE-AD
Hwang, G. et al. Disentangling Alzheimer's disease neurodegeneration from typical brain ageing using machine learning. Brain Commun 4, fcac117, doi:10.1093/braincomms/fcac117 (2022).
@article{hwang2022disparead, title={Disentangling Alzheimer's disease neurodegeneration from typical brain ageing using machine learning}, author={Hwang, Gabriel and others}, journal={Brain Communications}, volume={4}, pages={fcac117}, year={2022}, publisher={Oxford University Press}, doi={10.1093/braincomms/fcac117} }
Disclaimer
- The software has been designed for research purposes only and has neither been reviewed nor approved for clinical use by the Food and Drug Administration (FDA) or by any other federal/state agency.
Contact
For more information and support, please contact aidinisg@pennmedicine.upenn.edu.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file istaging_workshop-0.1.1.tar.gz
.
File metadata
- Download URL: istaging_workshop-0.1.1.tar.gz
- Upload date:
- Size: 817.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fed996edf16e01ac0e455637daf8d4f7a91b8d0576eca8979e638bd5ef190518 |
|
MD5 | 0123ed2b1d2fc35df1e90f383d6f3cc4 |
|
BLAKE2b-256 | d398fd36176c19fd11b7e5eed7f1c770efbae55da9ab54483248ab15a1fcd52b |
File details
Details for the file iSTAGING_Workshop-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: iSTAGING_Workshop-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e26c1d9d73412c495e15360a69e44488ab5695be8b95f283da49678044532662 |
|
MD5 | 5b9441d0c78a40ce7b14a6944aaae0ff |
|
BLAKE2b-256 | 158ffc59c71b96ae3edf97f8a23523ab555165ec76ffbb2937f99a2adf9492d4 |