Data and modeling
Machine learning for data science
In data science, machine learning turns a business or research question into a prediction you can test. Typical tasks include predicting which customers will buy or respond, estimating a measured quantity, and explaining which features drive a model's output.
How machine learning is used in data science
Ranking search results and recommendations
Search results, product feeds and content rows are ordered by models that predict what each person is likely to click, book or buy. Teams often start with gradient-boosted trees on engineered features and move to neural networks as data and traffic grow.
Real exampleApplying Deep Learning to Airbnb SearchAirbnb describes how a gradient-boosted decision tree model drove its early search-ranking gains, and how it applied neural networks when those gains plateaued.
Measuring marketing impact
Marketing mix models regress sales on spend per channel, with terms for carryover and saturation, to estimate what each channel contributes. The estimates feed budget decisions, so teams check them against experiments where they can.
Real exampleRobyn (Meta, open source)Meta's marketing mix modelling package uses ridge regression to handle correlated channels and Prophet to separate trend, seasonality and holiday patterns.
Forecasting demand
Forecasts of sales, visits or electricity load drive staffing, stock and capacity plans. Data scientists combine lagged values, calendar effects and weather in gradient boosting or neural models and compare them with simple seasonal baselines.
Real exampleOpen Climate Fix demand forecasting for NGEDOpen Climate Fix is developing an automated forecasting system powered by machine learning to help National Grid Electricity Distribution predict electricity demand.
Explaining what drives a prediction
Stakeholders want to know why a customer was scored as likely to leave or an application as risky. Feature-attribution methods split each prediction into contributions from each input, which also helps catch leaked or nonsensical features.
Real exampleSHAP (Lundberg and Lee, NeurIPS 2017)The paper introduced SHAP, which assigns each feature an importance value for a particular prediction using Shapley values from game theory.
Can you learn machine learning for data science?
Yes. If you can work with spreadsheets or SQL and are comfortable with school algebra, you can learn machine learning for data science step by step. Learn Python and pandas first, then statistics, then supervised models with honest evaluation.
- PythonWrite Python well enough to load, clean and join tables and to package repeated steps as functions.Learn it in Python
- Data toolsUse NumPy, pandas and plotting libraries to explore a dataset, find missing values and check distributions before you model anything.Learn it in Data Tools
- StatisticsLearn distributions, estimation and hypothesis testing so you can tell a real effect from noise and read an A/B test.Learn it in Statistics
- Supervised machine learningFit regression and classification models, compare them with a baseline and choose metrics that match the decision the model supports.Learn it in Machine Learning
- Communicating resultsExplain what a model does, how sure it is and where it fails, in charts and plain language a decision-maker can act on.
Moving into machine learning for data science
If you already work in the field
Analysts and researchers already know how to frame questions, query data and present findings, which is much of the job. Add Python, cross-validation and two or three model families, then rebuild one of your existing reports as a prediction with a held-out test score.
If you come from data science or ML
If you come from ML engineering or research, the gap is usually the business side: defining a target that matches a decision, designing experiments and explaining uncertainty to non-specialists. Work through one decision end to end with an analytics or product lead.
Roles that do this workData scientistProduct data scientistMachine learning engineerDecision scientistApplied scientist
Tools you will use
| Tool | What you use it for |
|---|---|
| pandas | Load, clean, join and summarise tabular records before modelling. |
| scikit-learn | Fit baselines, classifiers and regressors, and evaluate them with cross-validation. |
| Jupyter | Combine code, charts and notes in one reproducible analysis notebook. |
| seaborn | Plot distributions and relationships to check the data before and after modelling. |
| statsmodels | Fit regression models with standard errors and tests when you need inference. |
Public data to practise on
- Online Shoppers Purchasing Intention (UCI): Browsing-session features labelled with whether the visit ended in a purchase, for classification practice.
- Default of Credit Card Clients (UCI): Payment history and demographics of card holders, for predicting default on the next month's payment.
Your first project
Download the Online Shoppers Purchasing Intention dataset, predict whether a session ends in a purchase with logistic regression, and compare it with a majority-class baseline using ROC AUC on a held-out split.
Common questions
Is machine learning part of data science?
Yes. Machine learning is one of the main toolkits in data science, alongside statistics, data cleaning, visualisation and experiment design. Many data science projects use no machine learning at all, and those that do spend much of their time on data preparation and evaluation.
Do data scientists need deep learning?
Not for most tabular business problems, where linear models and gradient-boosted trees are strong and easier to explain. Deep learning matters for text, images, audio and very large datasets.
Should I learn Python or R for data science?
Python is the more common choice for machine learning because of scikit-learn, PyTorch and the wider engineering ecosystem. R remains strong for statistics and research reporting, and you will need SQL alongside either.
How much maths does data science need?
Comfortable algebra, probability and statistics, plus enough linear algebra and calculus to understand what a model is optimising. Applied roles depend more on understanding assumptions and evaluation than on deriving algorithms.
Courses for these skills
- Python for AI and Machine LearningWrite functions and inspect exceptions while building a repeatable analysis.33 published lessons · all planned lessons open
- Data Tools: NumPy, pandas, Matplotlib and scikit-learnPrepare arrays and tables without losing column meaning.23 published lessons · all planned lessons open
- Practical Machine Learning in PythonConnect inspection to model evaluation and leakage.51 published lessons · more lessons in production
- Statistics and Probability for Machine LearningAssess variation between samples instead of treating a ranking as fixed.41 published lessons · all planned lessons open
New to programming or maths? Start with Python, or follow the machine learning path in order. Published lessons are free to read; compare Free and Pro.