This is a decision tree for sleep disorder detection, which was used in an Artificial Intelligence class taken in my Master's Degree.
decision-tree-impl/
├── src/ # Source code
│ ├── fix_data.py # Data preprocessing script
│ └── train_model.py # Model training and evaluation script
├── data/ # Dataset files
│ ├── original-dataset.csv
│ └── fixed-dataset.csv
├── output/ # Results and outputs
│ └── result.txt
├── run.py # Main script to run the complete pipeline
└── README.md
To run this project locally, you need to:
- Install and define a venv:
pip install virtualenv
virtualenv myenv- Activate the virtual environment:
# On Windows
myenv\Scripts\activate
# On Linux/Mac
source myenv/bin/activate- Install dependencies:
pip install pandas scikit-learn dtreeviz- Run the complete pipeline:
python run.pyThe run.py script will:
- Preprocess the original dataset (
data/original-dataset.csv) - Train the decision tree model
- Evaluate the model and save results to
output/result.txt
You can check the results in output/result.txt
This repository is using Gitflow Workflow and Conventional Commits, so if you want to contribute:
- create a branch from develop branch;
- make your contributions;
- open a Pull Request to develop branch;
- wait for discussion and future approval;
I thank you in advance for any contribution.
Finished