Machine Learning in 30 Days: A Beginner's Roadmap from Python to First Model

The fastest way to learn machine learning is not to read about it for six months. It is to write code, break it, fix it, and finish something small. This plan compresses the first stretch of that journey into thirty days. It assumes about ninety minutes a day and no prior experience training a model.
By day thirty you will have a working prediction pipeline, a project you can explain out loud, and enough vocabulary to read documentation without panic. You will not be an expert. Nobody is, after a month. But you will know what to learn next, which is the part most beginners never work out.
Set Up Before Day One
Spend one evening on the environment so week one is not lost to installation errors. You need Python 3.11 or newer, an editor, and four libraries. Anaconda bundles everything, but a plain install with a virtual environment is lighter and teaches you more.
- Python installed, with a separate virtual environment per project.
- VS Code or JupyterLab — pick one and stop switching.
- NumPy, pandas, scikit-learn and matplotlib, installed with pip.
- A folder called ml-30-days, with one subfolder per week.
- A notes file: every error you fix, and its cause.
That last habit matters more than it looks. Beginners hit the same two or three problems for weeks — a shape mismatch, a column read as text, a missing value quietly poisoning a mean. Notes turn those into one-time costs.
Week 1: Python, Data, and the Tools That Matter
You do not need all of Python. You need enough to move data around, and no more.
Days 1–2: variables, lists, dictionaries, loops, conditionals, functions. Type them out; do not just read.
Day 3: list comprehensions, reading and writing files, try/except.
Days 4–5: NumPy. Arrays, indexing, slicing, shapes, broadcasting, vectorised arithmetic. This is where Python becomes fast enough for real data.
Day 6: pandas. Read a CSV, inspect it with head() and info(), filter rows, select columns, group, handle missing values.
Day 7: matplotlib. Line, scatter and histogram plots, with labels and titles.
Mini-project for week one
Take a CSV you actually care about — monthly expenses, a workout log, your reading list — and answer three questions with pandas, then plot each answer. No model yet. Fluency with the tools is the goal, and a dataset you already understand is far easier to debug.
Week 2: The Core Ideas, With Code
Machine learning splits into supervised learning, where you have labelled examples, and unsupervised learning, where you look for structure. Start with supervised. Everything else is easier once that clicks.
Days 8–9: features, labels, train and test sets, and the fit/predict pattern shared by every estimator in scikit-learn.
Days 10–11: linear regression. Predict a number, using one or two features so you can plot the line and see what was learned.
Day 12: logistic regression for classification. The breast cancer dataset built into scikit-learn is a good first target.
Day 13: decision trees. Easy to interpret, which makes them excellent teachers.
Day 14: k-nearest neighbours, then compare all four models on the same data.
One API to memorise
Model, fit, predict, score. Every estimator you touch for the next year follows it. Learn the pattern once and the library becomes a list of options instead of a maze.
Week 3: Train, Evaluate, Improve
This is the week beginners skip, and it is the week that separates a hobby from a skill. A model that scores 95% means nothing if you tested it on the data it trained on.
Day 15: accuracy, and why it misleads on imbalanced data. Day 16: confusion matrix, precision, recall, F1. Day 17: cross-validation with k-fold splits. Day 18: overfitting and underfitting — plot training and validation scores as model complexity grows. Day 19: feature scaling, and why distance-based models need it. Day 20: pipelines, so preprocessing travels with the model. Day 21: hyperparameter tuning with grid search.
Write a one-line baseline for every dataset you touch — predict the most common class, or the mean. If your model cannot beat that, the problem is in your setup, not the algorithm.
Week 4: One Project, Start to Finish
Days 22 to 26 belong to a single project. Choose something modest: predicting house prices from a public table, classifying customer churn, or flagging unusual transactions. Avoid image data this month; it adds a second set of problems while you are still building the first.
A shape that works
- Write your question in one sentence, and say what a good result would look like.
- Split the data before you look at it. Hold the test set back.
- Build the simplest thing that runs, even if it is bad.
- Measure, and write the score down with the date.
- Change one thing at a time, then re-measure.
- Keep a leaderboard of your attempts in a plain text file.
Days 27 and 28 are for cleanup: clear variable names, delete dead cells, confirm the notebook runs top to bottom without errors. Days 29 and 30 are for writing. A one-page summary — question, data, method, result, limits — is worth more than another half-point of accuracy.
Where to Find Free Datasets
- scikit-learn built-ins: iris, wine, breast cancer, diabetes. Small, clean, one line away.
- Kaggle Datasets: huge variety, with community notebooks you can learn from.
- UCI Machine Learning Repository: older, well documented, messy in realistic ways.
- OpenML: handy for quick benchmarking and comparisons.
- National and city open-data portals: good when you want a topic you genuinely care about.
Start with clean built-in data. Once a model works end to end, deliberately choose a messy file — missing values, mixed types, inconsistent categories — and fix it. That is the real job.
What to Do on Day Thirty-One
Thirty days will not make you employable, and any plan that promises that is selling something. What this one does is remove the fear. You will know how a model is trained, how it is judged, and how it fails.
Keep the next step small: rebuild your week-four project from scratch in a fresh notebook, without opening the old one. If you can do that in a single sitting, the material has stuck. Then pick a second project with a different kind of target — a number instead of a category, or three classes instead of two — and run the same shape again, faster. If your project touches people's health, money, or legal standing, treat every prediction as a prompt for a qualified human to review, never as the decision itself.


