A clean, reproducible machine-learning project for experimenting with IoT/Windows dataset classification.
The original repository contained a Jupyter notebook and a CSV dataset. This upgraded version reorganizes the work into a GitHub-ready research project with a professional README, source code modules, configuration files, reproducible scripts, and documentation.
Research note: The original notebook reported very high scores with models such as LightGBM and Decision Tree. This version adds a safer evaluation pipeline to reduce the risk of data leakage and overfitting.
- Clean project structure for GitHub and research presentation
- Reproducible ML pipeline using
scikit-learnandlightgbm - Binary and multiclass classification support
- Data validation, preprocessing, model training, evaluation, and report generation
- Confusion matrix and classification report outputs
- Configuration-based workflow
- GitHub Actions workflow for basic Python checks
- Ready-to-customize notebook folder
IoT-Paper-Professional/
├── configs/
│ └── default.yaml
├── data/
│ ├── raw/ # Put windows7_dataset.csv here
│ └── processed/ # Generated clean datasets
├── notebooks/
│ └── README.md
├── reports/
│ └── figures/ # Saved plots and evaluation figures
├── src/
│ └── iot_paper/
│ ├── __init__.py
│ ├── data.py
│ ├── features.py
│ ├── train.py
│ └── evaluate.py
├── .github/workflows/
│ └── python-checks.yml
├── .gitignore
├── CITATION.cff
├── CONTRIBUTING.md
├── LICENSE
├── pyproject.toml
├── requirements.txt
└── README.md
git clone https://github.com/mohammadali-mousavireineh/IoT-Paper.git
cd IoT-Paperpython -m venv .venvWindows:
.venv\Scripts\activatemacOS / Linux:
source .venv/bin/activatepip install -r requirements.txtPlace your dataset here:
data/raw/windows7_dataset.csv
python -m iot_paper.train --config configs/default.yamlThe pipeline follows these steps:
- Load raw CSV data
- Detect and remove empty / duplicated columns
- Split features and target label
- Encode categorical values
- Train a baseline model
- Evaluate with accuracy, F1-score, precision, recall, and confusion matrix
- Save results under
reports/
Very high accuracy, such as 99%, can happen for two very different reasons:
- The model is genuinely good, or
- The dataset leaks the answer through duplicated rows, target-like columns, timestamps, IDs, or train/test contamination.
Before claiming strong performance, check:
- Are there duplicated rows across train/test sets?
- Are there columns that directly reveal the target?
- Is the split random when it should be time-based or device-based?
- Are IDs, session labels, or post-event columns included as features?
- Does cross-validation show similar performance?
- Decision Tree baseline
- Random Forest baseline
- LightGBM multiclass classifier
- Binary classification version
- Feature importance analysis
- Ablation study: remove suspicious columns and retrain
- Stratified K-fold cross-validation
- Time-aware or group-aware split if session/device IDs exist
Train using the default configuration:
python -m iot_paper.train --config configs/default.yamlRun evaluation only after saving predictions:
python -m iot_paper.evaluate --predictions reports/predictions.csvThe dataset is not redistributed in this professional template. Put the original CSV file in:
data/raw/windows7_dataset.csv
The original GitHub repository includes windows7_dataset.csv and Untitled-1.ipynb.
- Clean and rename the original notebook
- Add exploratory data analysis notebook
- Add leakage detection report
- Add model comparison table
- Add feature importance visualizations
- Add paper-style result summary
- Add Dockerfile
- Add Streamlit demo dashboard
Mohammadali Mousavireineh
GitHub: @mohammadali-mousavireineh
This project is released under the MIT License. See LICENSE for details.