{"id":50339776,"url":"https://github.com/matteocourthoud/Machine-Learning-for-Economic-Analysis","last_synced_at":"2026-06-15T07:01:42.521Z","repository":{"id":47425725,"uuid":"296819286","full_name":"matteocourthoud/Machine-Learning-for-Economic-Analysis","owner":"matteocourthoud","description":"Material for the exercise sessions of master course Machine Learning for Economic Analysis @UZH","archived":false,"fork":false,"pushed_at":"2022-02-28T13:09:12.000Z","size":94008,"stargazers_count":44,"open_issues_count":0,"forks_count":23,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-04-05T13:21:31.953Z","etag":null,"topics":["course","data-science","econometrics","economics","machine-learning","phd","python","statistics"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matteocourthoud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-19T08:15:16.000Z","updated_at":"2023-04-05T12:47:56.000Z","dependencies_parsed_at":"2022-07-26T15:32:11.148Z","dependency_job_id":null,"html_url":"https://github.com/matteocourthoud/Machine-Learning-for-Economic-Analysis","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/matteocourthoud/Machine-Learning-for-Economic-Analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matteocourthoud%2FMachine-Learning-for-Economic-Analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matteocourthoud%2FMachine-Learning-for-Economic-Analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matteocourthoud%2FMachine-Learning-for-Economic-Analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matteocourthoud%2FMachine-Learning-for-Economic-Analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matteocourthoud","download_url":"https://codeload.github.com/matteocourthoud/Machine-Learning-for-Economic-Analysis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matteocourthoud%2FMachine-Learning-for-Economic-Analysis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34351451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["course","data-science","econometrics","economics","machine-learning","phd","python","statistics"],"created_at":"2026-05-29T16:00:25.479Z","updated_at":"2026-06-15T07:01:42.513Z","avatar_url":"https://github.com/matteocourthoud.png","language":"Jupyter Notebook","funding_links":[],"categories":["Lectures and books"],"sub_categories":[],"readme":"# Machine Learning for Economic Analysis\n\n⚠️ **WORK IN PROGRESS!** ⚠️\n\nWelcome to my notes for the Machine Learning for Economic Analysis course by [Damian Kozbur](https://www.econ.uzh.ch/en/people/faculty/kozbur.html) @UZH!\n\nThe exercise sessions are entirely coded in [Python](https://www.python.org/downloads/) on Jupyter Notebooks. The examples heavily borrow from [*An Introduction to Statistical Learning*](https://hastie.su.domains/ISLR2/ISLRv2_website.pdf) by James, Witten, Tibshirani, Friedman and its advanced version [*Elements of Statistical Learning*](https://hastie.su.domains/Papers/ESLII.pdf) by Hastie, Tibshirani, Friedman. Other recommended free resources are the documentation of the Python library [scikit-learn](https://scikit-learn.org/) and Bruce Hansen's [*Econometrics*](https://www.ssc.wisc.edu/~bhansen/econometrics/) book.\n\nPlease, if you find any typos or mistakes, [open a new issue](https://help.github.com/articles/creating-an-issue/). Or even better, fork the repo and [submit a pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/). I am happy to share my work and I am even happier if it can be useful.\n\n\n\n## Content\n\n1. [OLS Regression](https://matteocourthoud.github.io/course/ml-econ/01_regression/)\n   - ISLR, chapter 3\n   - ESL, chapter 3\n   - Econometrics, chapters 3 and 4\n\n2. [Instrumental Variables](https://matteocourthoud.github.io/course/ml-econ/02_iv/)\n   - Econometrics, chapter 12.1-12.12\n\n3. [Nonparametric Regression](https://matteocourthoud.github.io/course/ml-econ/03_nonparametric/)\n   - ISLR, chapter 7\n   - ESL, chapter 5\n   - Econometrics, chapters 19 and 20\n\n4. [Cross-Validation](https://matteocourthoud.github.io/course/ml-econ/04_crossvalidation/)\n   - ISLR, chapter 5\n   - ESL, chapter 7\n\n5. [Lasso and Forward Regression](https://matteocourthoud.github.io/course/ml-econ/05_regularization/)\n   - ISLR, chapter 6\n   - ESL, chapters 3 and 18\n   - Econometrics, chapter 29.2-29.5\n\n6. [Convexity and Optimization](https://matteocourthoud.github.io/course/ml-econ/06_convexity/)\n\n7. [Trees and Forests](https://matteocourthoud.github.io/course/ml-econ/07_trees/)\n   - ISLR, chapter 8\n   - ESL, chapters 9, 10, 15, 16\n   - Econometrics, chapter 29.6-29.9\n\n8. [Neural Networks](https://matteocourthoud.github.io/course/ml-econ/08_neuralnets/)\n   - ESL, chapter 11\n\n9. [Post-Double Selection](https://matteocourthoud.github.io/course/ml-econ/09_postdoubleselection/)\n\n  \t- Econometrics, chapter 3.18\n  \t- Belloni, Chen, Chernozhukov, Hansen (2012)\n  \t- Belloni, Chernozhukov, Hansen (2014)\n  \t- Chernozhukov, Chetverikov, Demirer, Duflo, Hansen, Newey, Robins (2018)\n\n10. [Unsupervised Learning](https://matteocourthoud.github.io/course/ml-econ/10-unsupervised/)\n\n  \t- ISLR, chapter 10\n  \t- ESL, chapter 14\n\n\n\n## Pre-requisites\n\nStudents should be familiar with the following concepts:\n\n-  Matrix Algebra\n   - Econometrics, appendix A.1-A.10\n-  Conditional Expectation and Projection\n -  Econometrics, chapter 2.1-2.25\n-  Large Sample Asymptotics\n -  Econometrics, chapter 6.1-6.5\n-  Python basics\n   - [Quant-Econ Tutorial](https://python.quantecon.org/index_learning_python.html)\n\n\n\n\n## Readings\n\n- Athey, S., \u0026 Imbens, G. W. (n.d.). *Machine Learning Methods Economists Should Know About*. 62.\n- Belloni, A., Chen, H., Chernozhukov, V., \u0026 Hansen, C. B. (2012). Sparse Models and Methods for Optimal Instruments With an Application to Eminent Domain. *Econometrica*, *80*(6), 2369–2429. https://doi.org/10.3982/ECTA9626\n- Belloni, A., Chernozhukov, V., \u0026 Hansen, C. (2014). Inference on Treatment Effects after Selection among High-Dimensional Controls. *The Review of Economic Studies*, *81*(2), 608–650. https://doi.org/10.1093/restud/rdt044\n- Chernozhukov, V., Chetverikov, D., Demirer, M., Duflo, E., Hansen, C., Newey, W., \u0026 Robins, J. (2018). Double/debiased machine learning for treatment and structural parameters. *The Econometrics Journal*, *21*(1), C1–C68. https://doi.org/10.1111/ectj.12097\n- Franks, A., Miller, A., Bornn, L., \u0026 Goldsberry, K. (2015). Characterizing the spatial structure of defensive skill in professional basketball. *The Annals of Applied Statistics*, *9*(1), 94–121. https://doi.org/10.1214/14-AOAS799\n- Gentzkow, M., Shapiro, J. M., \u0026 Taddy, M. (2019). Measuring Group Differences in High‐Dimensional Choices: Method and Application to Congressional Speech. *Econometrica*, *87*(4), 1307–1340. https://doi.org/10.3982/ECTA16566\n- Kleinberg, J., Lakkaraju, H., Leskovec, J., Ludwig, J., \u0026 Mullainathan, S. (2017). Human Decisions and Machine Predictions. *The Quarterly Journal of Economics*. https://doi.org/10.1093/qje/qjx032\n- Kleinberg, J., Ludwig, J., Mullainathan, S., \u0026 Obermeyer, Z. (2015). Prediction Policy Problems. *American Economic Review*, *105*(5), 491–495. https://doi.org/10.1257/aer.p20151023\n- Mullainathan, S., \u0026 Spiess, J. (2017). Machine Learning: An Applied Econometric Approach. *Journal of Economic Perspectives*, *31*(2), 87–106. https://doi.org/10.1257/jep.31.2.87\n- Wager, S., \u0026 Athey, S. (2018). Estimation and Inference of Heterogeneous Treatment Effects using Random Forests. *Journal of the American Statistical Association*, *113*(523), 1228–1242. https://doi.org/10.1080/01621459.2017.1319839\n\n\n\n## Thanks\n\nThese exercise sessions heavily borrow from\n\n- [Jordi Warmenhoven's](https://github.com/JWarmenhoven) git repo [ISLR-python](https://github.com/JWarmenhoven/ISLR-python)\n- [Quant-Econ](https://quantecon.org/python-lectures/) website\n- Prof. [Damian Kozbur](https://www.econ.uzh.ch/en/people/faculty/kozbur.html) past UZH [PhD Econometrics Class](https://matteocourthoud.github.io/econometrics/)\n- Clark Science Center [Machine Learning couse](http://www.science.smith.edu/~jcrouser/SDS293/)\n- UC Berkeley [Convex Optimization and Approximation class](https://ee227c.github.io/) by [Moritz Hardt](http://mrtz.org/)\n- [Morvan Zhou](https://github.com/MorvanZhou/) and [Yunjey Choi](https://github.com/yunjey/) [pytorch](https://github.com/MorvanZhou/PyTorch-Tutorial) [tutorials](https://github.com/yunjey/pytorch-tutorial)\n- [Daniel Godoy](https://medium.com/@dvgodoy) excellent article on Pytorch in [Medium's towardsdatascience](https://towardsdatascience.com/understanding-pytorch-with-an-example-a-step-by-step-tutorial-81fc5f8c4e8e)\n\n\n\n## Contacts\n\nIf you have any issue or suggestion for the course, please feel free to [pull edits](https://github.com/matteocourthoud/Machine-Learning-for-Economic-Analysis-2020/pulls) or contact me [via mail](mailto:matteo.courthoud@uzh.ch). All feedback is greatly appreciated!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatteocourthoud%2FMachine-Learning-for-Economic-Analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatteocourthoud%2FMachine-Learning-for-Economic-Analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatteocourthoud%2FMachine-Learning-for-Economic-Analysis/lists"}