Program
1. Course identification
| Item | Detail |
|---|---|
| Course title | Machine Learning — Business Applications |
| Programme | EGEI · Track GEME (Globalisation and Emerging Market Economies) |
| ECTS | 5 |
| Prerequisites | Applied Econometrics I and II |
| Lecturer | Sebastián Azócar M., MSc in Data Science |
| Contact | hizocar@gmail.com |
| Language | English |
| Schedule | Fridays, 13:00 – 16:00 · 11 September – 27 November 2026 (10 meetings) |
| Tools | Python · scikit-learn · an AI coding assistant of your choice |
| Course case | Targeting poor households with CASEN 2022 |
2. Course description
Machine learning (ML) uses algorithms that learn patterns from data instead of following rules written by hand. This course covers the statistical methods and techniques used in ML to make predictions with business applications: what a model can and cannot learn from data, how to evaluate it honestly, and how to turn a prediction into a decision someone can act on.
What changes this year. Code assistants have moved from novelty to standard equipment on a data team. Producing code is cheap now; being accountable for it is not. The course therefore runs two threads in parallel:
- the modelling thread — the statistics and algorithms, which do not change because a machine writes the syntax for you; and
- the workflow thread — using an assistant to scaffold, refactor, debug and explain code, and verifying its output with the same scepticism you would apply to a colleague's pull request.
The second thread is not a bonus topic: an assistant that produces a plausible-looking model with a silent data leak is worse than no assistant at all. Learning to catch that is part of the course.
3. Learning outcomes
On completion, students will be able to:
- Frame a business question as a supervised or unsupervised learning problem, and state what a good answer would look like.
- Prepare and explore real data in Python, reproducibly.
- Fit and tune regression and classification models, and justify the choice of method.
- Evaluate models honestly: train/test discipline, cross-validation, the bias–variance trade-off and the right metric for the business problem.
- Reduce and segment data without labels using principal components and clustering.
- Work with an AI coding assistant productively: prompt it precisely, review its output, test it, and identify when it is wrong.
- Communicate results, assumptions and limitations to a non-technical audience.
4. Learning methods and schedule
Learning by doing. Sessions last three hours and follow the same rhythm: a concept block, a hands-on lab paired with your assistant, and applied or project work. Students are expected to read the assigned material before class, and a study load of at least three hours per week outside the classroom is assumed. All assessed work is project-based.
Calendar
Every session works on the same case, predicting household poverty with CASEN 2022, and introduces each method once, before it is used.
| # | Date | Session |
|---|---|---|
| 1 | Fri 11 Sep ✅ | Data and decision making · Python and assistant setup |
| — | Fri 18 Sep | 🇨🇱 No class — Fiestas Patrias |
| 2 | Fri 25 Sep ✅ | Data manipulation with pandas |
| 3 | Fri 2 & 9 Oct ✅ | What is machine learning? Fitting, KNN, bias–variance |
| — | Fri 16 Oct | No class |
| 4 | Fri 23 Oct ✅ | The ML pipeline: scaling, cross-validation and data leakage |
| 5 | Fri 30 Oct | Classification: logistic regression, confusion matrix, threshold, ROC · Project released |
| 6 | Fri 6 Nov | Trees and ensembles |
| 7 | Fri 13 Nov | Variable selection and shrinkage: LASSO, Ridge, Elastic Net · Checkpoint 1 due Thu 12 Nov |
| 8 | Fri 20 Nov | Unlabeled data: PCA and clustering · project clinic |
| 9 | Fri 27 Nov | Final presentations and course closing |
🗓️ The detailed plan for each session, with objectives, labs and notebooks, is on the Classes page.
5. Course contents
A. Data and decision making
- Different types of data · data manipulation · from a business question to a dataset
B. What is machine learning?
- B.1 ML models: what a model is · fitting a model · KNN · polynomial regression · overfitting and underfitting (bias vs. variance) · the cost function · training and test error
- B.2 The ML pipeline: scaling · pipelines · cross-validation · data leakage
C. Classification
- C.1 Logistic regression: what classification is · the logit as a predictor · categorical variables and missing values in the pipeline
- C.2 Measuring performance: confusion matrix · precision and recall · the decision threshold and the cost of errors · the ROC curve and AUC
D. Trees and forests
- D.1 Tree-based methods: structure of decision trees · loss functions · pruning · regression and classification trees
- D.2 Ensemble methods: bagging · random forests · boosting
E. Selection and shrinkage
- E.1 Variable selection: best subset selection · stepwise, forward and backward selection
- E.2 Shrinkage methods: shrinkage vs. selection · LASSO · Ridge · Elastic Net
F. Unlabeled data
- F.1 Dimension reduction: principal components and their application
- F.2 Clustering: k-means · hierarchical clustering · advantages and limitations
G. Working with AI coding assistants (transversal)
- Prompting for code that is specific enough to be useful · reading and reviewing generated code · testing before trusting · typical failure modes in data work (leakage, silent type coercion, fabricated APIs, wrong metric) · reproducibility · disclosure and academic honesty
📖 The full guide for this thread is on the Code Assistants page.
Beyond this course
Two topics from previous editions do not fit in this term's calendar: naïve Bayes and text classification, and neural networks. ISLR chapters 4.4 and 10 cover both, at the same level as the course.
6. Assessment
All of the final grade comes from one project, delivered in two parts. There are no written exams and no separate in-class activities.
| Assessment | Weight | Covers | Due | Format |
|---|---|---|---|---|
| Checkpoint 1: framing, data, honest first model | 40% | Contents A, B, C | Thu 12 Nov, 23:59 | Notebook + 3-page memo |
| Final delivery: comparison, recommendation, defence | 60% | All contents | Thu 26 Nov, 23:59 | Notebook + 8-page report + presentation on Fri 27 Nov |
| Total | 100% |
Both deliveries include a mandatory assistant log: which tool you used, for what, and what you had to correct. Full instructions, deadlines and the grading rubric are on the Project page.
Assistant use: allowed, expected, and disclosed
Using an AI coding assistant is permitted and encouraged in the project. Two rules apply: (1) you must be able to explain every line you submit — presentations include questions about your own code; (2) you must disclose what you delegated in the assistant log. Code you cannot explain is treated as code you did not write.
7. Readings
Foundations
- Breiman, L. (2001). Statistical Modeling: The Two Cultures. Statistical Science, 16(3), 199-231.
- Zhang (2018). Data Types From A Machine Learning Perspective With Examples.
- Burgess, M. (2018). This is how Netflix's secret recommendation system works. Wired.
The course case
- Ministerio de Desarrollo Social y Familia. Encuesta CASEN 2022. The source of the course data. See The Case.
- Grosh, M. & Baker, J. (1995). Proxy Means Tests for Targeting Social Programs: Simulations and Speculation. World Bank LSMS Working Paper 118. Why predicting welfare from observables is a policy tool.
Models, pipeline and evaluation
- Agarwal, A. (2018). Polynomial Regression.
- Koehrsen, W. (2018). Overfitting vs. Underfitting: A Complete Example.
- Gupta, P. (2017). Cross-Validation in Machine Learning.
Classification
- ISLR, sections 4.1–4.3 and 4.6.2
- PennState STAT 508 — Lesson 9.1: Logistic Regression
Trees and ensembles
- ISLR, chapter 8
- PennState STAT 508 — Lesson 11: Tree-based Methods
Selection and shrinkage
- ISLR, sections 6.1–6.2
- PennState STAT 508 — Lesson 5: Shrinkage Methods
Working with code assistants
- GitHub Copilot documentation
- Anthropic — Claude documentation
- OpenAI — API and product documentation
📌 ISLR = James, Witten, Hastie & Tibshirani, An Introduction to Statistical Learning, freely available at statlearning.com.
Material and student projects from previous editions are in the Archive.