This repository is a step-by-step introduction to practical data science and entry-level machine learning for young research students.
The example project uses a sample materials-science dataset about twin-boundary migration. The dataset is synthetic, so it is safe for practice: students can learn the workflow before using real research data.
This repo is designed for students who:
- know basic Python syntax, or are learning it;
- have some statistics background;
- are new to pandas, plotting, Jupyter notebooks, and scikit-learn;
- need a practical path from setup to a small interpretable ML result.
By the end, students should be able to:
- explain what data science does;
- set up a clean Python environment;
- use Jupyter notebooks for research notes and code;
- load and inspect tabular data with pandas;
- make clear exploratory plots;
- define features and a target;
- compare a baseline model with simple ML models;
- evaluate models with MAE, RMSE, and R2;
- make a feature-importance plot;
- explain what a model can and cannot prove.
- Read docs/project_overview.md.
- Set up Python using one guide:
- Windows: docs/setup_windows.md
- Mac: docs/setup_mac.md
- Follow the main practice checklist: exercises/checklist.md.
- Use the lessons in order:
For instructor publishing notes, see docs/publishing_to_github.md.
The first pass is designed for 6-8 hours:
| Block | Time |
|---|---|
| Project overview and reflection | 30-45 min |
| Python/Jupyter setup | 60-90 min |
| Notebook smoke test | 20-30 min |
| pandas and toy dataset | 60-90 min |
| Exploratory plots | 90-120 min |
| Baseline and regression | 90-120 min |
| Random forest and feature importance | 60-90 min |
| Research log | 30-45 min |
ml_intro_practice/
README.md
requirements.txt
docs/
project_overview.md
setup_windows.md
setup_mac.md
reading_list.md
lessons/
01_environment_check.md
02_data_science_workflow.md
03_pandas_toy_data.md
04_visualization_eda.md
05_baseline_and_regression.md
06_random_forest_interpretability.md
07_mini_project.md
exercises/
checklist.md
scripts/
generate_toy_data.py
run_model_demo.py
data/
README.md
notebooks/
README.md
After creating and activating a virtual environment:
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
jupyter labFor full setup instructions, use the operating-system guides in docs/.
This repo is intentionally modest. It teaches the core habits before advanced models:
- start with the question;
- understand the table;
- plot before modeling;
- compare against a baseline;
- evaluate on held-out data;
- interpret carefully;
- write down limitations.
The toy dataset is generated by scripts/generate_toy_data.py. The numbers are not physics. They are designed to create a small, interpretable tabular ML exercise.