https://chrome.deib.polimi.it/api.php?action=feedcontributions&user=Matteo&feedformat=atomChrome - User contributions [en]2022-05-26T20:25:49ZUser contributionsMediaWiki 1.25.6https://chrome.deib.polimi.it/index.php?title=File:ML2122-lab06.zip&diff=3847File:ML2122-lab06.zip2022-05-24T22:00:45Z<p>Matteo: </p>
<hr />
<div></div>Matteohttps://chrome.deib.polimi.it/index.php?title=Machine_Learning_Bio&diff=3846Machine Learning Bio2022-05-24T21:58:15Z<p>Matteo: /* Laboratories */</p>
<hr />
<div>__FORCETOC__<br />
<br />
The following are last-minute news you should be aware of ;-)<br />
* 21/05/2022: The dataset for the second homework is changed!!!<br />
* 19/05/2022: The second homework is out!!!<br />
* 04/05/2022: Changed lecture schedule<br />
* 02/05/2022: Changed deadline first homework -> 11/05/2022 at noon<br />
* 22/04/2022: The first homework is out!!!<br />
* 08/03/2022: Added material for the first lab<br />
* 06/03/2022: Slides from first lectures and last year's recordings updated <br />
* 23/02/2022: Lectures start today!<br />
<!--<br />
* 11/09/2021: Grade of the [[Media:ML2021-Grades_210911.pdf|Summer session + homeworks]] <br />
* 09/07/2021: Grade of the [[Media:ML2021-Grades_210624.pdf|24/06/2021 oral exams]] <br />
* 09/07/2021: Updated Homework + Oral [[Media:ML2021-Conversion.pdf|conversion table]]<br />
* 03/07/2021: Updated Homework available [[Media:ML2021-homework-new.zip|here!!!]]<br />
* 08/06/2021: Updated all videos and all slides from the course.<br />
* 02/06/2021: You can fin the 2020/2021 homework [[Media:ML2021-homework.zip|here!!!]]<br />
* 26/05/2021: The link to the form to request an instance of remote examination for June and July is [https://forms.office.com/r/FUrVt8eZNx here]!<br />
* 09/04/2021: From next week lectures will be back to presence (plus webex streaming)<br />
* 22/03/2021: Added completed material from the last lab plus some exercises ... <br />
* 17/03/2021: Added the material for the lab of today ... <br />
* 10/03/2021: 11/03/2021 lecture has been canceled<br />
* 06/03/2021: website update with linear algebra slides and (working) links to all lectures<br />
* 05/03/2021: Since today we are moved fully online so lectures will happen in my webex room (same holds for labs)<br />
* 24/02/2021: Lectures start today<br />
--><br />
<!--<br />
* 08/08/2020: Grading for all projects and first two calls [[Media:Grades_20200723.pdf|are here!!]] <br />
* 22/06/2020: Grading mechanism explained, check [[Media:ML2020_grading_system.pdf|here a handy recap]] <br />
* 14/06/2020: [[Media:ML2020_homework.zip |Here it come the 2020 homework!!!]]<br />
* 03/06/2020: All slides updated<br />
* 02/05/2020: Updated course schedule and added videos to the previous lectures<br />
* 04/04/2020: Updated schedule and added videos of previous lectures<br />
* 31/03/2020: Updated schedule and added material on linear algebra<br />
* 19/03/2020: Added lab material, both with empty notebooks and final result<br />
* 11/03/2020: Added today's lecture videos and planned next week schedule (To Be Completed)<br />
* 11/03/2020: The course starts today!<br />
* 03/03/2020: The course is going to start soon ...<br />
--><br />
<br />
==Course Aim & Organization==<br />
<br />
The objective of the Machine Learning course is to give an in-depth presentation of the techniques most used for pattern recognition, knowledge discovery, and data analysis/modeling. These techniques are presented both from a theoretical (i.e., statistics and information theory) perspective and a practical one (i.e., coding examples) through the descriptions of algorithms and their implementations in a general-purpose programming language (i.e., python).<br />
<br />
The course presents the classical supervised and unsupervised learning paradigms described and discussed presenting regression, classification, and clustering problems in Bioinformatics. The course is composed of a set of lectures on specific machine learning techniques (e.g., generalized linear regression, logistic regression, linear and quadratic discriminant analysis, support vector machines, k-nearest-neighborhood, clustering, etc.) preceded by the introduction of the Statistical Learning framework which acts as a common reference framework for the entire course.<br />
<br />
===Teachers===<br />
<br />
The course is composed of a blending of lectures and exercises by the course teacher and a teaching assistant.<br />
<br />
* [http://www.deib.polimi.it/ita/personale/dettagli/267262 Matteo Matteucci]: the course teacher <br />
* [https://www.deib.polimi.it/ita/personale/dettagli/1638984 Stefano Samele]: the teaching assistant <br />
<br />
===Course Program===<br />
<br />
The course mostly follows the following book which is also available for download in pdf<br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani<br />
<br />
The course lectures will present the theory and practice of the following:<br />
* Machine Learning and Pattern Classification: the general concepts of Machine Learning and Pattern Recognition are introduced within the framework of Statistical Decision Theory with reference to the bias-variance trade-off and the Bayes classifier;<br />
* Generalized Linear Regression: linear methods for regression will be presented and discussed introducing different techniques (e.g., Linear Regression, Ridge Regression, K-Nearest Neighbors Regression, Non-Linear Regression, etc.) and the most common methodologies for model validation and selection (e.g., AIC, BIC, cross-validation, stepwise feature selection, Lasso, etc.).<br />
* Linear and Non-Linear Classification: generative and discriminative techniques for classification will be described and discussed (e.g., Logistic Regression, Linear and Quadratic Discriminant Analysis, K-Nearest Neighbors, Perceptron Rule, and Support Vector Machines, etc.). Metrics for classifiers evaluation and comparison are presented in this part of the course (e.g., accuracy, precision, recall, ROC, AUC, F-measure, Matthew coefficient).<br />
* Unsupervised Learning: the most common approaches to unsupervised learning are described mostly focusing on clustering methods such as hierarchical clustering, k-means, k-medoids, Mixture of Gaussians, DBSCAN, etc<br />
<br />
These topics will be presented both from a theoretical perspective and a practical one via implementations in the general-purpose programming language python.<br />
<br />
===Detailed course schedule===<br />
<br />
A detailed schedule of the course can be found here; topics are just indicative while days and teachers are correct up to some last-minute change (I will notify you by email). Please note that not all days we have lectures!!<br />
<br />
Note: Lecture timetable interpretation<br />
* On Wednesday, in room 26.02, starts at 15:15 (cum tempore), ends at 18:15<br />
* On Thursday, in room 26.01, starts at 12:15 (cum tempore), ends at 14:15<br />
<br />
<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|23/02/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Machine Learning Intro<br />
|-<br />
|24/02/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Statistical Learning Theory (Ch. 1 ISL)<br />
|-<br />
|02/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Statistical Learning Theory - Bias/Variance Trade-off (Ch. 2 ISL)<br />
|-<br />
|03/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Introduction to Linear Algebra<br />
|-<br />
|09/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Python + Numpy + Bias/Variance<br />
|-<br />
|10/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Simple Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|16/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Multi Variate Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|17/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL) <br />
|-<br />
|23/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Multivariate Linear Regression Laboratory<br />
|-<br />
|24/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Generalized Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|30/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Feature Selection and Model Assessment (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|31/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Ridge Regression and Lasso (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|06/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Generalized Linear Regression and Feature Selection Laboratory<br />
|-<br />
|07/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: KNN and Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|13/04/2022 || Wednesday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|14/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|20/04/2022 || Wednesday || 15:15-18:15 || 26.02 ||Matteo Matteucci || Lecture || Classification: Linear Discriminanr Analysis (Ch. 4 ISL)<br />
|-<br />
|21/04/2022 || Thursday || 12:15 - 14:15 || 26.01 || Matteo Matteucci || Lecture || Evaluation methods for classification<br />
|-<br />
|27/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Logistic Regression and LDA Laboratory<br />
|-<br />
|28/04/2022 || Thursday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|04/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || The Perceptron (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|06/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL) <br />
|-<br />
|11/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Unsupervised Learning and Clustering (Ch. 10 ISL)<br />
|-<br />
|12/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Clustering (Ch. 10 ISL)<br />
|-<br />
|18/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || SVM and Classifiers Evaluation Laboratory<br />
|-<br />
|19/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|25/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Clustering Laboratory<br />
|-<br />
|26/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|01/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Clustering Evaluation<br />
|-<br />
|02/06/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|08/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Principal Component Analysis (Ch. 10 ISL)<br />
|}<br />
<br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|24/02/2021 || Wednesday || 15:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
|-<br />
|25/02/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] (Ch. 1 ISL)<br />
|-<br />
|03/03/2021 || Wednesday || 14:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off] (Ch. 2 ISL)<br />
|-<br />
|04/03/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
|-<br />
|10/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|11/03/2021 || Thursday || --- || --- || --- || ---|| --- No lecture ---<br />
|-<br />
|17/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
|-<br />
|18/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|24/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
|-<br />
|25/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|31/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|01/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|07/04/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
|-<br />
|08/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|14/04/2021 || Wednesday || '''15:15-18:15''' || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|15/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis] (Ch. 4 ISL)<br />
|-<br />
|22/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|23/04/2021 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|28/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|29/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
|-<br />
|05/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
|-<br />
|06/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|12/05/2021 || Wednesday || 14:15-18:15 || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|13/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering] (Ch. 10 ISL)<br />
|-<br />
|19/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
|-<br />
|20/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering] (Ch. 10 ISL)<br />
|-<br />
|26/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
|-<br />
|27/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering] (Ch. 10 ISL)<br />
|-<br />
|02/06/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|03/06/2021 || Thursday || 08:15-11:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|04/06/2021 || Friday || 14:15-17:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|11/03/2020 || Wednesday || 14:15 - 18:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3565a411-bed7-4b20-9dd6-00ee8b9ddd54 Course Introduction], [https://web.microsoftstream.com/video/4a702565-386d-4bed-a0c1-9d1daa015703 Introduction to Machine Learning], and [https://web.microsoftstream.com/video/cef9a912-ee47-4254-8f26-318a6a014424 Statistical Machine Learning] (Ch. 1 ISL)<br />
|-<br />
|12/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/389145d3-c3e5-48c2-bf82-d7877bf14b8c Statistical Decision Theory and Bias-Variance trade off] (Ch. 2 ISL)<br />
|-<br />
|18/03/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/bb2155d6-a6f2-4f82-af48-3ceb22951c4b Python + Numpy + Bias/Variance] Laboratory<br />
|-<br />
|19/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b0359dad-971c-412d-8508-fde45e1dc3fe Statistical Decision Theory and Bias-Variance trade off (continued)] (Ch. 2 ISL)<br />
|-<br />
|25/03/2017 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f88827c9-0994-4d3f-80bf-1c9b6637ba18 Simple Linear Regression and Multivariate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|26/03/2017 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/deb2b3f5-d90d-47b8-b309-1ab88979f805 Multivariate Linear Regression (continued)] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|01/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/da0e35db-6995-412a-99ad-f409f0a6752d Multivariae Linear Regression (Part 1)] [https://web.microsoftstream.com/video/8defdff7-ae83-4753-a353-3d39194e63ac (Part 2)] Laboratory<br />
|-<br />
|02/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/c81f59c8-7023-4206-a771-8be062b7cb21 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|08/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/0255cfa0-98de-4465-a8bf-07c93e0974ee Issues with Linear Regression and Generalized Linear Regression] and [https://web.microsoftstream.com/video/e3392148-f1ee-426d-a271-3d8fcf11008a Feature Selection] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|09/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/03656a6b-46c7-483e-9263-0036144adb00 Feature Selection (continued)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|15/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/58093db6-f365-4184-8ce0-c12c03a1589f Generalized Linear Regression and Feature Selection (Part1)] [https://web.microsoftstream.com/video/52b0d7f5-a725-4406-aab3-3be5145d950f (Part 2)] Laboratory<br />
|-<br />
|16/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1565c508-4448-4678-a9e4-4ff411684227 Feature Selection (LASSO)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|22/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d04083a9-8961-4448-bcf2-0576d9dccf4c Classification by KNN (Part 1)] and [https://web.microsoftstream.com/video/c56ef675-486a-425c-819d-404868e07906 Logistic Regression (Part 2)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|23/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3a5f66b1-80d2-4ee5-ba14-7757ae662c97 Classification by Logistic Regression (continued)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|29/04/2020 || Wednesday || 14:15 - 17:15 || --- || --- || --- || --- No Lecture (Laurea) ---<br />
|-<br />
|30/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/a171bc2a-35e7-42c7-bdd0-d295ecfd7e26 Classification by Linear Discriminant Analysis] (Ch. 4 ISL)<br />
|-<br />
|06/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/cef18863-e3fd-481e-bcad-a18455796fd7 Classification via Logistic Regression, and LDA Laboratory (Part 1)] and [https://web.microsoftstream.com/video/670b7f72-5b6b-4168-9f1c-211a9ad25f48 (Part 2)]<br />
|-<br />
|07/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b2ed8ca0-c0c0-4c1a-836d-b2ffee20d85e Evaluation Methods for Classification]<br />
|-<br />
|13/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/2b881d7d-d11e-4432-8873-973bc36eeb61 Perceptron Learning] and [https://web.microsoftstream.com/video/00564932-919a-49a1-9fa5-eb7706640781 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|14/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b72fa8de-f98d-43cf-9609-5833625a4b5c Support Vector Machines and Kernel Trick] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|20/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/fab1f62e-cea0-4cc9-9366-0ccd6bcd161b Classification (SVM and classifiers evaluation) Laboratory (Part 1)] and [https://web.microsoftstream.com/video/130b806d-5390-4321-9d05-f63e079f30a1 (Part 2)]<br />
|-<br />
|21/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1125b85e-f4a1-49d1-991f-333fff893a1e Introduction to Unsupervised Learning] (Ch. 10 ISL)<br />
|-<br />
|27/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d8d0efb5-adfb-4376-afe3-26afb7ffd664 Clustering: Hierachical, k-means, and DBSCAN (Part 1)] and [https://web.microsoftstream.com/video/b7307896-bff7-4fd0-973f-d37fd7f91e13 (Part 2)] (Ch. 10 ISL)<br />
|-<br />
|28/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3f2975c2-1143-4870-8aed-a1a06382be14 Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|03/06/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/0fa04b48-f8c3-488b-bfab-92547d3a9c38 Clustering Laboratory (Part 1)] and [https://web.microsoftstream.com/video/24a40515-afdd-4cca-9b62-19e544c7e12e (Part 2)]<br />
|-<br />
|04/06/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f58132ba-afd3-47ce-89c8-ba16782d8f37 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
|-<br />
|27/11/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Classification by Linear Discriminant Analysis (Ch. 4 ISL)<br />
|-<br />
|03/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Exercises on Classification by Linear Discriminant Analysis<br />
|-<br />
|04/12/2017 || Tuesday || --- || --- || --- || No Lecture <br />
|-<br />
|10/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Clustering: Intro, k-means and the alike, GMM, and hierachical<br />
|-<br />
|11/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Davide Eynard || Clustering: Density-based, Spectral + Evaluation<br />
|-<br />
|14/12/2017 || Friday || 10:15 - 13:15 || TBD || Matteo Matteucci || Classification: from generative to discriminative approaches (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|17/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|18/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|}<br />
--><br />
Chapters are intended as complete except for<br />
* Ch.4 ESL: Section 4.5<br />
* Ch.12 ESL: Sections 12.1, 12.2, 12.3<br />
* Ch.9 ISL: Sections 9.1, 9.2, 9.3<br />
<br />
===Course Evaluation===<br />
<br />
The course evaluation is composed by two parts:<br />
<br />
* HW: Homework with exercises covering the whole program (up to 6 points)<br />
* OR: An oral discussion covering the whole program (up to 26 points)<br />
<br />
the final score will be the sum of HW (not compulsory) and OR scores. You will get the oral grade as a mark in the scale of 30 up to 32/30 which you have to multiply by 0.8125 and then you add to it the score of the project. For your convenience here it is [[Media:ML2021-Conversion.pdf|a conversion table]] with the final mark in case you do not turn in the project or you get the whole 6 marks in the project.<br />
<br />
====Homework #1 2021/2022====<br />
<br />
The first project asks you to develop a regression model on the [[Media:ML-2122-HW1.zip | Forest Fires Data Set]]. The goal of the model is to predict, given a set of features the burned area of forest fires. The project should focus on investigating the part of features selection for the regression task to understand the relationships between the different variables involved fully. <br />
An accurate and helpful description of the dataset is included in the forestfire.names file.<br />
<br />
The project should consist of an executable python notebook, sufficiently commented. Most of the cells should be adequately followed or preceded by an explanation of what you are doing, why, what the output is, how you interpret it, and so on.<br />
<br />
You can submit your notebook via email at stefano.samele@polimi.it. The deadline is 11/05/22 at midday CET.<br />
The notebook should already display all the cells' outputs. A copy and a re-execution will be performed to evaluate your work: we need to be sure your code is actually executable and displays consistent results.<br />
<br />
You can attend the project in a group of maximum two. Scores (0-1-2, with half points) will be assigned based on the ability to organize the investigation and the code, adopt relevant methodologies presented during laboratories, understand and interpret results, and comply with project requests.<br />
<br />
====Homework #2 2021/2022====<br />
<br />
The second project asks you to develop a classification model for the <s>Autism Screening Adult Data Set</s> [[Media:ML-2122-HW2.2.zip | Breast Cancer Wisconsin Dataset]]. The task consists in predicting whether the patient is affected by an Autistic Spectrum Disorder, based on a set of specific features. The goal of the project is to build, given the set of models explained during the laboratories, the best fit for the task. <br />
<br />
You can submit your notebook via email at stefano.samele@polimi.it. The deadline is <s>01/06/22</s> 03/06/22 at midday CET.<br />
Please rename your file as name_surname_stuedentidnumber.<br />
<br />
For any other information please refer to the previous project announcement.<br />
<br />
====Homework #3 2021/2022====<br />
<br />
TDB<br />
<br />
==Teaching Material (the textbook)== <br />
<br />
Lectures will be based on material taken from the book. <br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani<br />
<br />
If you are interested in a more deep treatment of the topics you can refer to the following book from the same authors<br />
<br />
* [http://www-stat.stanford.edu/~tibs/ElemStatLearn/index.html The Elements of Statistical Learning: Data Mining, Inference, and Prediction.] by Trevor Hastie, Robert Tibshirani, and Jerome Friedman.<br />
<br />
Some additional material that could be used to prepare the oral examination will be provided together with the past homeworks.<br />
<br />
===Teacher Slides ===<br />
<br />
In the following you can find the lecture slides used by the teacher and the teaching assistants during classes.<br />
<br />
* [[Media:ML-2020-A0-LinearAlgebraBasics.pdf | [2020/2021] Linear Algebra Basics]]: Basic elements of linear algebra, e.g., vectors, matrices, basis, span, etc.<br />
* [[Media:ML-2122-00-Intro.pdf | [2021/2022] Course introduction]]: introductory slides of the course with useful information about the grading, and the course logistics. Some examples from supervised and unsupervised learning. Regression, classification, clustering terminology and examples.<br />
* [[Media:ML-2122-01-StatisticalLearning.pdf | [2021/2022] Statistical Learning Introduction]]: Statistical Learning definition, rationale, and trade-offs (e.g., prediction vs. inference, parametric vs non parametric models, flexibility vs. interpretability, etc.)<br />
* [[Media:ML-2122-02-LinearRegression.pdf | [2021/2022] Linear Regression]]: Simple Linear Regression and Multiple Linear Regression. Generalized Linear models. Cross-validation techniques. Feature selection. Ridge Regression and Lasso.<br />
* [[Media:ML-2021-03-LinearClassification.pdf | [2020/2021] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods. Discriminative vs. generative methods. Support Vector Machines. <br />
* [[Media:ML-2021-04-Clustering.pdf | [2020/2021] Clustering]]: Introduction to unsupervised learning and clustering, hierarchical clustering, k-means, DBSCNA, indexes for clustering evaluation. <br />
* [[Media:ML-2021-05-PrincipalComponentAnalysis.pdf | [2020/2021] Principal Component Analysis]]: Principal Component Analysis, Geometric Interpretation, Singular Values Decomposition.<br />
<br />
===Laboratories===<br />
<br />
We will use Python (with Jupyter notebooks) throughout the course, thus we kindly ask you to install the "Anaconda" package to be ready for the labs. Here are the [https://www.anaconda.com/products/individual download links]. You can find a simple Jupyter notebook [[Media:ML2021-test.zip | HERE]] to test if the installation succeeded.<br />
<br />
To open the notebook<br />
* launch the "Anaconda Navigator" app<br />
* launch the "jupyter Notebook" app within the navigator, it should automatically open a webpage (it may take a while)<br />
* on the webpage, navigate on the folder where you downloaded the "lab01.00-TestEnvironment.ipynb" file, and press on the file to open it<br />
* then follow the instruction within the notebook<br />
<br />
If you didn't install anaconda but just jupyter, or if you can't find Anaconda Navigator <br />
* open a shell ("Anaconda Prompt" if you are using Windows)<br />
* move on to the folder where you downloaded "lab01.00-TestEnvironment.ipynb"<br />
* run the "jupyter notebook" command, it should automatically open a webpage<br />
* then on the webpage press on the "lab01.00-TestEnvironment.ipynb" file and follow the instructions within the notebook<br />
<br />
The following are the notebook used in the labs:<br />
*[[Media:ML2122-lab01.zip | [2021/2022] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session including the testing environment ([[Media:ML2122-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab02.zip | [2021/2022] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2122-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab03.zip | [2021/2022] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2122-lab03_solutions_part1.zip |complete version]])<br />
*[[Media:ML2122-lab04.zip | [2021/2022] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2122-lab04_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab05.zip | [2021/2022] Material for the fifth lab session]]: some useful jupiter notebooks which will be used during the fifth lab session ([[Media:ML2122-lab05_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab06.zip | [2021/2022] Material for the sixth lab session]]: some useful jupiter notebooks which will be used during the sixth lab session ([[Media:ML2122-lab06_solutions.zip |complete version]])<br />
<!--<br />
*[[Media:ML2021-lab01.zip | [2020/2021] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session ([[Media:ML2021-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab02.zip | [2020/2021] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2021-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab03.zip | [2020/2021] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2021-lab03_solutions_tmp.zip |complete version]])<br />
*[[Media:ML2021-lab04.zip | [2020/2021] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab04_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab05.zip | [2020/2021] Material for the fifth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab05_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab06.zip | [2020/2021] Material for the sixth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab06_solutions.zip |complete version]])<br />
--><br />
<!--<br />
* [[Media:ML-2016-03-AssessingModelAccuracy.pdf | [2016] Statistical Learning and Model Assessment]]: Model Assessment for Regression and Classification, Bias-Variance trade-off, Model complexity and overfitting, K-Nearest Neighbors Classifier vs. Bayes Classifier.<br />
* [[Media:ML-2016-05-LinearClassification.pdf | [2016] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods.<br />
* [[Media:ML-2016-06-SupportVectorMachines.pdf | [2016] Support Vector Machines]]: Discriminative vs. generative methids. Hyperplanes learning and Perceptron. Maximum Margin Classifiers. The Kernel trick and Support Vector Machines.<br />
For exercises and lab material please refer to [http://davide.eynard.it/pattern-analysis-and-machine-intelligence-2015-2016/ Davide Eynard website].<br />
--><br />
<br />
===Additional Resources===<br />
Papers and links useful to integrate the textbook<br />
<br />
* [http://www.ekof.bg.ac.rs/wp-content/uploads/2016/09/Ponavljanje-matematike-Wayne-Winston-Operations-Research-Applications-and-Algorithms-4-edition.pdf Basic Linear Algebra]: "Basic Linear Algebra" chapter from Wayne Winston book "Operations Research Applications and Algorithms (4th ed.)"<br />
* [http://scott.fortmann-roe.com/docs/BiasVariance.html Bias vs. Variance]: "Understanding the Bias-Variance Tradeoff" essay by Scott Fortmann-Roe<br />
* [http://www.onmyphd.com/?p=kkt.karush.kuhn.tucker Karush Kuhn Tucker Conditions]: a short note on their meaning with references to relevant wikipedia pages<br />
* [http://students.brown.edu/seeing-theory/ Seeing Theory]: a website where the basic concepts of probability and statistics are explained in a visual way.<br />
<br />
Python examples to better practice with numpy library<br />
* [https://github.com/Kyubyong/numpy_exercises Some numpy exercises], we did roughly 1, 2, 4, 6, 9, 10, 13<br />
* [https://github.com/rougier/numpy-100 Othen numpy exercises] from simple to complex<br />
* [https://www.w3resource.com/python-exercises/numpy/index-array.php More numpy exercises] from simple to complex<br />
<br />
===Year 2020/2021 Recordings (use at your own risk)===<br />
<br />
As I registered these due to pandemics, I am making them available. They DO NOT REPLACE THIS YEAR classroom lectures which are to be considered as the official material of this year, but they might be useful to double-check your notes.<br />
<br />
* 24/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
* 25/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] <br />
* 03/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off]<br />
* 04/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
* 10/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression]<br />
* 18/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression]<br />
* 25/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression]<br />
* 31/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment]<br />
* 01/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso]<br />
* 08/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression]<br />
* 14/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression]<br />
* 15/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis]<br />
* 29/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
* 06/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] <br />
* 12/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] <br />
* 13/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering]<br />
* 20/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering]<br />
* 27/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering]<br />
* 03/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation]<br />
* 04/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] <br />
<br />
Also, labs are available, however, the teaching assistant this year has changed.<br />
<br />
* 17/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
* 24/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
* 07/04/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
* 05/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
* 19/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
* 26/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
<br />
<!--<br />
===Past Exams and Sample Questions===<br />
For some samples of exams you can check the last year PAMI ones<br />
<br />
* [[Media:2016_02_03_PAMI.pdf |03/02/2016 PAMI Exam]]<br />
* [[Media:2016_02_19_PAMI.pdf |19/02/2016 PAMI Exam]]<br />
* [[Media:2016_07_06_PAMI.pdf |06/07/2016 PAMI Exam]]<br />
* [[Media:2016_09_09_PAMI.pdf |09/09/2016 PAMI Exam]]<br />
* [[Media:2016_09_28_PAMI.pdf |28/09/2016 PAMI Exam]]<br />
--><br />
===Online Resources===<br />
<br />
The following are links to online sources which might be useful to complement the material above<br />
* [https://towardsdatascience.com/linear-algebra-survival-kit-for-machine-learning-94901a62465e An Introduction to Linear Algebra] with numpy examples. It provides the very fundamental definitions, does not cover eigenvalues and eigenvectors.<br />
* [https://www.r-bloggers.com/in-depth-introduction-to-machine-learning-in-15-hours-of-expert-videos/ Statistical Learning MOOC] covering the entire ISL book offered by Trevor Hastie and Rob Tibshirani. Start anytime in self-paced mode.<br />
* [http://math.arizona.edu/~hzhang/math574m.html MATH 574M] University of Arizona Course on ''Statistical Machine Learning and Data Mining''; here you can find slides covering part of the course topics (the reference book for this course is again ''The Elements of Statistical Learning'')<br />
<br />
<!--<br />
== 2013-2014 Homework ==<br />
<br />
The 2013 Homework (alike the 2012 one) is organized as an octave series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
=== Part 1: Linear Classification Methods ===<br />
<br />
* [[Media:homework_pami_classification_2013_2014.pdf | Homework 2013-2014 on Classification]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 17/11 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
=== Part 2: Regression ===<br />
* [[Media:homework_pami_regression_2013_2014.pdf | Homework 2013-2014 Regression]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to malago@di.unimi.it (cc to matteo.matteucci@polimi.it) is Friday 20/12 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:diabete.mat | diabete.mat]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
For any question or doubt please sen us an email as soon as possible.<br />
<br />
'''Note 1:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
<strike>'''Note 2:''' rename the file Diabete.data into diabete.mat ... still fighting with the CSM :-)</strike><br />
<br />
'''Note 3:''' the code has been tested with octave under linux, we suggest to use it not to spend too much time with installing it under windows or using matlab. If you do not have linux installed, try using a live CD as the ubuntu 13.04 live distro ;-)<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at this post<br />
<br />
* [http://davide.eynard.it/2013/12/30/octave-clustering-demo-part-6-more-evaluation/ Homework 2013-2014 on clustering evaluation]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is the end of the course. You have to '''send it to davide.eynard_at_gmail.com Friday 24/01 23:59'''.<br />
<br />
'''Note 1:''' for any doubt or question send an email, as soon as possible, to Davide Eynard so to have a prompt reply and not get stuck during homework execution.<br />
<br />
'''Note 2:''' you have to turn in only the solution of "Ocatave clustering demo part 6", while the other parts can be used as reference to improve your understanding in basic clustering algorithms.<br />
<br />
=== Part 2: Classification ===<br />
<br />
* [[Media:homework_pami_classification_2013.pdf | Homework 2013 Classification]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 23/06 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
<br />
<br />
'''Errata Corrige''': there were a few bugs in the homework text. I have updated the pdf and they were:<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the Fisher projection it is more correct to use only the training data to learn the projection and then we can train and test on the corresponding subsets<br />
<br />
a = FisherProjection(X(training,:),Y(training,:));<br />
reducedX = X*a(:,1);<br />
[mu_0, mu_1, sigma, p_0, p_1] = linearDiscriminantAnalysis_train(reducedX(training), Y(training))<br />
<br />
I forgot to filter for just the training samples when performing Quadratic Discriminant Analysis<br />
<br />
quadX = expandToQuadraticSpace(X);<br />
%check this out!<br />
size(quadX)<br />
beta = linearRegression_train(quadX(training), Y(training));<br />
<br />
And in general you should always train on the training data and test on the testing data ;-).<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at these posts<br />
<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-4-k-medoids/ Homework 2013 on k-medoids]<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-5-hierarchical-clustering/ Homework 2013 on hierarchical clustering]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is '''before the you take the exam''' sending it to davide.eynard_at_gmail.com.<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3:] follow this tutorial and answer the questions from all 5 sub-tutorials.<br />
<br />
== 2012 Homework ==<br />
<br />
The Homework of 2012 organized like an octave/matlab series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
* [[Media:PAMI_homework_2012_1.pdf | Homework 2012 part 1]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to matteucci@elet.polimi.it and malago@elet.polimi.it is Tuesday 5/6 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
'''Note:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
* [[Media:PAMI_homework_2012_2.pdf | Homework 2012 part 2]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade; the deadline to submit the solution by email to matteucci@elet.polimi.it is the day before the exam you decide to attend''' (e.g., if you decide to take the exam on the 26/6 then you need to turn it in by 25/6).<br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Errata Corrige''': there were a few bugs a bug in the homework text. I have updated the pdf and they were:<br />
In the code for loading the data I forgot to remove the first column which you do not need<br />
data = dlmread('SAheart.data',',',1,1);<br />
X = data(:,1:9);<br />
Y = data(:,10);<br />
<br />
In the StratifiedSampling function the sorted verctors should be assigned<br />
% just an ahestetic sorting<br />
testing = sort(testing);<br />
training = sort(training);<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the expansion to quadratic space the starting index for the inner loop should i and not 1. Moreover in some cases it might be possible to have columns which are duplicated (e.g., with boolean attribute); in this case you should not need the robust version of linear regression.<br />
function extendedX = expandToQuadraticSpace(X)<br />
% adds new columns to extendedX; keeps X for other calculations<br />
extendedX = X;<br />
for i=1:size(X, 2)<br />
for j=i:size(X, 2)<br />
newColumn = X(:, i) .* X(:, j);<br />
extendedX = [extendedX newColumn];<br />
end<br />
end<br />
% remove duplicated columns<br />
duplicates = [];<br />
for i=1:size(extendedX, 2)<br />
for j=i+1:size(extendedX, 2)<br />
if(sum(extendedX(:,i)==extendedX(:,j)) == size(X,1))<br />
duplicates = [duplicates j];<br />
end<br />
end<br />
end<br />
extendedX(:,duplicates) = [];<br />
end<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3]: the third part of the homework is '''optional''', so you are not required to complete it. However, if you want to give it a try and use it to understand the topics covered by Davide Eynard in his lectures you are welcome. As usual, the questions in this homework are very close to the ones you will find in classworks, so we suggest to have a look at hose anyway! '''In case you decide to turn it in and have it contribute with a 10% to the grade, the deadline to submit the solution by email to matteucci@elet.polimi.it and davide.eynard@polimi.it is the day before you decide to take the exam''' (e.g., if you decide to take the exam on the 10/7 then you need to turn it in by 9/7)<br />
<br />
'''Note:''' homeworks are meant to let you see (and practice) a little bit with the topics presented during the course. They are evaluated because you spent some time on those and thus you deserve some credit for that ;-)<br />
<br />
== 2011 Homework ==<br />
<br />
Here you can find the homework for the year 2011 and the material you need to complete it. Please read the F.A.Q. below and for any unsolved doubt contact the teachers of the course.<br />
<br />
* [[Media:PAMI_homework_2011_v02.pdf | Homework 2011 v02]] a minor change in the signature of the logistic regression function<br />
* [[Media:PAMI_homework_2011_v01.pdf | Homework 2011 v01]] text with questions and exercises<br />
* [[Media:dataset.txt | Dataset]] for the clustering exercise in csv format<br />
<br />
'''Frequently Asked Questions'''<br />
<br />
* '''''How do I take the square root of a matrix?''''': check the diagonalization approach from [http://en.wikipedia.org/wiki/Square_root_of_a_matrix].<br />
<br />
* '''''How do I compute the chi square statistics?'''': in the slide there is a cut and paste error since e_ij=R_it*C_tj as described here [http://en.wikipedia.org/wiki/Pearson's_chi-square_test]<br />
<br />
* '''''When it is due? In which format?''''': The homework is due on the 29/06 and should be delivered by email. Send us (all the course teachers) the .m files in a zip archive attached to this email and a link to the pdf with the written part (not to flood our mailboxes). <br />
<br />
* '''''Can we do that in groups? How many people per group?''''': Yes, you can work on the homework in groups, but no more than 3 people per group are allowed. Put the names of all homework authors in the pdf and in all the .m files. If you discuss something with other people, w.r.t. the people in your group, point it out in the pdf file as well.<br />
<br />
* '''''Can we ask questions about the exercises or the code?''''': Yes you should! First of all, there might be unclear things in the exercise descriptions and those should be clarified as soon as possible for all (this is why the homework is versioned). But you could ask for help as well, our goal is to have you all solving all the questions and get a high grade ... but we will not do the homework on you behalf ;-)<br />
<br />
* '''''How the optional questions are graded?''''': They compensate for possible errors in the other questions; we suggest to work on them anyway to be sure you get the maximum grading.<br />
<br />
* '''''How the homework will be graded?''''': we are interested in understanding if you understood or not; thus we are not interested in the result, but we want to check how you get to the result. So please: 1) clarify all the assumptions and all the steps in your exercises 2) comment as much as possible your .m files!<br />
<br />
--></div>Matteohttps://chrome.deib.polimi.it/index.php?title=Machine_Learning_Bio&diff=3845Machine Learning Bio2022-05-21T15:22:49Z<p>Matteo: /* Homework #2 2021/2022 */</p>
<hr />
<div>__FORCETOC__<br />
<br />
The following are last-minute news you should be aware of ;-)<br />
* 21/05/2022: The dataset for the second homework is changed!!!<br />
* 19/05/2022: The second homework is out!!!<br />
* 04/05/2022: Changed lecture schedule<br />
* 02/05/2022: Changed deadline first homework -> 11/05/2022 at noon<br />
* 22/04/2022: The first homework is out!!!<br />
* 08/03/2022: Added material for the first lab<br />
* 06/03/2022: Slides from first lectures and last year's recordings updated <br />
* 23/02/2022: Lectures start today!<br />
<!--<br />
* 11/09/2021: Grade of the [[Media:ML2021-Grades_210911.pdf|Summer session + homeworks]] <br />
* 09/07/2021: Grade of the [[Media:ML2021-Grades_210624.pdf|24/06/2021 oral exams]] <br />
* 09/07/2021: Updated Homework + Oral [[Media:ML2021-Conversion.pdf|conversion table]]<br />
* 03/07/2021: Updated Homework available [[Media:ML2021-homework-new.zip|here!!!]]<br />
* 08/06/2021: Updated all videos and all slides from the course.<br />
* 02/06/2021: You can fin the 2020/2021 homework [[Media:ML2021-homework.zip|here!!!]]<br />
* 26/05/2021: The link to the form to request an instance of remote examination for June and July is [https://forms.office.com/r/FUrVt8eZNx here]!<br />
* 09/04/2021: From next week lectures will be back to presence (plus webex streaming)<br />
* 22/03/2021: Added completed material from the last lab plus some exercises ... <br />
* 17/03/2021: Added the material for the lab of today ... <br />
* 10/03/2021: 11/03/2021 lecture has been canceled<br />
* 06/03/2021: website update with linear algebra slides and (working) links to all lectures<br />
* 05/03/2021: Since today we are moved fully online so lectures will happen in my webex room (same holds for labs)<br />
* 24/02/2021: Lectures start today<br />
--><br />
<!--<br />
* 08/08/2020: Grading for all projects and first two calls [[Media:Grades_20200723.pdf|are here!!]] <br />
* 22/06/2020: Grading mechanism explained, check [[Media:ML2020_grading_system.pdf|here a handy recap]] <br />
* 14/06/2020: [[Media:ML2020_homework.zip |Here it come the 2020 homework!!!]]<br />
* 03/06/2020: All slides updated<br />
* 02/05/2020: Updated course schedule and added videos to the previous lectures<br />
* 04/04/2020: Updated schedule and added videos of previous lectures<br />
* 31/03/2020: Updated schedule and added material on linear algebra<br />
* 19/03/2020: Added lab material, both with empty notebooks and final result<br />
* 11/03/2020: Added today's lecture videos and planned next week schedule (To Be Completed)<br />
* 11/03/2020: The course starts today!<br />
* 03/03/2020: The course is going to start soon ...<br />
--><br />
<br />
==Course Aim & Organization==<br />
<br />
The objective of the Machine Learning course is to give an in-depth presentation of the techniques most used for pattern recognition, knowledge discovery, and data analysis/modeling. These techniques are presented both from a theoretical (i.e., statistics and information theory) perspective and a practical one (i.e., coding examples) through the descriptions of algorithms and their implementations in a general-purpose programming language (i.e., python).<br />
<br />
The course presents the classical supervised and unsupervised learning paradigms described and discussed presenting regression, classification, and clustering problems in Bioinformatics. The course is composed of a set of lectures on specific machine learning techniques (e.g., generalized linear regression, logistic regression, linear and quadratic discriminant analysis, support vector machines, k-nearest-neighborhood, clustering, etc.) preceded by the introduction of the Statistical Learning framework which acts as a common reference framework for the entire course.<br />
<br />
===Teachers===<br />
<br />
The course is composed of a blending of lectures and exercises by the course teacher and a teaching assistant.<br />
<br />
* [http://www.deib.polimi.it/ita/personale/dettagli/267262 Matteo Matteucci]: the course teacher <br />
* [https://www.deib.polimi.it/ita/personale/dettagli/1638984 Stefano Samele]: the teaching assistant <br />
<br />
===Course Program===<br />
<br />
The course mostly follows the following book which is also available for download in pdf<br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani<br />
<br />
The course lectures will present the theory and practice of the following:<br />
* Machine Learning and Pattern Classification: the general concepts of Machine Learning and Pattern Recognition are introduced within the framework of Statistical Decision Theory with reference to the bias-variance trade-off and the Bayes classifier;<br />
* Generalized Linear Regression: linear methods for regression will be presented and discussed introducing different techniques (e.g., Linear Regression, Ridge Regression, K-Nearest Neighbors Regression, Non-Linear Regression, etc.) and the most common methodologies for model validation and selection (e.g., AIC, BIC, cross-validation, stepwise feature selection, Lasso, etc.).<br />
* Linear and Non-Linear Classification: generative and discriminative techniques for classification will be described and discussed (e.g., Logistic Regression, Linear and Quadratic Discriminant Analysis, K-Nearest Neighbors, Perceptron Rule, and Support Vector Machines, etc.). Metrics for classifiers evaluation and comparison are presented in this part of the course (e.g., accuracy, precision, recall, ROC, AUC, F-measure, Matthew coefficient).<br />
* Unsupervised Learning: the most common approaches to unsupervised learning are described mostly focusing on clustering methods such as hierarchical clustering, k-means, k-medoids, Mixture of Gaussians, DBSCAN, etc<br />
<br />
These topics will be presented both from a theoretical perspective and a practical one via implementations in the general-purpose programming language python.<br />
<br />
===Detailed course schedule===<br />
<br />
A detailed schedule of the course can be found here; topics are just indicative while days and teachers are correct up to some last-minute change (I will notify you by email). Please note that not all days we have lectures!!<br />
<br />
Note: Lecture timetable interpretation<br />
* On Wednesday, in room 26.02, starts at 15:15 (cum tempore), ends at 18:15<br />
* On Thursday, in room 26.01, starts at 12:15 (cum tempore), ends at 14:15<br />
<br />
<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|23/02/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Machine Learning Intro<br />
|-<br />
|24/02/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Statistical Learning Theory (Ch. 1 ISL)<br />
|-<br />
|02/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Statistical Learning Theory - Bias/Variance Trade-off (Ch. 2 ISL)<br />
|-<br />
|03/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Introduction to Linear Algebra<br />
|-<br />
|09/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Python + Numpy + Bias/Variance<br />
|-<br />
|10/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Simple Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|16/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Multi Variate Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|17/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL) <br />
|-<br />
|23/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Multivariate Linear Regression Laboratory<br />
|-<br />
|24/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Generalized Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|30/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Feature Selection and Model Assessment (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|31/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Ridge Regression and Lasso (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|06/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Generalized Linear Regression and Feature Selection Laboratory<br />
|-<br />
|07/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: KNN and Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|13/04/2022 || Wednesday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|14/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|20/04/2022 || Wednesday || 15:15-18:15 || 26.02 ||Matteo Matteucci || Lecture || Classification: Linear Discriminanr Analysis (Ch. 4 ISL)<br />
|-<br />
|21/04/2022 || Thursday || 12:15 - 14:15 || 26.01 || Matteo Matteucci || Lecture || Evaluation methods for classification<br />
|-<br />
|27/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Logistic Regression and LDA Laboratory<br />
|-<br />
|28/04/2022 || Thursday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|04/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || The Perceptron (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|06/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL) <br />
|-<br />
|11/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Unsupervised Learning and Clustering (Ch. 10 ISL)<br />
|-<br />
|12/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Clustering (Ch. 10 ISL)<br />
|-<br />
|18/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || SVM and Classifiers Evaluation Laboratory<br />
|-<br />
|19/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|25/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Clustering Laboratory<br />
|-<br />
|26/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|01/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Clustering Evaluation<br />
|-<br />
|02/06/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|08/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Principal Component Analysis (Ch. 10 ISL)<br />
|}<br />
<br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|24/02/2021 || Wednesday || 15:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
|-<br />
|25/02/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] (Ch. 1 ISL)<br />
|-<br />
|03/03/2021 || Wednesday || 14:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off] (Ch. 2 ISL)<br />
|-<br />
|04/03/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
|-<br />
|10/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|11/03/2021 || Thursday || --- || --- || --- || ---|| --- No lecture ---<br />
|-<br />
|17/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
|-<br />
|18/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|24/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
|-<br />
|25/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|31/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|01/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|07/04/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
|-<br />
|08/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|14/04/2021 || Wednesday || '''15:15-18:15''' || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|15/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis] (Ch. 4 ISL)<br />
|-<br />
|22/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|23/04/2021 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|28/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|29/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
|-<br />
|05/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
|-<br />
|06/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|12/05/2021 || Wednesday || 14:15-18:15 || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|13/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering] (Ch. 10 ISL)<br />
|-<br />
|19/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
|-<br />
|20/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering] (Ch. 10 ISL)<br />
|-<br />
|26/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
|-<br />
|27/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering] (Ch. 10 ISL)<br />
|-<br />
|02/06/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|03/06/2021 || Thursday || 08:15-11:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|04/06/2021 || Friday || 14:15-17:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|11/03/2020 || Wednesday || 14:15 - 18:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3565a411-bed7-4b20-9dd6-00ee8b9ddd54 Course Introduction], [https://web.microsoftstream.com/video/4a702565-386d-4bed-a0c1-9d1daa015703 Introduction to Machine Learning], and [https://web.microsoftstream.com/video/cef9a912-ee47-4254-8f26-318a6a014424 Statistical Machine Learning] (Ch. 1 ISL)<br />
|-<br />
|12/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/389145d3-c3e5-48c2-bf82-d7877bf14b8c Statistical Decision Theory and Bias-Variance trade off] (Ch. 2 ISL)<br />
|-<br />
|18/03/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/bb2155d6-a6f2-4f82-af48-3ceb22951c4b Python + Numpy + Bias/Variance] Laboratory<br />
|-<br />
|19/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b0359dad-971c-412d-8508-fde45e1dc3fe Statistical Decision Theory and Bias-Variance trade off (continued)] (Ch. 2 ISL)<br />
|-<br />
|25/03/2017 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f88827c9-0994-4d3f-80bf-1c9b6637ba18 Simple Linear Regression and Multivariate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|26/03/2017 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/deb2b3f5-d90d-47b8-b309-1ab88979f805 Multivariate Linear Regression (continued)] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|01/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/da0e35db-6995-412a-99ad-f409f0a6752d Multivariae Linear Regression (Part 1)] [https://web.microsoftstream.com/video/8defdff7-ae83-4753-a353-3d39194e63ac (Part 2)] Laboratory<br />
|-<br />
|02/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/c81f59c8-7023-4206-a771-8be062b7cb21 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|08/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/0255cfa0-98de-4465-a8bf-07c93e0974ee Issues with Linear Regression and Generalized Linear Regression] and [https://web.microsoftstream.com/video/e3392148-f1ee-426d-a271-3d8fcf11008a Feature Selection] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|09/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/03656a6b-46c7-483e-9263-0036144adb00 Feature Selection (continued)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|15/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/58093db6-f365-4184-8ce0-c12c03a1589f Generalized Linear Regression and Feature Selection (Part1)] [https://web.microsoftstream.com/video/52b0d7f5-a725-4406-aab3-3be5145d950f (Part 2)] Laboratory<br />
|-<br />
|16/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1565c508-4448-4678-a9e4-4ff411684227 Feature Selection (LASSO)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|22/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d04083a9-8961-4448-bcf2-0576d9dccf4c Classification by KNN (Part 1)] and [https://web.microsoftstream.com/video/c56ef675-486a-425c-819d-404868e07906 Logistic Regression (Part 2)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|23/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3a5f66b1-80d2-4ee5-ba14-7757ae662c97 Classification by Logistic Regression (continued)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|29/04/2020 || Wednesday || 14:15 - 17:15 || --- || --- || --- || --- No Lecture (Laurea) ---<br />
|-<br />
|30/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/a171bc2a-35e7-42c7-bdd0-d295ecfd7e26 Classification by Linear Discriminant Analysis] (Ch. 4 ISL)<br />
|-<br />
|06/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/cef18863-e3fd-481e-bcad-a18455796fd7 Classification via Logistic Regression, and LDA Laboratory (Part 1)] and [https://web.microsoftstream.com/video/670b7f72-5b6b-4168-9f1c-211a9ad25f48 (Part 2)]<br />
|-<br />
|07/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b2ed8ca0-c0c0-4c1a-836d-b2ffee20d85e Evaluation Methods for Classification]<br />
|-<br />
|13/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/2b881d7d-d11e-4432-8873-973bc36eeb61 Perceptron Learning] and [https://web.microsoftstream.com/video/00564932-919a-49a1-9fa5-eb7706640781 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|14/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b72fa8de-f98d-43cf-9609-5833625a4b5c Support Vector Machines and Kernel Trick] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|20/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/fab1f62e-cea0-4cc9-9366-0ccd6bcd161b Classification (SVM and classifiers evaluation) Laboratory (Part 1)] and [https://web.microsoftstream.com/video/130b806d-5390-4321-9d05-f63e079f30a1 (Part 2)]<br />
|-<br />
|21/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1125b85e-f4a1-49d1-991f-333fff893a1e Introduction to Unsupervised Learning] (Ch. 10 ISL)<br />
|-<br />
|27/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d8d0efb5-adfb-4376-afe3-26afb7ffd664 Clustering: Hierachical, k-means, and DBSCAN (Part 1)] and [https://web.microsoftstream.com/video/b7307896-bff7-4fd0-973f-d37fd7f91e13 (Part 2)] (Ch. 10 ISL)<br />
|-<br />
|28/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3f2975c2-1143-4870-8aed-a1a06382be14 Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|03/06/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/0fa04b48-f8c3-488b-bfab-92547d3a9c38 Clustering Laboratory (Part 1)] and [https://web.microsoftstream.com/video/24a40515-afdd-4cca-9b62-19e544c7e12e (Part 2)]<br />
|-<br />
|04/06/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f58132ba-afd3-47ce-89c8-ba16782d8f37 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
|-<br />
|27/11/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Classification by Linear Discriminant Analysis (Ch. 4 ISL)<br />
|-<br />
|03/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Exercises on Classification by Linear Discriminant Analysis<br />
|-<br />
|04/12/2017 || Tuesday || --- || --- || --- || No Lecture <br />
|-<br />
|10/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Clustering: Intro, k-means and the alike, GMM, and hierachical<br />
|-<br />
|11/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Davide Eynard || Clustering: Density-based, Spectral + Evaluation<br />
|-<br />
|14/12/2017 || Friday || 10:15 - 13:15 || TBD || Matteo Matteucci || Classification: from generative to discriminative approaches (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|17/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|18/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|}<br />
--><br />
Chapters are intended as complete except for<br />
* Ch.4 ESL: Section 4.5<br />
* Ch.12 ESL: Sections 12.1, 12.2, 12.3<br />
* Ch.9 ISL: Sections 9.1, 9.2, 9.3<br />
<br />
===Course Evaluation===<br />
<br />
The course evaluation is composed by two parts:<br />
<br />
* HW: Homework with exercises covering the whole program (up to 6 points)<br />
* OR: An oral discussion covering the whole program (up to 26 points)<br />
<br />
the final score will be the sum of HW (not compulsory) and OR scores. You will get the oral grade as a mark in the scale of 30 up to 32/30 which you have to multiply by 0.8125 and then you add to it the score of the project. For your convenience here it is [[Media:ML2021-Conversion.pdf|a conversion table]] with the final mark in case you do not turn in the project or you get the whole 6 marks in the project.<br />
<br />
====Homework #1 2021/2022====<br />
<br />
The first project asks you to develop a regression model on the [[Media:ML-2122-HW1.zip | Forest Fires Data Set]]. The goal of the model is to predict, given a set of features the burned area of forest fires. The project should focus on investigating the part of features selection for the regression task to understand the relationships between the different variables involved fully. <br />
An accurate and helpful description of the dataset is included in the forestfire.names file.<br />
<br />
The project should consist of an executable python notebook, sufficiently commented. Most of the cells should be adequately followed or preceded by an explanation of what you are doing, why, what the output is, how you interpret it, and so on.<br />
<br />
You can submit your notebook via email at stefano.samele@polimi.it. The deadline is 11/05/22 at midday CET.<br />
The notebook should already display all the cells' outputs. A copy and a re-execution will be performed to evaluate your work: we need to be sure your code is actually executable and displays consistent results.<br />
<br />
You can attend the project in a group of maximum two. Scores (0-1-2, with half points) will be assigned based on the ability to organize the investigation and the code, adopt relevant methodologies presented during laboratories, understand and interpret results, and comply with project requests.<br />
<br />
====Homework #2 2021/2022====<br />
<br />
The second project asks you to develop a classification model for the <s>Autism Screening Adult Data Set</s> [[Media:ML-2122-HW2.2.zip | Breast Cancer Wisconsin Dataset]]. The task consists in predicting whether the patient is affected by an Autistic Spectrum Disorder, based on a set of specific features. The goal of the project is to build, given the set of models explained during the laboratories, the best fit for the task. <br />
<br />
You can submit your notebook via email at stefano.samele@polimi.it. The deadline is <s>01/06/22</s> 03/06/22 at midday CET.<br />
Please rename your file as name_surname_stuedentidnumber.<br />
<br />
For any other information please refer to the previous project announcement.<br />
<br />
====Homework #3 2021/2022====<br />
<br />
TDB<br />
<br />
==Teaching Material (the textbook)== <br />
<br />
Lectures will be based on material taken from the book. <br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani<br />
<br />
If you are interested in a more deep treatment of the topics you can refer to the following book from the same authors<br />
<br />
* [http://www-stat.stanford.edu/~tibs/ElemStatLearn/index.html The Elements of Statistical Learning: Data Mining, Inference, and Prediction.] by Trevor Hastie, Robert Tibshirani, and Jerome Friedman.<br />
<br />
Some additional material that could be used to prepare the oral examination will be provided together with the past homeworks.<br />
<br />
===Teacher Slides ===<br />
<br />
In the following you can find the lecture slides used by the teacher and the teaching assistants during classes.<br />
<br />
* [[Media:ML-2020-A0-LinearAlgebraBasics.pdf | [2020/2021] Linear Algebra Basics]]: Basic elements of linear algebra, e.g., vectors, matrices, basis, span, etc.<br />
* [[Media:ML-2122-00-Intro.pdf | [2021/2022] Course introduction]]: introductory slides of the course with useful information about the grading, and the course logistics. Some examples from supervised and unsupervised learning. Regression, classification, clustering terminology and examples.<br />
* [[Media:ML-2122-01-StatisticalLearning.pdf | [2021/2022] Statistical Learning Introduction]]: Statistical Learning definition, rationale, and trade-offs (e.g., prediction vs. inference, parametric vs non parametric models, flexibility vs. interpretability, etc.)<br />
* [[Media:ML-2122-02-LinearRegression.pdf | [2021/2022] Linear Regression]]: Simple Linear Regression and Multiple Linear Regression. Generalized Linear models. Cross-validation techniques. Feature selection. Ridge Regression and Lasso.<br />
* [[Media:ML-2021-03-LinearClassification.pdf | [2020/2021] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods. Discriminative vs. generative methods. Support Vector Machines. <br />
* [[Media:ML-2021-04-Clustering.pdf | [2020/2021] Clustering]]: Introduction to unsupervised learning and clustering, hierarchical clustering, k-means, DBSCNA, indexes for clustering evaluation. <br />
* [[Media:ML-2021-05-PrincipalComponentAnalysis.pdf | [2020/2021] Principal Component Analysis]]: Principal Component Analysis, Geometric Interpretation, Singular Values Decomposition.<br />
<br />
===Laboratories===<br />
<br />
We will use Python (with Jupyter notebooks) throughout the course, thus we kindly ask you to install the "Anaconda" package to be ready for the labs. Here are the [https://www.anaconda.com/products/individual download links]. You can find a simple Jupyter notebook [[Media:ML2021-test.zip | HERE]] to test if the installation succeeded.<br />
<br />
To open the notebook<br />
* launch the "Anaconda Navigator" app<br />
* launch the "jupyter Notebook" app within the navigator, it should automatically open a webpage (it may take a while)<br />
* on the webpage, navigate on the folder where you downloaded the "lab01.00-TestEnvironment.ipynb" file, and press on the file to open it<br />
* then follow the instruction within the notebook<br />
<br />
If you didn't install anaconda but just jupyter, or if you can't find Anaconda Navigator <br />
* open a shell ("Anaconda Prompt" if you are using Windows)<br />
* move on to the folder where you downloaded "lab01.00-TestEnvironment.ipynb"<br />
* run the "jupyter notebook" command, it should automatically open a webpage<br />
* then on the webpage press on the "lab01.00-TestEnvironment.ipynb" file and follow the instructions within the notebook<br />
<br />
The following are the notebook used in the labs:<br />
*[[Media:ML2122-lab01.zip | [2021/2022] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session including the testing environment ([[Media:ML2122-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab02.zip | [2021/2022] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2122-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab03.zip | [2021/2022] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2122-lab03_solutions_part1.zip |complete version]])<br />
*[[Media:ML2122-lab04.zip | [2021/2022] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2122-lab04_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab05.zip | [2021/2022] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fifth lab session ([[Media:ML2122-lab05_solutions.zip |complete version]])<br />
<!--<br />
*[[Media:ML2021-lab01.zip | [2020/2021] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session ([[Media:ML2021-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab02.zip | [2020/2021] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2021-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab03.zip | [2020/2021] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2021-lab03_solutions_tmp.zip |complete version]])<br />
*[[Media:ML2021-lab04.zip | [2020/2021] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab04_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab05.zip | [2020/2021] Material for the fifth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab05_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab06.zip | [2020/2021] Material for the sixth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab06_solutions.zip |complete version]])<br />
--><br />
<!--<br />
* [[Media:ML-2016-03-AssessingModelAccuracy.pdf | [2016] Statistical Learning and Model Assessment]]: Model Assessment for Regression and Classification, Bias-Variance trade-off, Model complexity and overfitting, K-Nearest Neighbors Classifier vs. Bayes Classifier.<br />
* [[Media:ML-2016-05-LinearClassification.pdf | [2016] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods.<br />
* [[Media:ML-2016-06-SupportVectorMachines.pdf | [2016] Support Vector Machines]]: Discriminative vs. generative methids. Hyperplanes learning and Perceptron. Maximum Margin Classifiers. The Kernel trick and Support Vector Machines.<br />
For exercises and lab material please refer to [http://davide.eynard.it/pattern-analysis-and-machine-intelligence-2015-2016/ Davide Eynard website].<br />
--><br />
<br />
===Additional Resources===<br />
Papers and links useful to integrate the textbook<br />
<br />
* [http://www.ekof.bg.ac.rs/wp-content/uploads/2016/09/Ponavljanje-matematike-Wayne-Winston-Operations-Research-Applications-and-Algorithms-4-edition.pdf Basic Linear Algebra]: "Basic Linear Algebra" chapter from Wayne Winston book "Operations Research Applications and Algorithms (4th ed.)"<br />
* [http://scott.fortmann-roe.com/docs/BiasVariance.html Bias vs. Variance]: "Understanding the Bias-Variance Tradeoff" essay by Scott Fortmann-Roe<br />
* [http://www.onmyphd.com/?p=kkt.karush.kuhn.tucker Karush Kuhn Tucker Conditions]: a short note on their meaning with references to relevant wikipedia pages<br />
* [http://students.brown.edu/seeing-theory/ Seeing Theory]: a website where the basic concepts of probability and statistics are explained in a visual way.<br />
<br />
Python examples to better practice with numpy library<br />
* [https://github.com/Kyubyong/numpy_exercises Some numpy exercises], we did roughly 1, 2, 4, 6, 9, 10, 13<br />
* [https://github.com/rougier/numpy-100 Othen numpy exercises] from simple to complex<br />
* [https://www.w3resource.com/python-exercises/numpy/index-array.php More numpy exercises] from simple to complex<br />
<br />
===Year 2020/2021 Recordings (use at your own risk)===<br />
<br />
As I registered these due to pandemics, I am making them available. They DO NOT REPLACE THIS YEAR classroom lectures which are to be considered as the official material of this year, but they might be useful to double-check your notes.<br />
<br />
* 24/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
* 25/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] <br />
* 03/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off]<br />
* 04/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
* 10/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression]<br />
* 18/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression]<br />
* 25/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression]<br />
* 31/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment]<br />
* 01/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso]<br />
* 08/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression]<br />
* 14/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression]<br />
* 15/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis]<br />
* 29/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
* 06/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] <br />
* 12/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] <br />
* 13/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering]<br />
* 20/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering]<br />
* 27/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering]<br />
* 03/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation]<br />
* 04/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] <br />
<br />
Also, labs are available, however, the teaching assistant this year has changed.<br />
<br />
* 17/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
* 24/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
* 07/04/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
* 05/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
* 19/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
* 26/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
<br />
<!--<br />
===Past Exams and Sample Questions===<br />
For some samples of exams you can check the last year PAMI ones<br />
<br />
* [[Media:2016_02_03_PAMI.pdf |03/02/2016 PAMI Exam]]<br />
* [[Media:2016_02_19_PAMI.pdf |19/02/2016 PAMI Exam]]<br />
* [[Media:2016_07_06_PAMI.pdf |06/07/2016 PAMI Exam]]<br />
* [[Media:2016_09_09_PAMI.pdf |09/09/2016 PAMI Exam]]<br />
* [[Media:2016_09_28_PAMI.pdf |28/09/2016 PAMI Exam]]<br />
--><br />
===Online Resources===<br />
<br />
The following are links to online sources which might be useful to complement the material above<br />
* [https://towardsdatascience.com/linear-algebra-survival-kit-for-machine-learning-94901a62465e An Introduction to Linear Algebra] with numpy examples. It provides the very fundamental definitions, does not cover eigenvalues and eigenvectors.<br />
* [https://www.r-bloggers.com/in-depth-introduction-to-machine-learning-in-15-hours-of-expert-videos/ Statistical Learning MOOC] covering the entire ISL book offered by Trevor Hastie and Rob Tibshirani. Start anytime in self-paced mode.<br />
* [http://math.arizona.edu/~hzhang/math574m.html MATH 574M] University of Arizona Course on ''Statistical Machine Learning and Data Mining''; here you can find slides covering part of the course topics (the reference book for this course is again ''The Elements of Statistical Learning'')<br />
<br />
<!--<br />
== 2013-2014 Homework ==<br />
<br />
The 2013 Homework (alike the 2012 one) is organized as an octave series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
=== Part 1: Linear Classification Methods ===<br />
<br />
* [[Media:homework_pami_classification_2013_2014.pdf | Homework 2013-2014 on Classification]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 17/11 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
=== Part 2: Regression ===<br />
* [[Media:homework_pami_regression_2013_2014.pdf | Homework 2013-2014 Regression]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to malago@di.unimi.it (cc to matteo.matteucci@polimi.it) is Friday 20/12 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:diabete.mat | diabete.mat]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
For any question or doubt please sen us an email as soon as possible.<br />
<br />
'''Note 1:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
<strike>'''Note 2:''' rename the file Diabete.data into diabete.mat ... still fighting with the CSM :-)</strike><br />
<br />
'''Note 3:''' the code has been tested with octave under linux, we suggest to use it not to spend too much time with installing it under windows or using matlab. If you do not have linux installed, try using a live CD as the ubuntu 13.04 live distro ;-)<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at this post<br />
<br />
* [http://davide.eynard.it/2013/12/30/octave-clustering-demo-part-6-more-evaluation/ Homework 2013-2014 on clustering evaluation]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is the end of the course. You have to '''send it to davide.eynard_at_gmail.com Friday 24/01 23:59'''.<br />
<br />
'''Note 1:''' for any doubt or question send an email, as soon as possible, to Davide Eynard so to have a prompt reply and not get stuck during homework execution.<br />
<br />
'''Note 2:''' you have to turn in only the solution of "Ocatave clustering demo part 6", while the other parts can be used as reference to improve your understanding in basic clustering algorithms.<br />
<br />
=== Part 2: Classification ===<br />
<br />
* [[Media:homework_pami_classification_2013.pdf | Homework 2013 Classification]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 23/06 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
<br />
<br />
'''Errata Corrige''': there were a few bugs in the homework text. I have updated the pdf and they were:<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the Fisher projection it is more correct to use only the training data to learn the projection and then we can train and test on the corresponding subsets<br />
<br />
a = FisherProjection(X(training,:),Y(training,:));<br />
reducedX = X*a(:,1);<br />
[mu_0, mu_1, sigma, p_0, p_1] = linearDiscriminantAnalysis_train(reducedX(training), Y(training))<br />
<br />
I forgot to filter for just the training samples when performing Quadratic Discriminant Analysis<br />
<br />
quadX = expandToQuadraticSpace(X);<br />
%check this out!<br />
size(quadX)<br />
beta = linearRegression_train(quadX(training), Y(training));<br />
<br />
And in general you should always train on the training data and test on the testing data ;-).<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at these posts<br />
<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-4-k-medoids/ Homework 2013 on k-medoids]<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-5-hierarchical-clustering/ Homework 2013 on hierarchical clustering]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is '''before the you take the exam''' sending it to davide.eynard_at_gmail.com.<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3:] follow this tutorial and answer the questions from all 5 sub-tutorials.<br />
<br />
== 2012 Homework ==<br />
<br />
The Homework of 2012 organized like an octave/matlab series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
* [[Media:PAMI_homework_2012_1.pdf | Homework 2012 part 1]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to matteucci@elet.polimi.it and malago@elet.polimi.it is Tuesday 5/6 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
'''Note:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
* [[Media:PAMI_homework_2012_2.pdf | Homework 2012 part 2]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade; the deadline to submit the solution by email to matteucci@elet.polimi.it is the day before the exam you decide to attend''' (e.g., if you decide to take the exam on the 26/6 then you need to turn it in by 25/6).<br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Errata Corrige''': there were a few bugs a bug in the homework text. I have updated the pdf and they were:<br />
In the code for loading the data I forgot to remove the first column which you do not need<br />
data = dlmread('SAheart.data',',',1,1);<br />
X = data(:,1:9);<br />
Y = data(:,10);<br />
<br />
In the StratifiedSampling function the sorted verctors should be assigned<br />
% just an ahestetic sorting<br />
testing = sort(testing);<br />
training = sort(training);<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the expansion to quadratic space the starting index for the inner loop should i and not 1. Moreover in some cases it might be possible to have columns which are duplicated (e.g., with boolean attribute); in this case you should not need the robust version of linear regression.<br />
function extendedX = expandToQuadraticSpace(X)<br />
% adds new columns to extendedX; keeps X for other calculations<br />
extendedX = X;<br />
for i=1:size(X, 2)<br />
for j=i:size(X, 2)<br />
newColumn = X(:, i) .* X(:, j);<br />
extendedX = [extendedX newColumn];<br />
end<br />
end<br />
% remove duplicated columns<br />
duplicates = [];<br />
for i=1:size(extendedX, 2)<br />
for j=i+1:size(extendedX, 2)<br />
if(sum(extendedX(:,i)==extendedX(:,j)) == size(X,1))<br />
duplicates = [duplicates j];<br />
end<br />
end<br />
end<br />
extendedX(:,duplicates) = [];<br />
end<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3]: the third part of the homework is '''optional''', so you are not required to complete it. However, if you want to give it a try and use it to understand the topics covered by Davide Eynard in his lectures you are welcome. As usual, the questions in this homework are very close to the ones you will find in classworks, so we suggest to have a look at hose anyway! '''In case you decide to turn it in and have it contribute with a 10% to the grade, the deadline to submit the solution by email to matteucci@elet.polimi.it and davide.eynard@polimi.it is the day before you decide to take the exam''' (e.g., if you decide to take the exam on the 10/7 then you need to turn it in by 9/7)<br />
<br />
'''Note:''' homeworks are meant to let you see (and practice) a little bit with the topics presented during the course. They are evaluated because you spent some time on those and thus you deserve some credit for that ;-)<br />
<br />
== 2011 Homework ==<br />
<br />
Here you can find the homework for the year 2011 and the material you need to complete it. Please read the F.A.Q. below and for any unsolved doubt contact the teachers of the course.<br />
<br />
* [[Media:PAMI_homework_2011_v02.pdf | Homework 2011 v02]] a minor change in the signature of the logistic regression function<br />
* [[Media:PAMI_homework_2011_v01.pdf | Homework 2011 v01]] text with questions and exercises<br />
* [[Media:dataset.txt | Dataset]] for the clustering exercise in csv format<br />
<br />
'''Frequently Asked Questions'''<br />
<br />
* '''''How do I take the square root of a matrix?''''': check the diagonalization approach from [http://en.wikipedia.org/wiki/Square_root_of_a_matrix].<br />
<br />
* '''''How do I compute the chi square statistics?'''': in the slide there is a cut and paste error since e_ij=R_it*C_tj as described here [http://en.wikipedia.org/wiki/Pearson's_chi-square_test]<br />
<br />
* '''''When it is due? In which format?''''': The homework is due on the 29/06 and should be delivered by email. Send us (all the course teachers) the .m files in a zip archive attached to this email and a link to the pdf with the written part (not to flood our mailboxes). <br />
<br />
* '''''Can we do that in groups? How many people per group?''''': Yes, you can work on the homework in groups, but no more than 3 people per group are allowed. Put the names of all homework authors in the pdf and in all the .m files. If you discuss something with other people, w.r.t. the people in your group, point it out in the pdf file as well.<br />
<br />
* '''''Can we ask questions about the exercises or the code?''''': Yes you should! First of all, there might be unclear things in the exercise descriptions and those should be clarified as soon as possible for all (this is why the homework is versioned). But you could ask for help as well, our goal is to have you all solving all the questions and get a high grade ... but we will not do the homework on you behalf ;-)<br />
<br />
* '''''How the optional questions are graded?''''': They compensate for possible errors in the other questions; we suggest to work on them anyway to be sure you get the maximum grading.<br />
<br />
* '''''How the homework will be graded?''''': we are interested in understanding if you understood or not; thus we are not interested in the result, but we want to check how you get to the result. So please: 1) clarify all the assumptions and all the steps in your exercises 2) comment as much as possible your .m files!<br />
<br />
--></div>Matteohttps://chrome.deib.polimi.it/index.php?title=File:ML-2122-HW2.2.zip&diff=3844File:ML-2122-HW2.2.zip2022-05-21T15:22:00Z<p>Matteo: </p>
<hr />
<div></div>Matteohttps://chrome.deib.polimi.it/index.php?title=Machine_Learning_Bio&diff=3843Machine Learning Bio2022-05-21T15:21:32Z<p>Matteo: /* Homework #2 2021/2022 */</p>
<hr />
<div>__FORCETOC__<br />
<br />
The following are last-minute news you should be aware of ;-)<br />
* 21/05/2022: The dataset for the second homework is changed!!!<br />
* 19/05/2022: The second homework is out!!!<br />
* 04/05/2022: Changed lecture schedule<br />
* 02/05/2022: Changed deadline first homework -> 11/05/2022 at noon<br />
* 22/04/2022: The first homework is out!!!<br />
* 08/03/2022: Added material for the first lab<br />
* 06/03/2022: Slides from first lectures and last year's recordings updated <br />
* 23/02/2022: Lectures start today!<br />
<!--<br />
* 11/09/2021: Grade of the [[Media:ML2021-Grades_210911.pdf|Summer session + homeworks]] <br />
* 09/07/2021: Grade of the [[Media:ML2021-Grades_210624.pdf|24/06/2021 oral exams]] <br />
* 09/07/2021: Updated Homework + Oral [[Media:ML2021-Conversion.pdf|conversion table]]<br />
* 03/07/2021: Updated Homework available [[Media:ML2021-homework-new.zip|here!!!]]<br />
* 08/06/2021: Updated all videos and all slides from the course.<br />
* 02/06/2021: You can fin the 2020/2021 homework [[Media:ML2021-homework.zip|here!!!]]<br />
* 26/05/2021: The link to the form to request an instance of remote examination for June and July is [https://forms.office.com/r/FUrVt8eZNx here]!<br />
* 09/04/2021: From next week lectures will be back to presence (plus webex streaming)<br />
* 22/03/2021: Added completed material from the last lab plus some exercises ... <br />
* 17/03/2021: Added the material for the lab of today ... <br />
* 10/03/2021: 11/03/2021 lecture has been canceled<br />
* 06/03/2021: website update with linear algebra slides and (working) links to all lectures<br />
* 05/03/2021: Since today we are moved fully online so lectures will happen in my webex room (same holds for labs)<br />
* 24/02/2021: Lectures start today<br />
--><br />
<!--<br />
* 08/08/2020: Grading for all projects and first two calls [[Media:Grades_20200723.pdf|are here!!]] <br />
* 22/06/2020: Grading mechanism explained, check [[Media:ML2020_grading_system.pdf|here a handy recap]] <br />
* 14/06/2020: [[Media:ML2020_homework.zip |Here it come the 2020 homework!!!]]<br />
* 03/06/2020: All slides updated<br />
* 02/05/2020: Updated course schedule and added videos to the previous lectures<br />
* 04/04/2020: Updated schedule and added videos of previous lectures<br />
* 31/03/2020: Updated schedule and added material on linear algebra<br />
* 19/03/2020: Added lab material, both with empty notebooks and final result<br />
* 11/03/2020: Added today's lecture videos and planned next week schedule (To Be Completed)<br />
* 11/03/2020: The course starts today!<br />
* 03/03/2020: The course is going to start soon ...<br />
--><br />
<br />
==Course Aim & Organization==<br />
<br />
The objective of the Machine Learning course is to give an in-depth presentation of the techniques most used for pattern recognition, knowledge discovery, and data analysis/modeling. These techniques are presented both from a theoretical (i.e., statistics and information theory) perspective and a practical one (i.e., coding examples) through the descriptions of algorithms and their implementations in a general-purpose programming language (i.e., python).<br />
<br />
The course presents the classical supervised and unsupervised learning paradigms described and discussed presenting regression, classification, and clustering problems in Bioinformatics. The course is composed of a set of lectures on specific machine learning techniques (e.g., generalized linear regression, logistic regression, linear and quadratic discriminant analysis, support vector machines, k-nearest-neighborhood, clustering, etc.) preceded by the introduction of the Statistical Learning framework which acts as a common reference framework for the entire course.<br />
<br />
===Teachers===<br />
<br />
The course is composed of a blending of lectures and exercises by the course teacher and a teaching assistant.<br />
<br />
* [http://www.deib.polimi.it/ita/personale/dettagli/267262 Matteo Matteucci]: the course teacher <br />
* [https://www.deib.polimi.it/ita/personale/dettagli/1638984 Stefano Samele]: the teaching assistant <br />
<br />
===Course Program===<br />
<br />
The course mostly follows the following book which is also available for download in pdf<br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani<br />
<br />
The course lectures will present the theory and practice of the following:<br />
* Machine Learning and Pattern Classification: the general concepts of Machine Learning and Pattern Recognition are introduced within the framework of Statistical Decision Theory with reference to the bias-variance trade-off and the Bayes classifier;<br />
* Generalized Linear Regression: linear methods for regression will be presented and discussed introducing different techniques (e.g., Linear Regression, Ridge Regression, K-Nearest Neighbors Regression, Non-Linear Regression, etc.) and the most common methodologies for model validation and selection (e.g., AIC, BIC, cross-validation, stepwise feature selection, Lasso, etc.).<br />
* Linear and Non-Linear Classification: generative and discriminative techniques for classification will be described and discussed (e.g., Logistic Regression, Linear and Quadratic Discriminant Analysis, K-Nearest Neighbors, Perceptron Rule, and Support Vector Machines, etc.). Metrics for classifiers evaluation and comparison are presented in this part of the course (e.g., accuracy, precision, recall, ROC, AUC, F-measure, Matthew coefficient).<br />
* Unsupervised Learning: the most common approaches to unsupervised learning are described mostly focusing on clustering methods such as hierarchical clustering, k-means, k-medoids, Mixture of Gaussians, DBSCAN, etc<br />
<br />
These topics will be presented both from a theoretical perspective and a practical one via implementations in the general-purpose programming language python.<br />
<br />
===Detailed course schedule===<br />
<br />
A detailed schedule of the course can be found here; topics are just indicative while days and teachers are correct up to some last-minute change (I will notify you by email). Please note that not all days we have lectures!!<br />
<br />
Note: Lecture timetable interpretation<br />
* On Wednesday, in room 26.02, starts at 15:15 (cum tempore), ends at 18:15<br />
* On Thursday, in room 26.01, starts at 12:15 (cum tempore), ends at 14:15<br />
<br />
<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|23/02/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Machine Learning Intro<br />
|-<br />
|24/02/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Statistical Learning Theory (Ch. 1 ISL)<br />
|-<br />
|02/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Statistical Learning Theory - Bias/Variance Trade-off (Ch. 2 ISL)<br />
|-<br />
|03/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Introduction to Linear Algebra<br />
|-<br />
|09/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Python + Numpy + Bias/Variance<br />
|-<br />
|10/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Simple Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|16/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Multi Variate Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|17/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL) <br />
|-<br />
|23/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Multivariate Linear Regression Laboratory<br />
|-<br />
|24/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Generalized Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|30/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Feature Selection and Model Assessment (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|31/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Ridge Regression and Lasso (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|06/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Generalized Linear Regression and Feature Selection Laboratory<br />
|-<br />
|07/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: KNN and Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|13/04/2022 || Wednesday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|14/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|20/04/2022 || Wednesday || 15:15-18:15 || 26.02 ||Matteo Matteucci || Lecture || Classification: Linear Discriminanr Analysis (Ch. 4 ISL)<br />
|-<br />
|21/04/2022 || Thursday || 12:15 - 14:15 || 26.01 || Matteo Matteucci || Lecture || Evaluation methods for classification<br />
|-<br />
|27/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Logistic Regression and LDA Laboratory<br />
|-<br />
|28/04/2022 || Thursday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|04/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || The Perceptron (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|06/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL) <br />
|-<br />
|11/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Unsupervised Learning and Clustering (Ch. 10 ISL)<br />
|-<br />
|12/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Clustering (Ch. 10 ISL)<br />
|-<br />
|18/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || SVM and Classifiers Evaluation Laboratory<br />
|-<br />
|19/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|25/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Clustering Laboratory<br />
|-<br />
|26/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|01/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Clustering Evaluation<br />
|-<br />
|02/06/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|08/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Principal Component Analysis (Ch. 10 ISL)<br />
|}<br />
<br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|24/02/2021 || Wednesday || 15:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
|-<br />
|25/02/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] (Ch. 1 ISL)<br />
|-<br />
|03/03/2021 || Wednesday || 14:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off] (Ch. 2 ISL)<br />
|-<br />
|04/03/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
|-<br />
|10/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|11/03/2021 || Thursday || --- || --- || --- || ---|| --- No lecture ---<br />
|-<br />
|17/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
|-<br />
|18/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|24/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
|-<br />
|25/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|31/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|01/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|07/04/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
|-<br />
|08/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|14/04/2021 || Wednesday || '''15:15-18:15''' || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|15/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis] (Ch. 4 ISL)<br />
|-<br />
|22/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|23/04/2021 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|28/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|29/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
|-<br />
|05/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
|-<br />
|06/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|12/05/2021 || Wednesday || 14:15-18:15 || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|13/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering] (Ch. 10 ISL)<br />
|-<br />
|19/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
|-<br />
|20/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering] (Ch. 10 ISL)<br />
|-<br />
|26/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
|-<br />
|27/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering] (Ch. 10 ISL)<br />
|-<br />
|02/06/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|03/06/2021 || Thursday || 08:15-11:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|04/06/2021 || Friday || 14:15-17:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|11/03/2020 || Wednesday || 14:15 - 18:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3565a411-bed7-4b20-9dd6-00ee8b9ddd54 Course Introduction], [https://web.microsoftstream.com/video/4a702565-386d-4bed-a0c1-9d1daa015703 Introduction to Machine Learning], and [https://web.microsoftstream.com/video/cef9a912-ee47-4254-8f26-318a6a014424 Statistical Machine Learning] (Ch. 1 ISL)<br />
|-<br />
|12/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/389145d3-c3e5-48c2-bf82-d7877bf14b8c Statistical Decision Theory and Bias-Variance trade off] (Ch. 2 ISL)<br />
|-<br />
|18/03/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/bb2155d6-a6f2-4f82-af48-3ceb22951c4b Python + Numpy + Bias/Variance] Laboratory<br />
|-<br />
|19/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b0359dad-971c-412d-8508-fde45e1dc3fe Statistical Decision Theory and Bias-Variance trade off (continued)] (Ch. 2 ISL)<br />
|-<br />
|25/03/2017 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f88827c9-0994-4d3f-80bf-1c9b6637ba18 Simple Linear Regression and Multivariate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|26/03/2017 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/deb2b3f5-d90d-47b8-b309-1ab88979f805 Multivariate Linear Regression (continued)] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|01/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/da0e35db-6995-412a-99ad-f409f0a6752d Multivariae Linear Regression (Part 1)] [https://web.microsoftstream.com/video/8defdff7-ae83-4753-a353-3d39194e63ac (Part 2)] Laboratory<br />
|-<br />
|02/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/c81f59c8-7023-4206-a771-8be062b7cb21 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|08/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/0255cfa0-98de-4465-a8bf-07c93e0974ee Issues with Linear Regression and Generalized Linear Regression] and [https://web.microsoftstream.com/video/e3392148-f1ee-426d-a271-3d8fcf11008a Feature Selection] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|09/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/03656a6b-46c7-483e-9263-0036144adb00 Feature Selection (continued)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|15/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/58093db6-f365-4184-8ce0-c12c03a1589f Generalized Linear Regression and Feature Selection (Part1)] [https://web.microsoftstream.com/video/52b0d7f5-a725-4406-aab3-3be5145d950f (Part 2)] Laboratory<br />
|-<br />
|16/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1565c508-4448-4678-a9e4-4ff411684227 Feature Selection (LASSO)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|22/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d04083a9-8961-4448-bcf2-0576d9dccf4c Classification by KNN (Part 1)] and [https://web.microsoftstream.com/video/c56ef675-486a-425c-819d-404868e07906 Logistic Regression (Part 2)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|23/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3a5f66b1-80d2-4ee5-ba14-7757ae662c97 Classification by Logistic Regression (continued)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|29/04/2020 || Wednesday || 14:15 - 17:15 || --- || --- || --- || --- No Lecture (Laurea) ---<br />
|-<br />
|30/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/a171bc2a-35e7-42c7-bdd0-d295ecfd7e26 Classification by Linear Discriminant Analysis] (Ch. 4 ISL)<br />
|-<br />
|06/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/cef18863-e3fd-481e-bcad-a18455796fd7 Classification via Logistic Regression, and LDA Laboratory (Part 1)] and [https://web.microsoftstream.com/video/670b7f72-5b6b-4168-9f1c-211a9ad25f48 (Part 2)]<br />
|-<br />
|07/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b2ed8ca0-c0c0-4c1a-836d-b2ffee20d85e Evaluation Methods for Classification]<br />
|-<br />
|13/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/2b881d7d-d11e-4432-8873-973bc36eeb61 Perceptron Learning] and [https://web.microsoftstream.com/video/00564932-919a-49a1-9fa5-eb7706640781 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|14/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b72fa8de-f98d-43cf-9609-5833625a4b5c Support Vector Machines and Kernel Trick] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|20/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/fab1f62e-cea0-4cc9-9366-0ccd6bcd161b Classification (SVM and classifiers evaluation) Laboratory (Part 1)] and [https://web.microsoftstream.com/video/130b806d-5390-4321-9d05-f63e079f30a1 (Part 2)]<br />
|-<br />
|21/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1125b85e-f4a1-49d1-991f-333fff893a1e Introduction to Unsupervised Learning] (Ch. 10 ISL)<br />
|-<br />
|27/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d8d0efb5-adfb-4376-afe3-26afb7ffd664 Clustering: Hierachical, k-means, and DBSCAN (Part 1)] and [https://web.microsoftstream.com/video/b7307896-bff7-4fd0-973f-d37fd7f91e13 (Part 2)] (Ch. 10 ISL)<br />
|-<br />
|28/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3f2975c2-1143-4870-8aed-a1a06382be14 Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|03/06/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/0fa04b48-f8c3-488b-bfab-92547d3a9c38 Clustering Laboratory (Part 1)] and [https://web.microsoftstream.com/video/24a40515-afdd-4cca-9b62-19e544c7e12e (Part 2)]<br />
|-<br />
|04/06/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f58132ba-afd3-47ce-89c8-ba16782d8f37 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
|-<br />
|27/11/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Classification by Linear Discriminant Analysis (Ch. 4 ISL)<br />
|-<br />
|03/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Exercises on Classification by Linear Discriminant Analysis<br />
|-<br />
|04/12/2017 || Tuesday || --- || --- || --- || No Lecture <br />
|-<br />
|10/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Clustering: Intro, k-means and the alike, GMM, and hierachical<br />
|-<br />
|11/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Davide Eynard || Clustering: Density-based, Spectral + Evaluation<br />
|-<br />
|14/12/2017 || Friday || 10:15 - 13:15 || TBD || Matteo Matteucci || Classification: from generative to discriminative approaches (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|17/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|18/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|}<br />
--><br />
Chapters are intended as complete except for<br />
* Ch.4 ESL: Section 4.5<br />
* Ch.12 ESL: Sections 12.1, 12.2, 12.3<br />
* Ch.9 ISL: Sections 9.1, 9.2, 9.3<br />
<br />
===Course Evaluation===<br />
<br />
The course evaluation is composed by two parts:<br />
<br />
* HW: Homework with exercises covering the whole program (up to 6 points)<br />
* OR: An oral discussion covering the whole program (up to 26 points)<br />
<br />
the final score will be the sum of HW (not compulsory) and OR scores. You will get the oral grade as a mark in the scale of 30 up to 32/30 which you have to multiply by 0.8125 and then you add to it the score of the project. For your convenience here it is [[Media:ML2021-Conversion.pdf|a conversion table]] with the final mark in case you do not turn in the project or you get the whole 6 marks in the project.<br />
<br />
====Homework #1 2021/2022====<br />
<br />
The first project asks you to develop a regression model on the [[Media:ML-2122-HW1.zip | Forest Fires Data Set]]. The goal of the model is to predict, given a set of features the burned area of forest fires. The project should focus on investigating the part of features selection for the regression task to understand the relationships between the different variables involved fully. <br />
An accurate and helpful description of the dataset is included in the forestfire.names file.<br />
<br />
The project should consist of an executable python notebook, sufficiently commented. Most of the cells should be adequately followed or preceded by an explanation of what you are doing, why, what the output is, how you interpret it, and so on.<br />
<br />
You can submit your notebook via email at stefano.samele@polimi.it. The deadline is 11/05/22 at midday CET.<br />
The notebook should already display all the cells' outputs. A copy and a re-execution will be performed to evaluate your work: we need to be sure your code is actually executable and displays consistent results.<br />
<br />
You can attend the project in a group of maximum two. Scores (0-1-2, with half points) will be assigned based on the ability to organize the investigation and the code, adopt relevant methodologies presented during laboratories, understand and interpret results, and comply with project requests.<br />
<br />
====Homework #2 2021/2022====<br />
<br />
The second project asks you to develop a classification model for the <s>Autism Screening Adult Data Set</s> [[Media:ML-2122-HW2.2.zip | Breast Cancer Wisconsin Dataset]]. The task consists in predicting whether the patient is affected by an Autistic Spectrum Disorder, based on a set of specific features. The goal of the project is to build, given the set of models explained during the laboratories, the best fit for the task. <br />
<br />
You can submit your notebook via email at stefano.samele@polimi.it. The deadline is 01/06/22 at midday CET.<br />
Please rename your file as name_surname_stuedentidnumber.<br />
<br />
For any other information please refer to the previous project announcement.<br />
<br />
====Homework #3 2021/2022====<br />
<br />
TDB<br />
<br />
==Teaching Material (the textbook)== <br />
<br />
Lectures will be based on material taken from the book. <br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani<br />
<br />
If you are interested in a more deep treatment of the topics you can refer to the following book from the same authors<br />
<br />
* [http://www-stat.stanford.edu/~tibs/ElemStatLearn/index.html The Elements of Statistical Learning: Data Mining, Inference, and Prediction.] by Trevor Hastie, Robert Tibshirani, and Jerome Friedman.<br />
<br />
Some additional material that could be used to prepare the oral examination will be provided together with the past homeworks.<br />
<br />
===Teacher Slides ===<br />
<br />
In the following you can find the lecture slides used by the teacher and the teaching assistants during classes.<br />
<br />
* [[Media:ML-2020-A0-LinearAlgebraBasics.pdf | [2020/2021] Linear Algebra Basics]]: Basic elements of linear algebra, e.g., vectors, matrices, basis, span, etc.<br />
* [[Media:ML-2122-00-Intro.pdf | [2021/2022] Course introduction]]: introductory slides of the course with useful information about the grading, and the course logistics. Some examples from supervised and unsupervised learning. Regression, classification, clustering terminology and examples.<br />
* [[Media:ML-2122-01-StatisticalLearning.pdf | [2021/2022] Statistical Learning Introduction]]: Statistical Learning definition, rationale, and trade-offs (e.g., prediction vs. inference, parametric vs non parametric models, flexibility vs. interpretability, etc.)<br />
* [[Media:ML-2122-02-LinearRegression.pdf | [2021/2022] Linear Regression]]: Simple Linear Regression and Multiple Linear Regression. Generalized Linear models. Cross-validation techniques. Feature selection. Ridge Regression and Lasso.<br />
* [[Media:ML-2021-03-LinearClassification.pdf | [2020/2021] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods. Discriminative vs. generative methods. Support Vector Machines. <br />
* [[Media:ML-2021-04-Clustering.pdf | [2020/2021] Clustering]]: Introduction to unsupervised learning and clustering, hierarchical clustering, k-means, DBSCNA, indexes for clustering evaluation. <br />
* [[Media:ML-2021-05-PrincipalComponentAnalysis.pdf | [2020/2021] Principal Component Analysis]]: Principal Component Analysis, Geometric Interpretation, Singular Values Decomposition.<br />
<br />
===Laboratories===<br />
<br />
We will use Python (with Jupyter notebooks) throughout the course, thus we kindly ask you to install the "Anaconda" package to be ready for the labs. Here are the [https://www.anaconda.com/products/individual download links]. You can find a simple Jupyter notebook [[Media:ML2021-test.zip | HERE]] to test if the installation succeeded.<br />
<br />
To open the notebook<br />
* launch the "Anaconda Navigator" app<br />
* launch the "jupyter Notebook" app within the navigator, it should automatically open a webpage (it may take a while)<br />
* on the webpage, navigate on the folder where you downloaded the "lab01.00-TestEnvironment.ipynb" file, and press on the file to open it<br />
* then follow the instruction within the notebook<br />
<br />
If you didn't install anaconda but just jupyter, or if you can't find Anaconda Navigator <br />
* open a shell ("Anaconda Prompt" if you are using Windows)<br />
* move on to the folder where you downloaded "lab01.00-TestEnvironment.ipynb"<br />
* run the "jupyter notebook" command, it should automatically open a webpage<br />
* then on the webpage press on the "lab01.00-TestEnvironment.ipynb" file and follow the instructions within the notebook<br />
<br />
The following are the notebook used in the labs:<br />
*[[Media:ML2122-lab01.zip | [2021/2022] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session including the testing environment ([[Media:ML2122-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab02.zip | [2021/2022] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2122-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab03.zip | [2021/2022] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2122-lab03_solutions_part1.zip |complete version]])<br />
*[[Media:ML2122-lab04.zip | [2021/2022] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2122-lab04_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab05.zip | [2021/2022] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fifth lab session ([[Media:ML2122-lab05_solutions.zip |complete version]])<br />
<!--<br />
*[[Media:ML2021-lab01.zip | [2020/2021] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session ([[Media:ML2021-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab02.zip | [2020/2021] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2021-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab03.zip | [2020/2021] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2021-lab03_solutions_tmp.zip |complete version]])<br />
*[[Media:ML2021-lab04.zip | [2020/2021] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab04_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab05.zip | [2020/2021] Material for the fifth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab05_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab06.zip | [2020/2021] Material for the sixth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab06_solutions.zip |complete version]])<br />
--><br />
<!--<br />
* [[Media:ML-2016-03-AssessingModelAccuracy.pdf | [2016] Statistical Learning and Model Assessment]]: Model Assessment for Regression and Classification, Bias-Variance trade-off, Model complexity and overfitting, K-Nearest Neighbors Classifier vs. Bayes Classifier.<br />
* [[Media:ML-2016-05-LinearClassification.pdf | [2016] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods.<br />
* [[Media:ML-2016-06-SupportVectorMachines.pdf | [2016] Support Vector Machines]]: Discriminative vs. generative methids. Hyperplanes learning and Perceptron. Maximum Margin Classifiers. The Kernel trick and Support Vector Machines.<br />
For exercises and lab material please refer to [http://davide.eynard.it/pattern-analysis-and-machine-intelligence-2015-2016/ Davide Eynard website].<br />
--><br />
<br />
===Additional Resources===<br />
Papers and links useful to integrate the textbook<br />
<br />
* [http://www.ekof.bg.ac.rs/wp-content/uploads/2016/09/Ponavljanje-matematike-Wayne-Winston-Operations-Research-Applications-and-Algorithms-4-edition.pdf Basic Linear Algebra]: "Basic Linear Algebra" chapter from Wayne Winston book "Operations Research Applications and Algorithms (4th ed.)"<br />
* [http://scott.fortmann-roe.com/docs/BiasVariance.html Bias vs. Variance]: "Understanding the Bias-Variance Tradeoff" essay by Scott Fortmann-Roe<br />
* [http://www.onmyphd.com/?p=kkt.karush.kuhn.tucker Karush Kuhn Tucker Conditions]: a short note on their meaning with references to relevant wikipedia pages<br />
* [http://students.brown.edu/seeing-theory/ Seeing Theory]: a website where the basic concepts of probability and statistics are explained in a visual way.<br />
<br />
Python examples to better practice with numpy library<br />
* [https://github.com/Kyubyong/numpy_exercises Some numpy exercises], we did roughly 1, 2, 4, 6, 9, 10, 13<br />
* [https://github.com/rougier/numpy-100 Othen numpy exercises] from simple to complex<br />
* [https://www.w3resource.com/python-exercises/numpy/index-array.php More numpy exercises] from simple to complex<br />
<br />
===Year 2020/2021 Recordings (use at your own risk)===<br />
<br />
As I registered these due to pandemics, I am making them available. They DO NOT REPLACE THIS YEAR classroom lectures which are to be considered as the official material of this year, but they might be useful to double-check your notes.<br />
<br />
* 24/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
* 25/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] <br />
* 03/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off]<br />
* 04/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
* 10/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression]<br />
* 18/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression]<br />
* 25/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression]<br />
* 31/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment]<br />
* 01/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso]<br />
* 08/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression]<br />
* 14/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression]<br />
* 15/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis]<br />
* 29/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
* 06/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] <br />
* 12/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] <br />
* 13/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering]<br />
* 20/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering]<br />
* 27/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering]<br />
* 03/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation]<br />
* 04/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] <br />
<br />
Also, labs are available, however, the teaching assistant this year has changed.<br />
<br />
* 17/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
* 24/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
* 07/04/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
* 05/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
* 19/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
* 26/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
<br />
<!--<br />
===Past Exams and Sample Questions===<br />
For some samples of exams you can check the last year PAMI ones<br />
<br />
* [[Media:2016_02_03_PAMI.pdf |03/02/2016 PAMI Exam]]<br />
* [[Media:2016_02_19_PAMI.pdf |19/02/2016 PAMI Exam]]<br />
* [[Media:2016_07_06_PAMI.pdf |06/07/2016 PAMI Exam]]<br />
* [[Media:2016_09_09_PAMI.pdf |09/09/2016 PAMI Exam]]<br />
* [[Media:2016_09_28_PAMI.pdf |28/09/2016 PAMI Exam]]<br />
--><br />
===Online Resources===<br />
<br />
The following are links to online sources which might be useful to complement the material above<br />
* [https://towardsdatascience.com/linear-algebra-survival-kit-for-machine-learning-94901a62465e An Introduction to Linear Algebra] with numpy examples. It provides the very fundamental definitions, does not cover eigenvalues and eigenvectors.<br />
* [https://www.r-bloggers.com/in-depth-introduction-to-machine-learning-in-15-hours-of-expert-videos/ Statistical Learning MOOC] covering the entire ISL book offered by Trevor Hastie and Rob Tibshirani. Start anytime in self-paced mode.<br />
* [http://math.arizona.edu/~hzhang/math574m.html MATH 574M] University of Arizona Course on ''Statistical Machine Learning and Data Mining''; here you can find slides covering part of the course topics (the reference book for this course is again ''The Elements of Statistical Learning'')<br />
<br />
<!--<br />
== 2013-2014 Homework ==<br />
<br />
The 2013 Homework (alike the 2012 one) is organized as an octave series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
=== Part 1: Linear Classification Methods ===<br />
<br />
* [[Media:homework_pami_classification_2013_2014.pdf | Homework 2013-2014 on Classification]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 17/11 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
=== Part 2: Regression ===<br />
* [[Media:homework_pami_regression_2013_2014.pdf | Homework 2013-2014 Regression]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to malago@di.unimi.it (cc to matteo.matteucci@polimi.it) is Friday 20/12 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:diabete.mat | diabete.mat]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
For any question or doubt please sen us an email as soon as possible.<br />
<br />
'''Note 1:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
<strike>'''Note 2:''' rename the file Diabete.data into diabete.mat ... still fighting with the CSM :-)</strike><br />
<br />
'''Note 3:''' the code has been tested with octave under linux, we suggest to use it not to spend too much time with installing it under windows or using matlab. If you do not have linux installed, try using a live CD as the ubuntu 13.04 live distro ;-)<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at this post<br />
<br />
* [http://davide.eynard.it/2013/12/30/octave-clustering-demo-part-6-more-evaluation/ Homework 2013-2014 on clustering evaluation]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is the end of the course. You have to '''send it to davide.eynard_at_gmail.com Friday 24/01 23:59'''.<br />
<br />
'''Note 1:''' for any doubt or question send an email, as soon as possible, to Davide Eynard so to have a prompt reply and not get stuck during homework execution.<br />
<br />
'''Note 2:''' you have to turn in only the solution of "Ocatave clustering demo part 6", while the other parts can be used as reference to improve your understanding in basic clustering algorithms.<br />
<br />
=== Part 2: Classification ===<br />
<br />
* [[Media:homework_pami_classification_2013.pdf | Homework 2013 Classification]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 23/06 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
<br />
<br />
'''Errata Corrige''': there were a few bugs in the homework text. I have updated the pdf and they were:<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the Fisher projection it is more correct to use only the training data to learn the projection and then we can train and test on the corresponding subsets<br />
<br />
a = FisherProjection(X(training,:),Y(training,:));<br />
reducedX = X*a(:,1);<br />
[mu_0, mu_1, sigma, p_0, p_1] = linearDiscriminantAnalysis_train(reducedX(training), Y(training))<br />
<br />
I forgot to filter for just the training samples when performing Quadratic Discriminant Analysis<br />
<br />
quadX = expandToQuadraticSpace(X);<br />
%check this out!<br />
size(quadX)<br />
beta = linearRegression_train(quadX(training), Y(training));<br />
<br />
And in general you should always train on the training data and test on the testing data ;-).<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at these posts<br />
<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-4-k-medoids/ Homework 2013 on k-medoids]<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-5-hierarchical-clustering/ Homework 2013 on hierarchical clustering]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is '''before the you take the exam''' sending it to davide.eynard_at_gmail.com.<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3:] follow this tutorial and answer the questions from all 5 sub-tutorials.<br />
<br />
== 2012 Homework ==<br />
<br />
The Homework of 2012 organized like an octave/matlab series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
* [[Media:PAMI_homework_2012_1.pdf | Homework 2012 part 1]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to matteucci@elet.polimi.it and malago@elet.polimi.it is Tuesday 5/6 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
'''Note:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
* [[Media:PAMI_homework_2012_2.pdf | Homework 2012 part 2]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade; the deadline to submit the solution by email to matteucci@elet.polimi.it is the day before the exam you decide to attend''' (e.g., if you decide to take the exam on the 26/6 then you need to turn it in by 25/6).<br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Errata Corrige''': there were a few bugs a bug in the homework text. I have updated the pdf and they were:<br />
In the code for loading the data I forgot to remove the first column which you do not need<br />
data = dlmread('SAheart.data',',',1,1);<br />
X = data(:,1:9);<br />
Y = data(:,10);<br />
<br />
In the StratifiedSampling function the sorted verctors should be assigned<br />
% just an ahestetic sorting<br />
testing = sort(testing);<br />
training = sort(training);<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the expansion to quadratic space the starting index for the inner loop should i and not 1. Moreover in some cases it might be possible to have columns which are duplicated (e.g., with boolean attribute); in this case you should not need the robust version of linear regression.<br />
function extendedX = expandToQuadraticSpace(X)<br />
% adds new columns to extendedX; keeps X for other calculations<br />
extendedX = X;<br />
for i=1:size(X, 2)<br />
for j=i:size(X, 2)<br />
newColumn = X(:, i) .* X(:, j);<br />
extendedX = [extendedX newColumn];<br />
end<br />
end<br />
% remove duplicated columns<br />
duplicates = [];<br />
for i=1:size(extendedX, 2)<br />
for j=i+1:size(extendedX, 2)<br />
if(sum(extendedX(:,i)==extendedX(:,j)) == size(X,1))<br />
duplicates = [duplicates j];<br />
end<br />
end<br />
end<br />
extendedX(:,duplicates) = [];<br />
end<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3]: the third part of the homework is '''optional''', so you are not required to complete it. However, if you want to give it a try and use it to understand the topics covered by Davide Eynard in his lectures you are welcome. As usual, the questions in this homework are very close to the ones you will find in classworks, so we suggest to have a look at hose anyway! '''In case you decide to turn it in and have it contribute with a 10% to the grade, the deadline to submit the solution by email to matteucci@elet.polimi.it and davide.eynard@polimi.it is the day before you decide to take the exam''' (e.g., if you decide to take the exam on the 10/7 then you need to turn it in by 9/7)<br />
<br />
'''Note:''' homeworks are meant to let you see (and practice) a little bit with the topics presented during the course. They are evaluated because you spent some time on those and thus you deserve some credit for that ;-)<br />
<br />
== 2011 Homework ==<br />
<br />
Here you can find the homework for the year 2011 and the material you need to complete it. Please read the F.A.Q. below and for any unsolved doubt contact the teachers of the course.<br />
<br />
* [[Media:PAMI_homework_2011_v02.pdf | Homework 2011 v02]] a minor change in the signature of the logistic regression function<br />
* [[Media:PAMI_homework_2011_v01.pdf | Homework 2011 v01]] text with questions and exercises<br />
* [[Media:dataset.txt | Dataset]] for the clustering exercise in csv format<br />
<br />
'''Frequently Asked Questions'''<br />
<br />
* '''''How do I take the square root of a matrix?''''': check the diagonalization approach from [http://en.wikipedia.org/wiki/Square_root_of_a_matrix].<br />
<br />
* '''''How do I compute the chi square statistics?'''': in the slide there is a cut and paste error since e_ij=R_it*C_tj as described here [http://en.wikipedia.org/wiki/Pearson's_chi-square_test]<br />
<br />
* '''''When it is due? In which format?''''': The homework is due on the 29/06 and should be delivered by email. Send us (all the course teachers) the .m files in a zip archive attached to this email and a link to the pdf with the written part (not to flood our mailboxes). <br />
<br />
* '''''Can we do that in groups? How many people per group?''''': Yes, you can work on the homework in groups, but no more than 3 people per group are allowed. Put the names of all homework authors in the pdf and in all the .m files. If you discuss something with other people, w.r.t. the people in your group, point it out in the pdf file as well.<br />
<br />
* '''''Can we ask questions about the exercises or the code?''''': Yes you should! First of all, there might be unclear things in the exercise descriptions and those should be clarified as soon as possible for all (this is why the homework is versioned). But you could ask for help as well, our goal is to have you all solving all the questions and get a high grade ... but we will not do the homework on you behalf ;-)<br />
<br />
* '''''How the optional questions are graded?''''': They compensate for possible errors in the other questions; we suggest to work on them anyway to be sure you get the maximum grading.<br />
<br />
* '''''How the homework will be graded?''''': we are interested in understanding if you understood or not; thus we are not interested in the result, but we want to check how you get to the result. So please: 1) clarify all the assumptions and all the steps in your exercises 2) comment as much as possible your .m files!<br />
<br />
--></div>Matteohttps://chrome.deib.polimi.it/index.php?title=Machine_Learning_Bio&diff=3842Machine Learning Bio2022-05-21T15:20:02Z<p>Matteo: /* Homework #2 2021/2022 */</p>
<hr />
<div>__FORCETOC__<br />
<br />
The following are last-minute news you should be aware of ;-)<br />
* 21/05/2022: The dataset for the second homework is changed!!!<br />
* 19/05/2022: The second homework is out!!!<br />
* 04/05/2022: Changed lecture schedule<br />
* 02/05/2022: Changed deadline first homework -> 11/05/2022 at noon<br />
* 22/04/2022: The first homework is out!!!<br />
* 08/03/2022: Added material for the first lab<br />
* 06/03/2022: Slides from first lectures and last year's recordings updated <br />
* 23/02/2022: Lectures start today!<br />
<!--<br />
* 11/09/2021: Grade of the [[Media:ML2021-Grades_210911.pdf|Summer session + homeworks]] <br />
* 09/07/2021: Grade of the [[Media:ML2021-Grades_210624.pdf|24/06/2021 oral exams]] <br />
* 09/07/2021: Updated Homework + Oral [[Media:ML2021-Conversion.pdf|conversion table]]<br />
* 03/07/2021: Updated Homework available [[Media:ML2021-homework-new.zip|here!!!]]<br />
* 08/06/2021: Updated all videos and all slides from the course.<br />
* 02/06/2021: You can fin the 2020/2021 homework [[Media:ML2021-homework.zip|here!!!]]<br />
* 26/05/2021: The link to the form to request an instance of remote examination for June and July is [https://forms.office.com/r/FUrVt8eZNx here]!<br />
* 09/04/2021: From next week lectures will be back to presence (plus webex streaming)<br />
* 22/03/2021: Added completed material from the last lab plus some exercises ... <br />
* 17/03/2021: Added the material for the lab of today ... <br />
* 10/03/2021: 11/03/2021 lecture has been canceled<br />
* 06/03/2021: website update with linear algebra slides and (working) links to all lectures<br />
* 05/03/2021: Since today we are moved fully online so lectures will happen in my webex room (same holds for labs)<br />
* 24/02/2021: Lectures start today<br />
--><br />
<!--<br />
* 08/08/2020: Grading for all projects and first two calls [[Media:Grades_20200723.pdf|are here!!]] <br />
* 22/06/2020: Grading mechanism explained, check [[Media:ML2020_grading_system.pdf|here a handy recap]] <br />
* 14/06/2020: [[Media:ML2020_homework.zip |Here it come the 2020 homework!!!]]<br />
* 03/06/2020: All slides updated<br />
* 02/05/2020: Updated course schedule and added videos to the previous lectures<br />
* 04/04/2020: Updated schedule and added videos of previous lectures<br />
* 31/03/2020: Updated schedule and added material on linear algebra<br />
* 19/03/2020: Added lab material, both with empty notebooks and final result<br />
* 11/03/2020: Added today's lecture videos and planned next week schedule (To Be Completed)<br />
* 11/03/2020: The course starts today!<br />
* 03/03/2020: The course is going to start soon ...<br />
--><br />
<br />
==Course Aim & Organization==<br />
<br />
The objective of the Machine Learning course is to give an in-depth presentation of the techniques most used for pattern recognition, knowledge discovery, and data analysis/modeling. These techniques are presented both from a theoretical (i.e., statistics and information theory) perspective and a practical one (i.e., coding examples) through the descriptions of algorithms and their implementations in a general-purpose programming language (i.e., python).<br />
<br />
The course presents the classical supervised and unsupervised learning paradigms described and discussed presenting regression, classification, and clustering problems in Bioinformatics. The course is composed of a set of lectures on specific machine learning techniques (e.g., generalized linear regression, logistic regression, linear and quadratic discriminant analysis, support vector machines, k-nearest-neighborhood, clustering, etc.) preceded by the introduction of the Statistical Learning framework which acts as a common reference framework for the entire course.<br />
<br />
===Teachers===<br />
<br />
The course is composed of a blending of lectures and exercises by the course teacher and a teaching assistant.<br />
<br />
* [http://www.deib.polimi.it/ita/personale/dettagli/267262 Matteo Matteucci]: the course teacher <br />
* [https://www.deib.polimi.it/ita/personale/dettagli/1638984 Stefano Samele]: the teaching assistant <br />
<br />
===Course Program===<br />
<br />
The course mostly follows the following book which is also available for download in pdf<br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani<br />
<br />
The course lectures will present the theory and practice of the following:<br />
* Machine Learning and Pattern Classification: the general concepts of Machine Learning and Pattern Recognition are introduced within the framework of Statistical Decision Theory with reference to the bias-variance trade-off and the Bayes classifier;<br />
* Generalized Linear Regression: linear methods for regression will be presented and discussed introducing different techniques (e.g., Linear Regression, Ridge Regression, K-Nearest Neighbors Regression, Non-Linear Regression, etc.) and the most common methodologies for model validation and selection (e.g., AIC, BIC, cross-validation, stepwise feature selection, Lasso, etc.).<br />
* Linear and Non-Linear Classification: generative and discriminative techniques for classification will be described and discussed (e.g., Logistic Regression, Linear and Quadratic Discriminant Analysis, K-Nearest Neighbors, Perceptron Rule, and Support Vector Machines, etc.). Metrics for classifiers evaluation and comparison are presented in this part of the course (e.g., accuracy, precision, recall, ROC, AUC, F-measure, Matthew coefficient).<br />
* Unsupervised Learning: the most common approaches to unsupervised learning are described mostly focusing on clustering methods such as hierarchical clustering, k-means, k-medoids, Mixture of Gaussians, DBSCAN, etc<br />
<br />
These topics will be presented both from a theoretical perspective and a practical one via implementations in the general-purpose programming language python.<br />
<br />
===Detailed course schedule===<br />
<br />
A detailed schedule of the course can be found here; topics are just indicative while days and teachers are correct up to some last-minute change (I will notify you by email). Please note that not all days we have lectures!!<br />
<br />
Note: Lecture timetable interpretation<br />
* On Wednesday, in room 26.02, starts at 15:15 (cum tempore), ends at 18:15<br />
* On Thursday, in room 26.01, starts at 12:15 (cum tempore), ends at 14:15<br />
<br />
<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|23/02/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Machine Learning Intro<br />
|-<br />
|24/02/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Statistical Learning Theory (Ch. 1 ISL)<br />
|-<br />
|02/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Statistical Learning Theory - Bias/Variance Trade-off (Ch. 2 ISL)<br />
|-<br />
|03/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Introduction to Linear Algebra<br />
|-<br />
|09/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Python + Numpy + Bias/Variance<br />
|-<br />
|10/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Simple Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|16/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Multi Variate Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|17/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL) <br />
|-<br />
|23/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Multivariate Linear Regression Laboratory<br />
|-<br />
|24/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Generalized Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|30/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Feature Selection and Model Assessment (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|31/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Ridge Regression and Lasso (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|06/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Generalized Linear Regression and Feature Selection Laboratory<br />
|-<br />
|07/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: KNN and Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|13/04/2022 || Wednesday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|14/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|20/04/2022 || Wednesday || 15:15-18:15 || 26.02 ||Matteo Matteucci || Lecture || Classification: Linear Discriminanr Analysis (Ch. 4 ISL)<br />
|-<br />
|21/04/2022 || Thursday || 12:15 - 14:15 || 26.01 || Matteo Matteucci || Lecture || Evaluation methods for classification<br />
|-<br />
|27/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Logistic Regression and LDA Laboratory<br />
|-<br />
|28/04/2022 || Thursday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|04/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || The Perceptron (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|06/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL) <br />
|-<br />
|11/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Unsupervised Learning and Clustering (Ch. 10 ISL)<br />
|-<br />
|12/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Clustering (Ch. 10 ISL)<br />
|-<br />
|18/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || SVM and Classifiers Evaluation Laboratory<br />
|-<br />
|19/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|25/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Clustering Laboratory<br />
|-<br />
|26/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|01/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Clustering Evaluation<br />
|-<br />
|02/06/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|08/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Principal Component Analysis (Ch. 10 ISL)<br />
|}<br />
<br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|24/02/2021 || Wednesday || 15:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
|-<br />
|25/02/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] (Ch. 1 ISL)<br />
|-<br />
|03/03/2021 || Wednesday || 14:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off] (Ch. 2 ISL)<br />
|-<br />
|04/03/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
|-<br />
|10/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|11/03/2021 || Thursday || --- || --- || --- || ---|| --- No lecture ---<br />
|-<br />
|17/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
|-<br />
|18/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|24/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
|-<br />
|25/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|31/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|01/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|07/04/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
|-<br />
|08/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|14/04/2021 || Wednesday || '''15:15-18:15''' || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|15/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis] (Ch. 4 ISL)<br />
|-<br />
|22/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|23/04/2021 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|28/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|29/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
|-<br />
|05/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
|-<br />
|06/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|12/05/2021 || Wednesday || 14:15-18:15 || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|13/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering] (Ch. 10 ISL)<br />
|-<br />
|19/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
|-<br />
|20/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering] (Ch. 10 ISL)<br />
|-<br />
|26/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
|-<br />
|27/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering] (Ch. 10 ISL)<br />
|-<br />
|02/06/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|03/06/2021 || Thursday || 08:15-11:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|04/06/2021 || Friday || 14:15-17:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|11/03/2020 || Wednesday || 14:15 - 18:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3565a411-bed7-4b20-9dd6-00ee8b9ddd54 Course Introduction], [https://web.microsoftstream.com/video/4a702565-386d-4bed-a0c1-9d1daa015703 Introduction to Machine Learning], and [https://web.microsoftstream.com/video/cef9a912-ee47-4254-8f26-318a6a014424 Statistical Machine Learning] (Ch. 1 ISL)<br />
|-<br />
|12/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/389145d3-c3e5-48c2-bf82-d7877bf14b8c Statistical Decision Theory and Bias-Variance trade off] (Ch. 2 ISL)<br />
|-<br />
|18/03/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/bb2155d6-a6f2-4f82-af48-3ceb22951c4b Python + Numpy + Bias/Variance] Laboratory<br />
|-<br />
|19/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b0359dad-971c-412d-8508-fde45e1dc3fe Statistical Decision Theory and Bias-Variance trade off (continued)] (Ch. 2 ISL)<br />
|-<br />
|25/03/2017 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f88827c9-0994-4d3f-80bf-1c9b6637ba18 Simple Linear Regression and Multivariate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|26/03/2017 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/deb2b3f5-d90d-47b8-b309-1ab88979f805 Multivariate Linear Regression (continued)] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|01/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/da0e35db-6995-412a-99ad-f409f0a6752d Multivariae Linear Regression (Part 1)] [https://web.microsoftstream.com/video/8defdff7-ae83-4753-a353-3d39194e63ac (Part 2)] Laboratory<br />
|-<br />
|02/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/c81f59c8-7023-4206-a771-8be062b7cb21 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|08/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/0255cfa0-98de-4465-a8bf-07c93e0974ee Issues with Linear Regression and Generalized Linear Regression] and [https://web.microsoftstream.com/video/e3392148-f1ee-426d-a271-3d8fcf11008a Feature Selection] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|09/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/03656a6b-46c7-483e-9263-0036144adb00 Feature Selection (continued)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|15/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/58093db6-f365-4184-8ce0-c12c03a1589f Generalized Linear Regression and Feature Selection (Part1)] [https://web.microsoftstream.com/video/52b0d7f5-a725-4406-aab3-3be5145d950f (Part 2)] Laboratory<br />
|-<br />
|16/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1565c508-4448-4678-a9e4-4ff411684227 Feature Selection (LASSO)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|22/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d04083a9-8961-4448-bcf2-0576d9dccf4c Classification by KNN (Part 1)] and [https://web.microsoftstream.com/video/c56ef675-486a-425c-819d-404868e07906 Logistic Regression (Part 2)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|23/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3a5f66b1-80d2-4ee5-ba14-7757ae662c97 Classification by Logistic Regression (continued)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|29/04/2020 || Wednesday || 14:15 - 17:15 || --- || --- || --- || --- No Lecture (Laurea) ---<br />
|-<br />
|30/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/a171bc2a-35e7-42c7-bdd0-d295ecfd7e26 Classification by Linear Discriminant Analysis] (Ch. 4 ISL)<br />
|-<br />
|06/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/cef18863-e3fd-481e-bcad-a18455796fd7 Classification via Logistic Regression, and LDA Laboratory (Part 1)] and [https://web.microsoftstream.com/video/670b7f72-5b6b-4168-9f1c-211a9ad25f48 (Part 2)]<br />
|-<br />
|07/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b2ed8ca0-c0c0-4c1a-836d-b2ffee20d85e Evaluation Methods for Classification]<br />
|-<br />
|13/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/2b881d7d-d11e-4432-8873-973bc36eeb61 Perceptron Learning] and [https://web.microsoftstream.com/video/00564932-919a-49a1-9fa5-eb7706640781 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|14/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b72fa8de-f98d-43cf-9609-5833625a4b5c Support Vector Machines and Kernel Trick] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|20/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/fab1f62e-cea0-4cc9-9366-0ccd6bcd161b Classification (SVM and classifiers evaluation) Laboratory (Part 1)] and [https://web.microsoftstream.com/video/130b806d-5390-4321-9d05-f63e079f30a1 (Part 2)]<br />
|-<br />
|21/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1125b85e-f4a1-49d1-991f-333fff893a1e Introduction to Unsupervised Learning] (Ch. 10 ISL)<br />
|-<br />
|27/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d8d0efb5-adfb-4376-afe3-26afb7ffd664 Clustering: Hierachical, k-means, and DBSCAN (Part 1)] and [https://web.microsoftstream.com/video/b7307896-bff7-4fd0-973f-d37fd7f91e13 (Part 2)] (Ch. 10 ISL)<br />
|-<br />
|28/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3f2975c2-1143-4870-8aed-a1a06382be14 Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|03/06/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/0fa04b48-f8c3-488b-bfab-92547d3a9c38 Clustering Laboratory (Part 1)] and [https://web.microsoftstream.com/video/24a40515-afdd-4cca-9b62-19e544c7e12e (Part 2)]<br />
|-<br />
|04/06/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f58132ba-afd3-47ce-89c8-ba16782d8f37 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
|-<br />
|27/11/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Classification by Linear Discriminant Analysis (Ch. 4 ISL)<br />
|-<br />
|03/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Exercises on Classification by Linear Discriminant Analysis<br />
|-<br />
|04/12/2017 || Tuesday || --- || --- || --- || No Lecture <br />
|-<br />
|10/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Clustering: Intro, k-means and the alike, GMM, and hierachical<br />
|-<br />
|11/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Davide Eynard || Clustering: Density-based, Spectral + Evaluation<br />
|-<br />
|14/12/2017 || Friday || 10:15 - 13:15 || TBD || Matteo Matteucci || Classification: from generative to discriminative approaches (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|17/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|18/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|}<br />
--><br />
Chapters are intended as complete except for<br />
* Ch.4 ESL: Section 4.5<br />
* Ch.12 ESL: Sections 12.1, 12.2, 12.3<br />
* Ch.9 ISL: Sections 9.1, 9.2, 9.3<br />
<br />
===Course Evaluation===<br />
<br />
The course evaluation is composed by two parts:<br />
<br />
* HW: Homework with exercises covering the whole program (up to 6 points)<br />
* OR: An oral discussion covering the whole program (up to 26 points)<br />
<br />
the final score will be the sum of HW (not compulsory) and OR scores. You will get the oral grade as a mark in the scale of 30 up to 32/30 which you have to multiply by 0.8125 and then you add to it the score of the project. For your convenience here it is [[Media:ML2021-Conversion.pdf|a conversion table]] with the final mark in case you do not turn in the project or you get the whole 6 marks in the project.<br />
<br />
====Homework #1 2021/2022====<br />
<br />
The first project asks you to develop a regression model on the [[Media:ML-2122-HW1.zip | Forest Fires Data Set]]. The goal of the model is to predict, given a set of features the burned area of forest fires. The project should focus on investigating the part of features selection for the regression task to understand the relationships between the different variables involved fully. <br />
An accurate and helpful description of the dataset is included in the forestfire.names file.<br />
<br />
The project should consist of an executable python notebook, sufficiently commented. Most of the cells should be adequately followed or preceded by an explanation of what you are doing, why, what the output is, how you interpret it, and so on.<br />
<br />
You can submit your notebook via email at stefano.samele@polimi.it. The deadline is 11/05/22 at midday CET.<br />
The notebook should already display all the cells' outputs. A copy and a re-execution will be performed to evaluate your work: we need to be sure your code is actually executable and displays consistent results.<br />
<br />
You can attend the project in a group of maximum two. Scores (0-1-2, with half points) will be assigned based on the ability to organize the investigation and the code, adopt relevant methodologies presented during laboratories, understand and interpret results, and comply with project requests.<br />
<br />
====Homework #2 2021/2022====<br />
<br />
The second project asks you to develop a classification model for the <s>[[Media:ML-2122-HW2.zip | Autism Screening Adult Data Set]]</s>. The task consists in predicting whether the patient is affected by an Autistic Spectrum Disorder, based on a set of specific features. The goal of the project is to build, given the set of models explained during the laboratories, the best fit for the task. <br />
<br />
You can submit your notebook via email at stefano.samele@polimi.it. The deadline is 01/06/22 at midday CET.<br />
Please rename your file as name_surname_stuedentidnumber.<br />
<br />
For any other information please refer to the previous project announcement.<br />
<br />
====Homework #3 2021/2022====<br />
<br />
TDB<br />
<br />
==Teaching Material (the textbook)== <br />
<br />
Lectures will be based on material taken from the book. <br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani<br />
<br />
If you are interested in a more deep treatment of the topics you can refer to the following book from the same authors<br />
<br />
* [http://www-stat.stanford.edu/~tibs/ElemStatLearn/index.html The Elements of Statistical Learning: Data Mining, Inference, and Prediction.] by Trevor Hastie, Robert Tibshirani, and Jerome Friedman.<br />
<br />
Some additional material that could be used to prepare the oral examination will be provided together with the past homeworks.<br />
<br />
===Teacher Slides ===<br />
<br />
In the following you can find the lecture slides used by the teacher and the teaching assistants during classes.<br />
<br />
* [[Media:ML-2020-A0-LinearAlgebraBasics.pdf | [2020/2021] Linear Algebra Basics]]: Basic elements of linear algebra, e.g., vectors, matrices, basis, span, etc.<br />
* [[Media:ML-2122-00-Intro.pdf | [2021/2022] Course introduction]]: introductory slides of the course with useful information about the grading, and the course logistics. Some examples from supervised and unsupervised learning. Regression, classification, clustering terminology and examples.<br />
* [[Media:ML-2122-01-StatisticalLearning.pdf | [2021/2022] Statistical Learning Introduction]]: Statistical Learning definition, rationale, and trade-offs (e.g., prediction vs. inference, parametric vs non parametric models, flexibility vs. interpretability, etc.)<br />
* [[Media:ML-2122-02-LinearRegression.pdf | [2021/2022] Linear Regression]]: Simple Linear Regression and Multiple Linear Regression. Generalized Linear models. Cross-validation techniques. Feature selection. Ridge Regression and Lasso.<br />
* [[Media:ML-2021-03-LinearClassification.pdf | [2020/2021] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods. Discriminative vs. generative methods. Support Vector Machines. <br />
* [[Media:ML-2021-04-Clustering.pdf | [2020/2021] Clustering]]: Introduction to unsupervised learning and clustering, hierarchical clustering, k-means, DBSCNA, indexes for clustering evaluation. <br />
* [[Media:ML-2021-05-PrincipalComponentAnalysis.pdf | [2020/2021] Principal Component Analysis]]: Principal Component Analysis, Geometric Interpretation, Singular Values Decomposition.<br />
<br />
===Laboratories===<br />
<br />
We will use Python (with Jupyter notebooks) throughout the course, thus we kindly ask you to install the "Anaconda" package to be ready for the labs. Here are the [https://www.anaconda.com/products/individual download links]. You can find a simple Jupyter notebook [[Media:ML2021-test.zip | HERE]] to test if the installation succeeded.<br />
<br />
To open the notebook<br />
* launch the "Anaconda Navigator" app<br />
* launch the "jupyter Notebook" app within the navigator, it should automatically open a webpage (it may take a while)<br />
* on the webpage, navigate on the folder where you downloaded the "lab01.00-TestEnvironment.ipynb" file, and press on the file to open it<br />
* then follow the instruction within the notebook<br />
<br />
If you didn't install anaconda but just jupyter, or if you can't find Anaconda Navigator <br />
* open a shell ("Anaconda Prompt" if you are using Windows)<br />
* move on to the folder where you downloaded "lab01.00-TestEnvironment.ipynb"<br />
* run the "jupyter notebook" command, it should automatically open a webpage<br />
* then on the webpage press on the "lab01.00-TestEnvironment.ipynb" file and follow the instructions within the notebook<br />
<br />
The following are the notebook used in the labs:<br />
*[[Media:ML2122-lab01.zip | [2021/2022] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session including the testing environment ([[Media:ML2122-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab02.zip | [2021/2022] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2122-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab03.zip | [2021/2022] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2122-lab03_solutions_part1.zip |complete version]])<br />
*[[Media:ML2122-lab04.zip | [2021/2022] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2122-lab04_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab05.zip | [2021/2022] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fifth lab session ([[Media:ML2122-lab05_solutions.zip |complete version]])<br />
<!--<br />
*[[Media:ML2021-lab01.zip | [2020/2021] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session ([[Media:ML2021-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab02.zip | [2020/2021] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2021-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab03.zip | [2020/2021] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2021-lab03_solutions_tmp.zip |complete version]])<br />
*[[Media:ML2021-lab04.zip | [2020/2021] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab04_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab05.zip | [2020/2021] Material for the fifth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab05_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab06.zip | [2020/2021] Material for the sixth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab06_solutions.zip |complete version]])<br />
--><br />
<!--<br />
* [[Media:ML-2016-03-AssessingModelAccuracy.pdf | [2016] Statistical Learning and Model Assessment]]: Model Assessment for Regression and Classification, Bias-Variance trade-off, Model complexity and overfitting, K-Nearest Neighbors Classifier vs. Bayes Classifier.<br />
* [[Media:ML-2016-05-LinearClassification.pdf | [2016] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods.<br />
* [[Media:ML-2016-06-SupportVectorMachines.pdf | [2016] Support Vector Machines]]: Discriminative vs. generative methids. Hyperplanes learning and Perceptron. Maximum Margin Classifiers. The Kernel trick and Support Vector Machines.<br />
For exercises and lab material please refer to [http://davide.eynard.it/pattern-analysis-and-machine-intelligence-2015-2016/ Davide Eynard website].<br />
--><br />
<br />
===Additional Resources===<br />
Papers and links useful to integrate the textbook<br />
<br />
* [http://www.ekof.bg.ac.rs/wp-content/uploads/2016/09/Ponavljanje-matematike-Wayne-Winston-Operations-Research-Applications-and-Algorithms-4-edition.pdf Basic Linear Algebra]: "Basic Linear Algebra" chapter from Wayne Winston book "Operations Research Applications and Algorithms (4th ed.)"<br />
* [http://scott.fortmann-roe.com/docs/BiasVariance.html Bias vs. Variance]: "Understanding the Bias-Variance Tradeoff" essay by Scott Fortmann-Roe<br />
* [http://www.onmyphd.com/?p=kkt.karush.kuhn.tucker Karush Kuhn Tucker Conditions]: a short note on their meaning with references to relevant wikipedia pages<br />
* [http://students.brown.edu/seeing-theory/ Seeing Theory]: a website where the basic concepts of probability and statistics are explained in a visual way.<br />
<br />
Python examples to better practice with numpy library<br />
* [https://github.com/Kyubyong/numpy_exercises Some numpy exercises], we did roughly 1, 2, 4, 6, 9, 10, 13<br />
* [https://github.com/rougier/numpy-100 Othen numpy exercises] from simple to complex<br />
* [https://www.w3resource.com/python-exercises/numpy/index-array.php More numpy exercises] from simple to complex<br />
<br />
===Year 2020/2021 Recordings (use at your own risk)===<br />
<br />
As I registered these due to pandemics, I am making them available. They DO NOT REPLACE THIS YEAR classroom lectures which are to be considered as the official material of this year, but they might be useful to double-check your notes.<br />
<br />
* 24/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
* 25/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] <br />
* 03/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off]<br />
* 04/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
* 10/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression]<br />
* 18/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression]<br />
* 25/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression]<br />
* 31/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment]<br />
* 01/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso]<br />
* 08/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression]<br />
* 14/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression]<br />
* 15/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis]<br />
* 29/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
* 06/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] <br />
* 12/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] <br />
* 13/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering]<br />
* 20/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering]<br />
* 27/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering]<br />
* 03/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation]<br />
* 04/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] <br />
<br />
Also, labs are available, however, the teaching assistant this year has changed.<br />
<br />
* 17/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
* 24/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
* 07/04/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
* 05/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
* 19/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
* 26/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
<br />
<!--<br />
===Past Exams and Sample Questions===<br />
For some samples of exams you can check the last year PAMI ones<br />
<br />
* [[Media:2016_02_03_PAMI.pdf |03/02/2016 PAMI Exam]]<br />
* [[Media:2016_02_19_PAMI.pdf |19/02/2016 PAMI Exam]]<br />
* [[Media:2016_07_06_PAMI.pdf |06/07/2016 PAMI Exam]]<br />
* [[Media:2016_09_09_PAMI.pdf |09/09/2016 PAMI Exam]]<br />
* [[Media:2016_09_28_PAMI.pdf |28/09/2016 PAMI Exam]]<br />
--><br />
===Online Resources===<br />
<br />
The following are links to online sources which might be useful to complement the material above<br />
* [https://towardsdatascience.com/linear-algebra-survival-kit-for-machine-learning-94901a62465e An Introduction to Linear Algebra] with numpy examples. It provides the very fundamental definitions, does not cover eigenvalues and eigenvectors.<br />
* [https://www.r-bloggers.com/in-depth-introduction-to-machine-learning-in-15-hours-of-expert-videos/ Statistical Learning MOOC] covering the entire ISL book offered by Trevor Hastie and Rob Tibshirani. Start anytime in self-paced mode.<br />
* [http://math.arizona.edu/~hzhang/math574m.html MATH 574M] University of Arizona Course on ''Statistical Machine Learning and Data Mining''; here you can find slides covering part of the course topics (the reference book for this course is again ''The Elements of Statistical Learning'')<br />
<br />
<!--<br />
== 2013-2014 Homework ==<br />
<br />
The 2013 Homework (alike the 2012 one) is organized as an octave series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
=== Part 1: Linear Classification Methods ===<br />
<br />
* [[Media:homework_pami_classification_2013_2014.pdf | Homework 2013-2014 on Classification]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 17/11 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
=== Part 2: Regression ===<br />
* [[Media:homework_pami_regression_2013_2014.pdf | Homework 2013-2014 Regression]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to malago@di.unimi.it (cc to matteo.matteucci@polimi.it) is Friday 20/12 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:diabete.mat | diabete.mat]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
For any question or doubt please sen us an email as soon as possible.<br />
<br />
'''Note 1:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
<strike>'''Note 2:''' rename the file Diabete.data into diabete.mat ... still fighting with the CSM :-)</strike><br />
<br />
'''Note 3:''' the code has been tested with octave under linux, we suggest to use it not to spend too much time with installing it under windows or using matlab. If you do not have linux installed, try using a live CD as the ubuntu 13.04 live distro ;-)<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at this post<br />
<br />
* [http://davide.eynard.it/2013/12/30/octave-clustering-demo-part-6-more-evaluation/ Homework 2013-2014 on clustering evaluation]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is the end of the course. You have to '''send it to davide.eynard_at_gmail.com Friday 24/01 23:59'''.<br />
<br />
'''Note 1:''' for any doubt or question send an email, as soon as possible, to Davide Eynard so to have a prompt reply and not get stuck during homework execution.<br />
<br />
'''Note 2:''' you have to turn in only the solution of "Ocatave clustering demo part 6", while the other parts can be used as reference to improve your understanding in basic clustering algorithms.<br />
<br />
=== Part 2: Classification ===<br />
<br />
* [[Media:homework_pami_classification_2013.pdf | Homework 2013 Classification]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 23/06 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
<br />
<br />
'''Errata Corrige''': there were a few bugs in the homework text. I have updated the pdf and they were:<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the Fisher projection it is more correct to use only the training data to learn the projection and then we can train and test on the corresponding subsets<br />
<br />
a = FisherProjection(X(training,:),Y(training,:));<br />
reducedX = X*a(:,1);<br />
[mu_0, mu_1, sigma, p_0, p_1] = linearDiscriminantAnalysis_train(reducedX(training), Y(training))<br />
<br />
I forgot to filter for just the training samples when performing Quadratic Discriminant Analysis<br />
<br />
quadX = expandToQuadraticSpace(X);<br />
%check this out!<br />
size(quadX)<br />
beta = linearRegression_train(quadX(training), Y(training));<br />
<br />
And in general you should always train on the training data and test on the testing data ;-).<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at these posts<br />
<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-4-k-medoids/ Homework 2013 on k-medoids]<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-5-hierarchical-clustering/ Homework 2013 on hierarchical clustering]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is '''before the you take the exam''' sending it to davide.eynard_at_gmail.com.<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3:] follow this tutorial and answer the questions from all 5 sub-tutorials.<br />
<br />
== 2012 Homework ==<br />
<br />
The Homework of 2012 organized like an octave/matlab series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
* [[Media:PAMI_homework_2012_1.pdf | Homework 2012 part 1]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to matteucci@elet.polimi.it and malago@elet.polimi.it is Tuesday 5/6 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
'''Note:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
* [[Media:PAMI_homework_2012_2.pdf | Homework 2012 part 2]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade; the deadline to submit the solution by email to matteucci@elet.polimi.it is the day before the exam you decide to attend''' (e.g., if you decide to take the exam on the 26/6 then you need to turn it in by 25/6).<br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Errata Corrige''': there were a few bugs a bug in the homework text. I have updated the pdf and they were:<br />
In the code for loading the data I forgot to remove the first column which you do not need<br />
data = dlmread('SAheart.data',',',1,1);<br />
X = data(:,1:9);<br />
Y = data(:,10);<br />
<br />
In the StratifiedSampling function the sorted verctors should be assigned<br />
% just an ahestetic sorting<br />
testing = sort(testing);<br />
training = sort(training);<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the expansion to quadratic space the starting index for the inner loop should i and not 1. Moreover in some cases it might be possible to have columns which are duplicated (e.g., with boolean attribute); in this case you should not need the robust version of linear regression.<br />
function extendedX = expandToQuadraticSpace(X)<br />
% adds new columns to extendedX; keeps X for other calculations<br />
extendedX = X;<br />
for i=1:size(X, 2)<br />
for j=i:size(X, 2)<br />
newColumn = X(:, i) .* X(:, j);<br />
extendedX = [extendedX newColumn];<br />
end<br />
end<br />
% remove duplicated columns<br />
duplicates = [];<br />
for i=1:size(extendedX, 2)<br />
for j=i+1:size(extendedX, 2)<br />
if(sum(extendedX(:,i)==extendedX(:,j)) == size(X,1))<br />
duplicates = [duplicates j];<br />
end<br />
end<br />
end<br />
extendedX(:,duplicates) = [];<br />
end<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3]: the third part of the homework is '''optional''', so you are not required to complete it. However, if you want to give it a try and use it to understand the topics covered by Davide Eynard in his lectures you are welcome. As usual, the questions in this homework are very close to the ones you will find in classworks, so we suggest to have a look at hose anyway! '''In case you decide to turn it in and have it contribute with a 10% to the grade, the deadline to submit the solution by email to matteucci@elet.polimi.it and davide.eynard@polimi.it is the day before you decide to take the exam''' (e.g., if you decide to take the exam on the 10/7 then you need to turn it in by 9/7)<br />
<br />
'''Note:''' homeworks are meant to let you see (and practice) a little bit with the topics presented during the course. They are evaluated because you spent some time on those and thus you deserve some credit for that ;-)<br />
<br />
== 2011 Homework ==<br />
<br />
Here you can find the homework for the year 2011 and the material you need to complete it. Please read the F.A.Q. below and for any unsolved doubt contact the teachers of the course.<br />
<br />
* [[Media:PAMI_homework_2011_v02.pdf | Homework 2011 v02]] a minor change in the signature of the logistic regression function<br />
* [[Media:PAMI_homework_2011_v01.pdf | Homework 2011 v01]] text with questions and exercises<br />
* [[Media:dataset.txt | Dataset]] for the clustering exercise in csv format<br />
<br />
'''Frequently Asked Questions'''<br />
<br />
* '''''How do I take the square root of a matrix?''''': check the diagonalization approach from [http://en.wikipedia.org/wiki/Square_root_of_a_matrix].<br />
<br />
* '''''How do I compute the chi square statistics?'''': in the slide there is a cut and paste error since e_ij=R_it*C_tj as described here [http://en.wikipedia.org/wiki/Pearson's_chi-square_test]<br />
<br />
* '''''When it is due? In which format?''''': The homework is due on the 29/06 and should be delivered by email. Send us (all the course teachers) the .m files in a zip archive attached to this email and a link to the pdf with the written part (not to flood our mailboxes). <br />
<br />
* '''''Can we do that in groups? How many people per group?''''': Yes, you can work on the homework in groups, but no more than 3 people per group are allowed. Put the names of all homework authors in the pdf and in all the .m files. If you discuss something with other people, w.r.t. the people in your group, point it out in the pdf file as well.<br />
<br />
* '''''Can we ask questions about the exercises or the code?''''': Yes you should! First of all, there might be unclear things in the exercise descriptions and those should be clarified as soon as possible for all (this is why the homework is versioned). But you could ask for help as well, our goal is to have you all solving all the questions and get a high grade ... but we will not do the homework on you behalf ;-)<br />
<br />
* '''''How the optional questions are graded?''''': They compensate for possible errors in the other questions; we suggest to work on them anyway to be sure you get the maximum grading.<br />
<br />
* '''''How the homework will be graded?''''': we are interested in understanding if you understood or not; thus we are not interested in the result, but we want to check how you get to the result. So please: 1) clarify all the assumptions and all the steps in your exercises 2) comment as much as possible your .m files!<br />
<br />
--></div>Matteohttps://chrome.deib.polimi.it/index.php?title=Machine_Learning_Bio&diff=3841Machine Learning Bio2022-05-21T15:18:40Z<p>Matteo: </p>
<hr />
<div>__FORCETOC__<br />
<br />
The following are last-minute news you should be aware of ;-)<br />
* 21/05/2022: The dataset for the second homework is changed!!!<br />
* 19/05/2022: The second homework is out!!!<br />
* 04/05/2022: Changed lecture schedule<br />
* 02/05/2022: Changed deadline first homework -> 11/05/2022 at noon<br />
* 22/04/2022: The first homework is out!!!<br />
* 08/03/2022: Added material for the first lab<br />
* 06/03/2022: Slides from first lectures and last year's recordings updated <br />
* 23/02/2022: Lectures start today!<br />
<!--<br />
* 11/09/2021: Grade of the [[Media:ML2021-Grades_210911.pdf|Summer session + homeworks]] <br />
* 09/07/2021: Grade of the [[Media:ML2021-Grades_210624.pdf|24/06/2021 oral exams]] <br />
* 09/07/2021: Updated Homework + Oral [[Media:ML2021-Conversion.pdf|conversion table]]<br />
* 03/07/2021: Updated Homework available [[Media:ML2021-homework-new.zip|here!!!]]<br />
* 08/06/2021: Updated all videos and all slides from the course.<br />
* 02/06/2021: You can fin the 2020/2021 homework [[Media:ML2021-homework.zip|here!!!]]<br />
* 26/05/2021: The link to the form to request an instance of remote examination for June and July is [https://forms.office.com/r/FUrVt8eZNx here]!<br />
* 09/04/2021: From next week lectures will be back to presence (plus webex streaming)<br />
* 22/03/2021: Added completed material from the last lab plus some exercises ... <br />
* 17/03/2021: Added the material for the lab of today ... <br />
* 10/03/2021: 11/03/2021 lecture has been canceled<br />
* 06/03/2021: website update with linear algebra slides and (working) links to all lectures<br />
* 05/03/2021: Since today we are moved fully online so lectures will happen in my webex room (same holds for labs)<br />
* 24/02/2021: Lectures start today<br />
--><br />
<!--<br />
* 08/08/2020: Grading for all projects and first two calls [[Media:Grades_20200723.pdf|are here!!]] <br />
* 22/06/2020: Grading mechanism explained, check [[Media:ML2020_grading_system.pdf|here a handy recap]] <br />
* 14/06/2020: [[Media:ML2020_homework.zip |Here it come the 2020 homework!!!]]<br />
* 03/06/2020: All slides updated<br />
* 02/05/2020: Updated course schedule and added videos to the previous lectures<br />
* 04/04/2020: Updated schedule and added videos of previous lectures<br />
* 31/03/2020: Updated schedule and added material on linear algebra<br />
* 19/03/2020: Added lab material, both with empty notebooks and final result<br />
* 11/03/2020: Added today's lecture videos and planned next week schedule (To Be Completed)<br />
* 11/03/2020: The course starts today!<br />
* 03/03/2020: The course is going to start soon ...<br />
--><br />
<br />
==Course Aim & Organization==<br />
<br />
The objective of the Machine Learning course is to give an in-depth presentation of the techniques most used for pattern recognition, knowledge discovery, and data analysis/modeling. These techniques are presented both from a theoretical (i.e., statistics and information theory) perspective and a practical one (i.e., coding examples) through the descriptions of algorithms and their implementations in a general-purpose programming language (i.e., python).<br />
<br />
The course presents the classical supervised and unsupervised learning paradigms described and discussed presenting regression, classification, and clustering problems in Bioinformatics. The course is composed of a set of lectures on specific machine learning techniques (e.g., generalized linear regression, logistic regression, linear and quadratic discriminant analysis, support vector machines, k-nearest-neighborhood, clustering, etc.) preceded by the introduction of the Statistical Learning framework which acts as a common reference framework for the entire course.<br />
<br />
===Teachers===<br />
<br />
The course is composed of a blending of lectures and exercises by the course teacher and a teaching assistant.<br />
<br />
* [http://www.deib.polimi.it/ita/personale/dettagli/267262 Matteo Matteucci]: the course teacher <br />
* [https://www.deib.polimi.it/ita/personale/dettagli/1638984 Stefano Samele]: the teaching assistant <br />
<br />
===Course Program===<br />
<br />
The course mostly follows the following book which is also available for download in pdf<br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani<br />
<br />
The course lectures will present the theory and practice of the following:<br />
* Machine Learning and Pattern Classification: the general concepts of Machine Learning and Pattern Recognition are introduced within the framework of Statistical Decision Theory with reference to the bias-variance trade-off and the Bayes classifier;<br />
* Generalized Linear Regression: linear methods for regression will be presented and discussed introducing different techniques (e.g., Linear Regression, Ridge Regression, K-Nearest Neighbors Regression, Non-Linear Regression, etc.) and the most common methodologies for model validation and selection (e.g., AIC, BIC, cross-validation, stepwise feature selection, Lasso, etc.).<br />
* Linear and Non-Linear Classification: generative and discriminative techniques for classification will be described and discussed (e.g., Logistic Regression, Linear and Quadratic Discriminant Analysis, K-Nearest Neighbors, Perceptron Rule, and Support Vector Machines, etc.). Metrics for classifiers evaluation and comparison are presented in this part of the course (e.g., accuracy, precision, recall, ROC, AUC, F-measure, Matthew coefficient).<br />
* Unsupervised Learning: the most common approaches to unsupervised learning are described mostly focusing on clustering methods such as hierarchical clustering, k-means, k-medoids, Mixture of Gaussians, DBSCAN, etc<br />
<br />
These topics will be presented both from a theoretical perspective and a practical one via implementations in the general-purpose programming language python.<br />
<br />
===Detailed course schedule===<br />
<br />
A detailed schedule of the course can be found here; topics are just indicative while days and teachers are correct up to some last-minute change (I will notify you by email). Please note that not all days we have lectures!!<br />
<br />
Note: Lecture timetable interpretation<br />
* On Wednesday, in room 26.02, starts at 15:15 (cum tempore), ends at 18:15<br />
* On Thursday, in room 26.01, starts at 12:15 (cum tempore), ends at 14:15<br />
<br />
<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|23/02/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Machine Learning Intro<br />
|-<br />
|24/02/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Statistical Learning Theory (Ch. 1 ISL)<br />
|-<br />
|02/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Statistical Learning Theory - Bias/Variance Trade-off (Ch. 2 ISL)<br />
|-<br />
|03/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Introduction to Linear Algebra<br />
|-<br />
|09/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Python + Numpy + Bias/Variance<br />
|-<br />
|10/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Simple Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|16/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Multi Variate Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|17/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL) <br />
|-<br />
|23/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Multivariate Linear Regression Laboratory<br />
|-<br />
|24/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Generalized Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|30/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Feature Selection and Model Assessment (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|31/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Ridge Regression and Lasso (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|06/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Generalized Linear Regression and Feature Selection Laboratory<br />
|-<br />
|07/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: KNN and Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|13/04/2022 || Wednesday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|14/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|20/04/2022 || Wednesday || 15:15-18:15 || 26.02 ||Matteo Matteucci || Lecture || Classification: Linear Discriminanr Analysis (Ch. 4 ISL)<br />
|-<br />
|21/04/2022 || Thursday || 12:15 - 14:15 || 26.01 || Matteo Matteucci || Lecture || Evaluation methods for classification<br />
|-<br />
|27/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Logistic Regression and LDA Laboratory<br />
|-<br />
|28/04/2022 || Thursday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|04/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || The Perceptron (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|06/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL) <br />
|-<br />
|11/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Unsupervised Learning and Clustering (Ch. 10 ISL)<br />
|-<br />
|12/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Clustering (Ch. 10 ISL)<br />
|-<br />
|18/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || SVM and Classifiers Evaluation Laboratory<br />
|-<br />
|19/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|25/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Clustering Laboratory<br />
|-<br />
|26/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|01/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Clustering Evaluation<br />
|-<br />
|02/06/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|08/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Principal Component Analysis (Ch. 10 ISL)<br />
|}<br />
<br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|24/02/2021 || Wednesday || 15:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
|-<br />
|25/02/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] (Ch. 1 ISL)<br />
|-<br />
|03/03/2021 || Wednesday || 14:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off] (Ch. 2 ISL)<br />
|-<br />
|04/03/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
|-<br />
|10/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|11/03/2021 || Thursday || --- || --- || --- || ---|| --- No lecture ---<br />
|-<br />
|17/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
|-<br />
|18/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|24/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
|-<br />
|25/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|31/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|01/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|07/04/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
|-<br />
|08/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|14/04/2021 || Wednesday || '''15:15-18:15''' || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|15/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis] (Ch. 4 ISL)<br />
|-<br />
|22/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|23/04/2021 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|28/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|29/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
|-<br />
|05/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
|-<br />
|06/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|12/05/2021 || Wednesday || 14:15-18:15 || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|13/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering] (Ch. 10 ISL)<br />
|-<br />
|19/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
|-<br />
|20/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering] (Ch. 10 ISL)<br />
|-<br />
|26/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
|-<br />
|27/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering] (Ch. 10 ISL)<br />
|-<br />
|02/06/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|03/06/2021 || Thursday || 08:15-11:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|04/06/2021 || Friday || 14:15-17:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|11/03/2020 || Wednesday || 14:15 - 18:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3565a411-bed7-4b20-9dd6-00ee8b9ddd54 Course Introduction], [https://web.microsoftstream.com/video/4a702565-386d-4bed-a0c1-9d1daa015703 Introduction to Machine Learning], and [https://web.microsoftstream.com/video/cef9a912-ee47-4254-8f26-318a6a014424 Statistical Machine Learning] (Ch. 1 ISL)<br />
|-<br />
|12/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/389145d3-c3e5-48c2-bf82-d7877bf14b8c Statistical Decision Theory and Bias-Variance trade off] (Ch. 2 ISL)<br />
|-<br />
|18/03/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/bb2155d6-a6f2-4f82-af48-3ceb22951c4b Python + Numpy + Bias/Variance] Laboratory<br />
|-<br />
|19/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b0359dad-971c-412d-8508-fde45e1dc3fe Statistical Decision Theory and Bias-Variance trade off (continued)] (Ch. 2 ISL)<br />
|-<br />
|25/03/2017 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f88827c9-0994-4d3f-80bf-1c9b6637ba18 Simple Linear Regression and Multivariate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|26/03/2017 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/deb2b3f5-d90d-47b8-b309-1ab88979f805 Multivariate Linear Regression (continued)] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|01/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/da0e35db-6995-412a-99ad-f409f0a6752d Multivariae Linear Regression (Part 1)] [https://web.microsoftstream.com/video/8defdff7-ae83-4753-a353-3d39194e63ac (Part 2)] Laboratory<br />
|-<br />
|02/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/c81f59c8-7023-4206-a771-8be062b7cb21 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|08/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/0255cfa0-98de-4465-a8bf-07c93e0974ee Issues with Linear Regression and Generalized Linear Regression] and [https://web.microsoftstream.com/video/e3392148-f1ee-426d-a271-3d8fcf11008a Feature Selection] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|09/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/03656a6b-46c7-483e-9263-0036144adb00 Feature Selection (continued)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|15/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/58093db6-f365-4184-8ce0-c12c03a1589f Generalized Linear Regression and Feature Selection (Part1)] [https://web.microsoftstream.com/video/52b0d7f5-a725-4406-aab3-3be5145d950f (Part 2)] Laboratory<br />
|-<br />
|16/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1565c508-4448-4678-a9e4-4ff411684227 Feature Selection (LASSO)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|22/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d04083a9-8961-4448-bcf2-0576d9dccf4c Classification by KNN (Part 1)] and [https://web.microsoftstream.com/video/c56ef675-486a-425c-819d-404868e07906 Logistic Regression (Part 2)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|23/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3a5f66b1-80d2-4ee5-ba14-7757ae662c97 Classification by Logistic Regression (continued)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|29/04/2020 || Wednesday || 14:15 - 17:15 || --- || --- || --- || --- No Lecture (Laurea) ---<br />
|-<br />
|30/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/a171bc2a-35e7-42c7-bdd0-d295ecfd7e26 Classification by Linear Discriminant Analysis] (Ch. 4 ISL)<br />
|-<br />
|06/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/cef18863-e3fd-481e-bcad-a18455796fd7 Classification via Logistic Regression, and LDA Laboratory (Part 1)] and [https://web.microsoftstream.com/video/670b7f72-5b6b-4168-9f1c-211a9ad25f48 (Part 2)]<br />
|-<br />
|07/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b2ed8ca0-c0c0-4c1a-836d-b2ffee20d85e Evaluation Methods for Classification]<br />
|-<br />
|13/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/2b881d7d-d11e-4432-8873-973bc36eeb61 Perceptron Learning] and [https://web.microsoftstream.com/video/00564932-919a-49a1-9fa5-eb7706640781 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|14/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b72fa8de-f98d-43cf-9609-5833625a4b5c Support Vector Machines and Kernel Trick] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|20/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/fab1f62e-cea0-4cc9-9366-0ccd6bcd161b Classification (SVM and classifiers evaluation) Laboratory (Part 1)] and [https://web.microsoftstream.com/video/130b806d-5390-4321-9d05-f63e079f30a1 (Part 2)]<br />
|-<br />
|21/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1125b85e-f4a1-49d1-991f-333fff893a1e Introduction to Unsupervised Learning] (Ch. 10 ISL)<br />
|-<br />
|27/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d8d0efb5-adfb-4376-afe3-26afb7ffd664 Clustering: Hierachical, k-means, and DBSCAN (Part 1)] and [https://web.microsoftstream.com/video/b7307896-bff7-4fd0-973f-d37fd7f91e13 (Part 2)] (Ch. 10 ISL)<br />
|-<br />
|28/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3f2975c2-1143-4870-8aed-a1a06382be14 Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|03/06/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/0fa04b48-f8c3-488b-bfab-92547d3a9c38 Clustering Laboratory (Part 1)] and [https://web.microsoftstream.com/video/24a40515-afdd-4cca-9b62-19e544c7e12e (Part 2)]<br />
|-<br />
|04/06/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f58132ba-afd3-47ce-89c8-ba16782d8f37 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
|-<br />
|27/11/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Classification by Linear Discriminant Analysis (Ch. 4 ISL)<br />
|-<br />
|03/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Exercises on Classification by Linear Discriminant Analysis<br />
|-<br />
|04/12/2017 || Tuesday || --- || --- || --- || No Lecture <br />
|-<br />
|10/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Clustering: Intro, k-means and the alike, GMM, and hierachical<br />
|-<br />
|11/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Davide Eynard || Clustering: Density-based, Spectral + Evaluation<br />
|-<br />
|14/12/2017 || Friday || 10:15 - 13:15 || TBD || Matteo Matteucci || Classification: from generative to discriminative approaches (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|17/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|18/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|}<br />
--><br />
Chapters are intended as complete except for<br />
* Ch.4 ESL: Section 4.5<br />
* Ch.12 ESL: Sections 12.1, 12.2, 12.3<br />
* Ch.9 ISL: Sections 9.1, 9.2, 9.3<br />
<br />
===Course Evaluation===<br />
<br />
The course evaluation is composed by two parts:<br />
<br />
* HW: Homework with exercises covering the whole program (up to 6 points)<br />
* OR: An oral discussion covering the whole program (up to 26 points)<br />
<br />
the final score will be the sum of HW (not compulsory) and OR scores. You will get the oral grade as a mark in the scale of 30 up to 32/30 which you have to multiply by 0.8125 and then you add to it the score of the project. For your convenience here it is [[Media:ML2021-Conversion.pdf|a conversion table]] with the final mark in case you do not turn in the project or you get the whole 6 marks in the project.<br />
<br />
====Homework #1 2021/2022====<br />
<br />
The first project asks you to develop a regression model on the [[Media:ML-2122-HW1.zip | Forest Fires Data Set]]. The goal of the model is to predict, given a set of features the burned area of forest fires. The project should focus on investigating the part of features selection for the regression task to understand the relationships between the different variables involved fully. <br />
An accurate and helpful description of the dataset is included in the forestfire.names file.<br />
<br />
The project should consist of an executable python notebook, sufficiently commented. Most of the cells should be adequately followed or preceded by an explanation of what you are doing, why, what the output is, how you interpret it, and so on.<br />
<br />
You can submit your notebook via email at stefano.samele@polimi.it. The deadline is 11/05/22 at midday CET.<br />
The notebook should already display all the cells' outputs. A copy and a re-execution will be performed to evaluate your work: we need to be sure your code is actually executable and displays consistent results.<br />
<br />
You can attend the project in a group of maximum two. Scores (0-1-2, with half points) will be assigned based on the ability to organize the investigation and the code, adopt relevant methodologies presented during laboratories, understand and interpret results, and comply with project requests.<br />
<br />
====Homework #2 2021/2022====<br />
<br />
The second project asks you to develop a classification model for the [[Media:ML-2122-HW2.zip | Autism Screening Adult Data Set]]. The task consists in predicting whether the patient is affected by an Autistic Spectrum Disorder, based on a set of specific features. The goal of the project is to build, given the set of models explained during the laboratories, the best fit for the task. <br />
<br />
You can submit your notebook via email at stefano.samele@polimi.it. The deadline is 01/06/22 at midday CET.<br />
Please rename your file as name_surname_stuedentidnumber.<br />
<br />
For any other information please refer to the previous project announcement.<br />
<br />
====Homework #3 2021/2022====<br />
<br />
TDB<br />
<br />
==Teaching Material (the textbook)== <br />
<br />
Lectures will be based on material taken from the book. <br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani<br />
<br />
If you are interested in a more deep treatment of the topics you can refer to the following book from the same authors<br />
<br />
* [http://www-stat.stanford.edu/~tibs/ElemStatLearn/index.html The Elements of Statistical Learning: Data Mining, Inference, and Prediction.] by Trevor Hastie, Robert Tibshirani, and Jerome Friedman.<br />
<br />
Some additional material that could be used to prepare the oral examination will be provided together with the past homeworks.<br />
<br />
===Teacher Slides ===<br />
<br />
In the following you can find the lecture slides used by the teacher and the teaching assistants during classes.<br />
<br />
* [[Media:ML-2020-A0-LinearAlgebraBasics.pdf | [2020/2021] Linear Algebra Basics]]: Basic elements of linear algebra, e.g., vectors, matrices, basis, span, etc.<br />
* [[Media:ML-2122-00-Intro.pdf | [2021/2022] Course introduction]]: introductory slides of the course with useful information about the grading, and the course logistics. Some examples from supervised and unsupervised learning. Regression, classification, clustering terminology and examples.<br />
* [[Media:ML-2122-01-StatisticalLearning.pdf | [2021/2022] Statistical Learning Introduction]]: Statistical Learning definition, rationale, and trade-offs (e.g., prediction vs. inference, parametric vs non parametric models, flexibility vs. interpretability, etc.)<br />
* [[Media:ML-2122-02-LinearRegression.pdf | [2021/2022] Linear Regression]]: Simple Linear Regression and Multiple Linear Regression. Generalized Linear models. Cross-validation techniques. Feature selection. Ridge Regression and Lasso.<br />
* [[Media:ML-2021-03-LinearClassification.pdf | [2020/2021] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods. Discriminative vs. generative methods. Support Vector Machines. <br />
* [[Media:ML-2021-04-Clustering.pdf | [2020/2021] Clustering]]: Introduction to unsupervised learning and clustering, hierarchical clustering, k-means, DBSCNA, indexes for clustering evaluation. <br />
* [[Media:ML-2021-05-PrincipalComponentAnalysis.pdf | [2020/2021] Principal Component Analysis]]: Principal Component Analysis, Geometric Interpretation, Singular Values Decomposition.<br />
<br />
===Laboratories===<br />
<br />
We will use Python (with Jupyter notebooks) throughout the course, thus we kindly ask you to install the "Anaconda" package to be ready for the labs. Here are the [https://www.anaconda.com/products/individual download links]. You can find a simple Jupyter notebook [[Media:ML2021-test.zip | HERE]] to test if the installation succeeded.<br />
<br />
To open the notebook<br />
* launch the "Anaconda Navigator" app<br />
* launch the "jupyter Notebook" app within the navigator, it should automatically open a webpage (it may take a while)<br />
* on the webpage, navigate on the folder where you downloaded the "lab01.00-TestEnvironment.ipynb" file, and press on the file to open it<br />
* then follow the instruction within the notebook<br />
<br />
If you didn't install anaconda but just jupyter, or if you can't find Anaconda Navigator <br />
* open a shell ("Anaconda Prompt" if you are using Windows)<br />
* move on to the folder where you downloaded "lab01.00-TestEnvironment.ipynb"<br />
* run the "jupyter notebook" command, it should automatically open a webpage<br />
* then on the webpage press on the "lab01.00-TestEnvironment.ipynb" file and follow the instructions within the notebook<br />
<br />
The following are the notebook used in the labs:<br />
*[[Media:ML2122-lab01.zip | [2021/2022] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session including the testing environment ([[Media:ML2122-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab02.zip | [2021/2022] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2122-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab03.zip | [2021/2022] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2122-lab03_solutions_part1.zip |complete version]])<br />
*[[Media:ML2122-lab04.zip | [2021/2022] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2122-lab04_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab05.zip | [2021/2022] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fifth lab session ([[Media:ML2122-lab05_solutions.zip |complete version]])<br />
<!--<br />
*[[Media:ML2021-lab01.zip | [2020/2021] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session ([[Media:ML2021-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab02.zip | [2020/2021] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2021-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab03.zip | [2020/2021] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2021-lab03_solutions_tmp.zip |complete version]])<br />
*[[Media:ML2021-lab04.zip | [2020/2021] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab04_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab05.zip | [2020/2021] Material for the fifth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab05_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab06.zip | [2020/2021] Material for the sixth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab06_solutions.zip |complete version]])<br />
--><br />
<!--<br />
* [[Media:ML-2016-03-AssessingModelAccuracy.pdf | [2016] Statistical Learning and Model Assessment]]: Model Assessment for Regression and Classification, Bias-Variance trade-off, Model complexity and overfitting, K-Nearest Neighbors Classifier vs. Bayes Classifier.<br />
* [[Media:ML-2016-05-LinearClassification.pdf | [2016] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods.<br />
* [[Media:ML-2016-06-SupportVectorMachines.pdf | [2016] Support Vector Machines]]: Discriminative vs. generative methids. Hyperplanes learning and Perceptron. Maximum Margin Classifiers. The Kernel trick and Support Vector Machines.<br />
For exercises and lab material please refer to [http://davide.eynard.it/pattern-analysis-and-machine-intelligence-2015-2016/ Davide Eynard website].<br />
--><br />
<br />
===Additional Resources===<br />
Papers and links useful to integrate the textbook<br />
<br />
* [http://www.ekof.bg.ac.rs/wp-content/uploads/2016/09/Ponavljanje-matematike-Wayne-Winston-Operations-Research-Applications-and-Algorithms-4-edition.pdf Basic Linear Algebra]: "Basic Linear Algebra" chapter from Wayne Winston book "Operations Research Applications and Algorithms (4th ed.)"<br />
* [http://scott.fortmann-roe.com/docs/BiasVariance.html Bias vs. Variance]: "Understanding the Bias-Variance Tradeoff" essay by Scott Fortmann-Roe<br />
* [http://www.onmyphd.com/?p=kkt.karush.kuhn.tucker Karush Kuhn Tucker Conditions]: a short note on their meaning with references to relevant wikipedia pages<br />
* [http://students.brown.edu/seeing-theory/ Seeing Theory]: a website where the basic concepts of probability and statistics are explained in a visual way.<br />
<br />
Python examples to better practice with numpy library<br />
* [https://github.com/Kyubyong/numpy_exercises Some numpy exercises], we did roughly 1, 2, 4, 6, 9, 10, 13<br />
* [https://github.com/rougier/numpy-100 Othen numpy exercises] from simple to complex<br />
* [https://www.w3resource.com/python-exercises/numpy/index-array.php More numpy exercises] from simple to complex<br />
<br />
===Year 2020/2021 Recordings (use at your own risk)===<br />
<br />
As I registered these due to pandemics, I am making them available. They DO NOT REPLACE THIS YEAR classroom lectures which are to be considered as the official material of this year, but they might be useful to double-check your notes.<br />
<br />
* 24/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
* 25/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] <br />
* 03/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off]<br />
* 04/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
* 10/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression]<br />
* 18/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression]<br />
* 25/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression]<br />
* 31/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment]<br />
* 01/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso]<br />
* 08/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression]<br />
* 14/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression]<br />
* 15/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis]<br />
* 29/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
* 06/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] <br />
* 12/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] <br />
* 13/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering]<br />
* 20/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering]<br />
* 27/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering]<br />
* 03/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation]<br />
* 04/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] <br />
<br />
Also, labs are available, however, the teaching assistant this year has changed.<br />
<br />
* 17/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
* 24/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
* 07/04/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
* 05/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
* 19/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
* 26/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
<br />
<!--<br />
===Past Exams and Sample Questions===<br />
For some samples of exams you can check the last year PAMI ones<br />
<br />
* [[Media:2016_02_03_PAMI.pdf |03/02/2016 PAMI Exam]]<br />
* [[Media:2016_02_19_PAMI.pdf |19/02/2016 PAMI Exam]]<br />
* [[Media:2016_07_06_PAMI.pdf |06/07/2016 PAMI Exam]]<br />
* [[Media:2016_09_09_PAMI.pdf |09/09/2016 PAMI Exam]]<br />
* [[Media:2016_09_28_PAMI.pdf |28/09/2016 PAMI Exam]]<br />
--><br />
===Online Resources===<br />
<br />
The following are links to online sources which might be useful to complement the material above<br />
* [https://towardsdatascience.com/linear-algebra-survival-kit-for-machine-learning-94901a62465e An Introduction to Linear Algebra] with numpy examples. It provides the very fundamental definitions, does not cover eigenvalues and eigenvectors.<br />
* [https://www.r-bloggers.com/in-depth-introduction-to-machine-learning-in-15-hours-of-expert-videos/ Statistical Learning MOOC] covering the entire ISL book offered by Trevor Hastie and Rob Tibshirani. Start anytime in self-paced mode.<br />
* [http://math.arizona.edu/~hzhang/math574m.html MATH 574M] University of Arizona Course on ''Statistical Machine Learning and Data Mining''; here you can find slides covering part of the course topics (the reference book for this course is again ''The Elements of Statistical Learning'')<br />
<br />
<!--<br />
== 2013-2014 Homework ==<br />
<br />
The 2013 Homework (alike the 2012 one) is organized as an octave series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
=== Part 1: Linear Classification Methods ===<br />
<br />
* [[Media:homework_pami_classification_2013_2014.pdf | Homework 2013-2014 on Classification]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 17/11 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
=== Part 2: Regression ===<br />
* [[Media:homework_pami_regression_2013_2014.pdf | Homework 2013-2014 Regression]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to malago@di.unimi.it (cc to matteo.matteucci@polimi.it) is Friday 20/12 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:diabete.mat | diabete.mat]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
For any question or doubt please sen us an email as soon as possible.<br />
<br />
'''Note 1:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
<strike>'''Note 2:''' rename the file Diabete.data into diabete.mat ... still fighting with the CSM :-)</strike><br />
<br />
'''Note 3:''' the code has been tested with octave under linux, we suggest to use it not to spend too much time with installing it under windows or using matlab. If you do not have linux installed, try using a live CD as the ubuntu 13.04 live distro ;-)<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at this post<br />
<br />
* [http://davide.eynard.it/2013/12/30/octave-clustering-demo-part-6-more-evaluation/ Homework 2013-2014 on clustering evaluation]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is the end of the course. You have to '''send it to davide.eynard_at_gmail.com Friday 24/01 23:59'''.<br />
<br />
'''Note 1:''' for any doubt or question send an email, as soon as possible, to Davide Eynard so to have a prompt reply and not get stuck during homework execution.<br />
<br />
'''Note 2:''' you have to turn in only the solution of "Ocatave clustering demo part 6", while the other parts can be used as reference to improve your understanding in basic clustering algorithms.<br />
<br />
=== Part 2: Classification ===<br />
<br />
* [[Media:homework_pami_classification_2013.pdf | Homework 2013 Classification]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 23/06 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
<br />
<br />
'''Errata Corrige''': there were a few bugs in the homework text. I have updated the pdf and they were:<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the Fisher projection it is more correct to use only the training data to learn the projection and then we can train and test on the corresponding subsets<br />
<br />
a = FisherProjection(X(training,:),Y(training,:));<br />
reducedX = X*a(:,1);<br />
[mu_0, mu_1, sigma, p_0, p_1] = linearDiscriminantAnalysis_train(reducedX(training), Y(training))<br />
<br />
I forgot to filter for just the training samples when performing Quadratic Discriminant Analysis<br />
<br />
quadX = expandToQuadraticSpace(X);<br />
%check this out!<br />
size(quadX)<br />
beta = linearRegression_train(quadX(training), Y(training));<br />
<br />
And in general you should always train on the training data and test on the testing data ;-).<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at these posts<br />
<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-4-k-medoids/ Homework 2013 on k-medoids]<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-5-hierarchical-clustering/ Homework 2013 on hierarchical clustering]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is '''before the you take the exam''' sending it to davide.eynard_at_gmail.com.<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3:] follow this tutorial and answer the questions from all 5 sub-tutorials.<br />
<br />
== 2012 Homework ==<br />
<br />
The Homework of 2012 organized like an octave/matlab series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
* [[Media:PAMI_homework_2012_1.pdf | Homework 2012 part 1]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to matteucci@elet.polimi.it and malago@elet.polimi.it is Tuesday 5/6 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
'''Note:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
* [[Media:PAMI_homework_2012_2.pdf | Homework 2012 part 2]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade; the deadline to submit the solution by email to matteucci@elet.polimi.it is the day before the exam you decide to attend''' (e.g., if you decide to take the exam on the 26/6 then you need to turn it in by 25/6).<br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Errata Corrige''': there were a few bugs a bug in the homework text. I have updated the pdf and they were:<br />
In the code for loading the data I forgot to remove the first column which you do not need<br />
data = dlmread('SAheart.data',',',1,1);<br />
X = data(:,1:9);<br />
Y = data(:,10);<br />
<br />
In the StratifiedSampling function the sorted verctors should be assigned<br />
% just an ahestetic sorting<br />
testing = sort(testing);<br />
training = sort(training);<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the expansion to quadratic space the starting index for the inner loop should i and not 1. Moreover in some cases it might be possible to have columns which are duplicated (e.g., with boolean attribute); in this case you should not need the robust version of linear regression.<br />
function extendedX = expandToQuadraticSpace(X)<br />
% adds new columns to extendedX; keeps X for other calculations<br />
extendedX = X;<br />
for i=1:size(X, 2)<br />
for j=i:size(X, 2)<br />
newColumn = X(:, i) .* X(:, j);<br />
extendedX = [extendedX newColumn];<br />
end<br />
end<br />
% remove duplicated columns<br />
duplicates = [];<br />
for i=1:size(extendedX, 2)<br />
for j=i+1:size(extendedX, 2)<br />
if(sum(extendedX(:,i)==extendedX(:,j)) == size(X,1))<br />
duplicates = [duplicates j];<br />
end<br />
end<br />
end<br />
extendedX(:,duplicates) = [];<br />
end<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3]: the third part of the homework is '''optional''', so you are not required to complete it. However, if you want to give it a try and use it to understand the topics covered by Davide Eynard in his lectures you are welcome. As usual, the questions in this homework are very close to the ones you will find in classworks, so we suggest to have a look at hose anyway! '''In case you decide to turn it in and have it contribute with a 10% to the grade, the deadline to submit the solution by email to matteucci@elet.polimi.it and davide.eynard@polimi.it is the day before you decide to take the exam''' (e.g., if you decide to take the exam on the 10/7 then you need to turn it in by 9/7)<br />
<br />
'''Note:''' homeworks are meant to let you see (and practice) a little bit with the topics presented during the course. They are evaluated because you spent some time on those and thus you deserve some credit for that ;-)<br />
<br />
== 2011 Homework ==<br />
<br />
Here you can find the homework for the year 2011 and the material you need to complete it. Please read the F.A.Q. below and for any unsolved doubt contact the teachers of the course.<br />
<br />
* [[Media:PAMI_homework_2011_v02.pdf | Homework 2011 v02]] a minor change in the signature of the logistic regression function<br />
* [[Media:PAMI_homework_2011_v01.pdf | Homework 2011 v01]] text with questions and exercises<br />
* [[Media:dataset.txt | Dataset]] for the clustering exercise in csv format<br />
<br />
'''Frequently Asked Questions'''<br />
<br />
* '''''How do I take the square root of a matrix?''''': check the diagonalization approach from [http://en.wikipedia.org/wiki/Square_root_of_a_matrix].<br />
<br />
* '''''How do I compute the chi square statistics?'''': in the slide there is a cut and paste error since e_ij=R_it*C_tj as described here [http://en.wikipedia.org/wiki/Pearson's_chi-square_test]<br />
<br />
* '''''When it is due? In which format?''''': The homework is due on the 29/06 and should be delivered by email. Send us (all the course teachers) the .m files in a zip archive attached to this email and a link to the pdf with the written part (not to flood our mailboxes). <br />
<br />
* '''''Can we do that in groups? How many people per group?''''': Yes, you can work on the homework in groups, but no more than 3 people per group are allowed. Put the names of all homework authors in the pdf and in all the .m files. If you discuss something with other people, w.r.t. the people in your group, point it out in the pdf file as well.<br />
<br />
* '''''Can we ask questions about the exercises or the code?''''': Yes you should! First of all, there might be unclear things in the exercise descriptions and those should be clarified as soon as possible for all (this is why the homework is versioned). But you could ask for help as well, our goal is to have you all solving all the questions and get a high grade ... but we will not do the homework on you behalf ;-)<br />
<br />
* '''''How the optional questions are graded?''''': They compensate for possible errors in the other questions; we suggest to work on them anyway to be sure you get the maximum grading.<br />
<br />
* '''''How the homework will be graded?''''': we are interested in understanding if you understood or not; thus we are not interested in the result, but we want to check how you get to the result. So please: 1) clarify all the assumptions and all the steps in your exercises 2) comment as much as possible your .m files!<br />
<br />
--></div>Matteohttps://chrome.deib.polimi.it/index.php?title=File:ML2122-lab05_solutions.zip&diff=3840File:ML2122-lab05 solutions.zip2022-05-19T10:32:12Z<p>Matteo: </p>
<hr />
<div></div>Matteohttps://chrome.deib.polimi.it/index.php?title=Machine_Learning_Bio&diff=3839Machine Learning Bio2022-05-19T07:32:47Z<p>Matteo: </p>
<hr />
<div>__FORCETOC__<br />
<br />
The following are last-minute news you should be aware of ;-)<br />
* 19/05/2022: The second homework is out!!!<br />
* 04/05/2022: Changed lecture schedule<br />
* 02/05/2022: Changed deadline first homework -> 11/05/2022 at noon<br />
* 22/04/2022: The first homework is out!!!<br />
* 08/03/2022: Added material for the first lab<br />
* 06/03/2022: Slides from first lectures and last year's recordings updated <br />
* 23/02/2022: Lectures start today!<br />
<!--<br />
* 11/09/2021: Grade of the [[Media:ML2021-Grades_210911.pdf|Summer session + homeworks]] <br />
* 09/07/2021: Grade of the [[Media:ML2021-Grades_210624.pdf|24/06/2021 oral exams]] <br />
* 09/07/2021: Updated Homework + Oral [[Media:ML2021-Conversion.pdf|conversion table]]<br />
* 03/07/2021: Updated Homework available [[Media:ML2021-homework-new.zip|here!!!]]<br />
* 08/06/2021: Updated all videos and all slides from the course.<br />
* 02/06/2021: You can fin the 2020/2021 homework [[Media:ML2021-homework.zip|here!!!]]<br />
* 26/05/2021: The link to the form to request an instance of remote examination for June and July is [https://forms.office.com/r/FUrVt8eZNx here]!<br />
* 09/04/2021: From next week lectures will be back to presence (plus webex streaming)<br />
* 22/03/2021: Added completed material from the last lab plus some exercises ... <br />
* 17/03/2021: Added the material for the lab of today ... <br />
* 10/03/2021: 11/03/2021 lecture has been canceled<br />
* 06/03/2021: website update with linear algebra slides and (working) links to all lectures<br />
* 05/03/2021: Since today we are moved fully online so lectures will happen in my webex room (same holds for labs)<br />
* 24/02/2021: Lectures start today<br />
--><br />
<!--<br />
* 08/08/2020: Grading for all projects and first two calls [[Media:Grades_20200723.pdf|are here!!]] <br />
* 22/06/2020: Grading mechanism explained, check [[Media:ML2020_grading_system.pdf|here a handy recap]] <br />
* 14/06/2020: [[Media:ML2020_homework.zip |Here it come the 2020 homework!!!]]<br />
* 03/06/2020: All slides updated<br />
* 02/05/2020: Updated course schedule and added videos to the previous lectures<br />
* 04/04/2020: Updated schedule and added videos of previous lectures<br />
* 31/03/2020: Updated schedule and added material on linear algebra<br />
* 19/03/2020: Added lab material, both with empty notebooks and final result<br />
* 11/03/2020: Added today's lecture videos and planned next week schedule (To Be Completed)<br />
* 11/03/2020: The course starts today!<br />
* 03/03/2020: The course is going to start soon ...<br />
--><br />
<br />
==Course Aim & Organization==<br />
<br />
The objective of the Machine Learning course is to give an in-depth presentation of the techniques most used for pattern recognition, knowledge discovery, and data analysis/modeling. These techniques are presented both from a theoretical (i.e., statistics and information theory) perspective and a practical one (i.e., coding examples) through the descriptions of algorithms and their implementations in a general-purpose programming language (i.e., python).<br />
<br />
The course presents the classical supervised and unsupervised learning paradigms described and discussed presenting regression, classification, and clustering problems in Bioinformatics. The course is composed of a set of lectures on specific machine learning techniques (e.g., generalized linear regression, logistic regression, linear and quadratic discriminant analysis, support vector machines, k-nearest-neighborhood, clustering, etc.) preceded by the introduction of the Statistical Learning framework which acts as a common reference framework for the entire course.<br />
<br />
===Teachers===<br />
<br />
The course is composed of a blending of lectures and exercises by the course teacher and a teaching assistant.<br />
<br />
* [http://www.deib.polimi.it/ita/personale/dettagli/267262 Matteo Matteucci]: the course teacher <br />
* [https://www.deib.polimi.it/ita/personale/dettagli/1638984 Stefano Samele]: the teaching assistant <br />
<br />
===Course Program===<br />
<br />
The course mostly follows the following book which is also available for download in pdf<br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani<br />
<br />
The course lectures will present the theory and practice of the following:<br />
* Machine Learning and Pattern Classification: the general concepts of Machine Learning and Pattern Recognition are introduced within the framework of Statistical Decision Theory with reference to the bias-variance trade-off and the Bayes classifier;<br />
* Generalized Linear Regression: linear methods for regression will be presented and discussed introducing different techniques (e.g., Linear Regression, Ridge Regression, K-Nearest Neighbors Regression, Non-Linear Regression, etc.) and the most common methodologies for model validation and selection (e.g., AIC, BIC, cross-validation, stepwise feature selection, Lasso, etc.).<br />
* Linear and Non-Linear Classification: generative and discriminative techniques for classification will be described and discussed (e.g., Logistic Regression, Linear and Quadratic Discriminant Analysis, K-Nearest Neighbors, Perceptron Rule, and Support Vector Machines, etc.). Metrics for classifiers evaluation and comparison are presented in this part of the course (e.g., accuracy, precision, recall, ROC, AUC, F-measure, Matthew coefficient).<br />
* Unsupervised Learning: the most common approaches to unsupervised learning are described mostly focusing on clustering methods such as hierarchical clustering, k-means, k-medoids, Mixture of Gaussians, DBSCAN, etc<br />
<br />
These topics will be presented both from a theoretical perspective and a practical one via implementations in the general-purpose programming language python.<br />
<br />
===Detailed course schedule===<br />
<br />
A detailed schedule of the course can be found here; topics are just indicative while days and teachers are correct up to some last-minute change (I will notify you by email). Please note that not all days we have lectures!!<br />
<br />
Note: Lecture timetable interpretation<br />
* On Wednesday, in room 26.02, starts at 15:15 (cum tempore), ends at 18:15<br />
* On Thursday, in room 26.01, starts at 12:15 (cum tempore), ends at 14:15<br />
<br />
<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|23/02/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Machine Learning Intro<br />
|-<br />
|24/02/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Statistical Learning Theory (Ch. 1 ISL)<br />
|-<br />
|02/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Statistical Learning Theory - Bias/Variance Trade-off (Ch. 2 ISL)<br />
|-<br />
|03/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Introduction to Linear Algebra<br />
|-<br />
|09/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Python + Numpy + Bias/Variance<br />
|-<br />
|10/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Simple Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|16/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Multi Variate Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|17/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL) <br />
|-<br />
|23/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Multivariate Linear Regression Laboratory<br />
|-<br />
|24/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Generalized Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|30/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Feature Selection and Model Assessment (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|31/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Ridge Regression and Lasso (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|06/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Generalized Linear Regression and Feature Selection Laboratory<br />
|-<br />
|07/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: KNN and Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|13/04/2022 || Wednesday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|14/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|20/04/2022 || Wednesday || 15:15-18:15 || 26.02 ||Matteo Matteucci || Lecture || Classification: Linear Discriminanr Analysis (Ch. 4 ISL)<br />
|-<br />
|21/04/2022 || Thursday || 12:15 - 14:15 || 26.01 || Matteo Matteucci || Lecture || Evaluation methods for classification<br />
|-<br />
|27/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Logistic Regression and LDA Laboratory<br />
|-<br />
|28/04/2022 || Thursday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|04/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || The Perceptron (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|06/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL) <br />
|-<br />
|11/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Unsupervised Learning and Clustering (Ch. 10 ISL)<br />
|-<br />
|12/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Clustering (Ch. 10 ISL)<br />
|-<br />
|18/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || SVM and Classifiers Evaluation Laboratory<br />
|-<br />
|19/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|25/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Clustering Laboratory<br />
|-<br />
|26/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|01/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Clustering Evaluation<br />
|-<br />
|02/06/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|08/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Principal Component Analysis (Ch. 10 ISL)<br />
|}<br />
<br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|24/02/2021 || Wednesday || 15:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
|-<br />
|25/02/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] (Ch. 1 ISL)<br />
|-<br />
|03/03/2021 || Wednesday || 14:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off] (Ch. 2 ISL)<br />
|-<br />
|04/03/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
|-<br />
|10/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|11/03/2021 || Thursday || --- || --- || --- || ---|| --- No lecture ---<br />
|-<br />
|17/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
|-<br />
|18/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|24/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
|-<br />
|25/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|31/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|01/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|07/04/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
|-<br />
|08/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|14/04/2021 || Wednesday || '''15:15-18:15''' || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|15/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis] (Ch. 4 ISL)<br />
|-<br />
|22/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|23/04/2021 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|28/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|29/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
|-<br />
|05/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
|-<br />
|06/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|12/05/2021 || Wednesday || 14:15-18:15 || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|13/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering] (Ch. 10 ISL)<br />
|-<br />
|19/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
|-<br />
|20/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering] (Ch. 10 ISL)<br />
|-<br />
|26/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
|-<br />
|27/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering] (Ch. 10 ISL)<br />
|-<br />
|02/06/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|03/06/2021 || Thursday || 08:15-11:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|04/06/2021 || Friday || 14:15-17:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|11/03/2020 || Wednesday || 14:15 - 18:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3565a411-bed7-4b20-9dd6-00ee8b9ddd54 Course Introduction], [https://web.microsoftstream.com/video/4a702565-386d-4bed-a0c1-9d1daa015703 Introduction to Machine Learning], and [https://web.microsoftstream.com/video/cef9a912-ee47-4254-8f26-318a6a014424 Statistical Machine Learning] (Ch. 1 ISL)<br />
|-<br />
|12/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/389145d3-c3e5-48c2-bf82-d7877bf14b8c Statistical Decision Theory and Bias-Variance trade off] (Ch. 2 ISL)<br />
|-<br />
|18/03/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/bb2155d6-a6f2-4f82-af48-3ceb22951c4b Python + Numpy + Bias/Variance] Laboratory<br />
|-<br />
|19/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b0359dad-971c-412d-8508-fde45e1dc3fe Statistical Decision Theory and Bias-Variance trade off (continued)] (Ch. 2 ISL)<br />
|-<br />
|25/03/2017 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f88827c9-0994-4d3f-80bf-1c9b6637ba18 Simple Linear Regression and Multivariate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|26/03/2017 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/deb2b3f5-d90d-47b8-b309-1ab88979f805 Multivariate Linear Regression (continued)] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|01/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/da0e35db-6995-412a-99ad-f409f0a6752d Multivariae Linear Regression (Part 1)] [https://web.microsoftstream.com/video/8defdff7-ae83-4753-a353-3d39194e63ac (Part 2)] Laboratory<br />
|-<br />
|02/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/c81f59c8-7023-4206-a771-8be062b7cb21 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|08/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/0255cfa0-98de-4465-a8bf-07c93e0974ee Issues with Linear Regression and Generalized Linear Regression] and [https://web.microsoftstream.com/video/e3392148-f1ee-426d-a271-3d8fcf11008a Feature Selection] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|09/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/03656a6b-46c7-483e-9263-0036144adb00 Feature Selection (continued)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|15/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/58093db6-f365-4184-8ce0-c12c03a1589f Generalized Linear Regression and Feature Selection (Part1)] [https://web.microsoftstream.com/video/52b0d7f5-a725-4406-aab3-3be5145d950f (Part 2)] Laboratory<br />
|-<br />
|16/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1565c508-4448-4678-a9e4-4ff411684227 Feature Selection (LASSO)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|22/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d04083a9-8961-4448-bcf2-0576d9dccf4c Classification by KNN (Part 1)] and [https://web.microsoftstream.com/video/c56ef675-486a-425c-819d-404868e07906 Logistic Regression (Part 2)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|23/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3a5f66b1-80d2-4ee5-ba14-7757ae662c97 Classification by Logistic Regression (continued)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|29/04/2020 || Wednesday || 14:15 - 17:15 || --- || --- || --- || --- No Lecture (Laurea) ---<br />
|-<br />
|30/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/a171bc2a-35e7-42c7-bdd0-d295ecfd7e26 Classification by Linear Discriminant Analysis] (Ch. 4 ISL)<br />
|-<br />
|06/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/cef18863-e3fd-481e-bcad-a18455796fd7 Classification via Logistic Regression, and LDA Laboratory (Part 1)] and [https://web.microsoftstream.com/video/670b7f72-5b6b-4168-9f1c-211a9ad25f48 (Part 2)]<br />
|-<br />
|07/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b2ed8ca0-c0c0-4c1a-836d-b2ffee20d85e Evaluation Methods for Classification]<br />
|-<br />
|13/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/2b881d7d-d11e-4432-8873-973bc36eeb61 Perceptron Learning] and [https://web.microsoftstream.com/video/00564932-919a-49a1-9fa5-eb7706640781 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|14/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b72fa8de-f98d-43cf-9609-5833625a4b5c Support Vector Machines and Kernel Trick] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|20/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/fab1f62e-cea0-4cc9-9366-0ccd6bcd161b Classification (SVM and classifiers evaluation) Laboratory (Part 1)] and [https://web.microsoftstream.com/video/130b806d-5390-4321-9d05-f63e079f30a1 (Part 2)]<br />
|-<br />
|21/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1125b85e-f4a1-49d1-991f-333fff893a1e Introduction to Unsupervised Learning] (Ch. 10 ISL)<br />
|-<br />
|27/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d8d0efb5-adfb-4376-afe3-26afb7ffd664 Clustering: Hierachical, k-means, and DBSCAN (Part 1)] and [https://web.microsoftstream.com/video/b7307896-bff7-4fd0-973f-d37fd7f91e13 (Part 2)] (Ch. 10 ISL)<br />
|-<br />
|28/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3f2975c2-1143-4870-8aed-a1a06382be14 Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|03/06/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/0fa04b48-f8c3-488b-bfab-92547d3a9c38 Clustering Laboratory (Part 1)] and [https://web.microsoftstream.com/video/24a40515-afdd-4cca-9b62-19e544c7e12e (Part 2)]<br />
|-<br />
|04/06/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f58132ba-afd3-47ce-89c8-ba16782d8f37 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
|-<br />
|27/11/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Classification by Linear Discriminant Analysis (Ch. 4 ISL)<br />
|-<br />
|03/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Exercises on Classification by Linear Discriminant Analysis<br />
|-<br />
|04/12/2017 || Tuesday || --- || --- || --- || No Lecture <br />
|-<br />
|10/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Clustering: Intro, k-means and the alike, GMM, and hierachical<br />
|-<br />
|11/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Davide Eynard || Clustering: Density-based, Spectral + Evaluation<br />
|-<br />
|14/12/2017 || Friday || 10:15 - 13:15 || TBD || Matteo Matteucci || Classification: from generative to discriminative approaches (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|17/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|18/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|}<br />
--><br />
Chapters are intended as complete except for<br />
* Ch.4 ESL: Section 4.5<br />
* Ch.12 ESL: Sections 12.1, 12.2, 12.3<br />
* Ch.9 ISL: Sections 9.1, 9.2, 9.3<br />
<br />
===Course Evaluation===<br />
<br />
The course evaluation is composed by two parts:<br />
<br />
* HW: Homework with exercises covering the whole program (up to 6 points)<br />
* OR: An oral discussion covering the whole program (up to 26 points)<br />
<br />
the final score will be the sum of HW (not compulsory) and OR scores. You will get the oral grade as a mark in the scale of 30 up to 32/30 which you have to multiply by 0.8125 and then you add to it the score of the project. For your convenience here it is [[Media:ML2021-Conversion.pdf|a conversion table]] with the final mark in case you do not turn in the project or you get the whole 6 marks in the project.<br />
<br />
====Homework #1 2021/2022====<br />
<br />
The first project asks you to develop a regression model on the [[Media:ML-2122-HW1.zip | Forest Fires Data Set]]. The goal of the model is to predict, given a set of features the burned area of forest fires. The project should focus on investigating the part of features selection for the regression task to understand the relationships between the different variables involved fully. <br />
An accurate and helpful description of the dataset is included in the forestfire.names file.<br />
<br />
The project should consist of an executable python notebook, sufficiently commented. Most of the cells should be adequately followed or preceded by an explanation of what you are doing, why, what the output is, how you interpret it, and so on.<br />
<br />
You can submit your notebook via email at stefano.samele@polimi.it. The deadline is 11/05/22 at midday CET.<br />
The notebook should already display all the cells' outputs. A copy and a re-execution will be performed to evaluate your work: we need to be sure your code is actually executable and displays consistent results.<br />
<br />
You can attend the project in a group of maximum two. Scores (0-1-2, with half points) will be assigned based on the ability to organize the investigation and the code, adopt relevant methodologies presented during laboratories, understand and interpret results, and comply with project requests.<br />
<br />
====Homework #2 2021/2022====<br />
<br />
The second project asks you to develop a classification model for the [[Media:ML-2122-HW2.zip | Autism Screening Adult Data Set]]. The task consists in predicting whether the patient is affected by an Autistic Spectrum Disorder, based on a set of specific features. The goal of the project is to build, given the set of models explained during the laboratories, the best fit for the task. <br />
<br />
You can submit your notebook via email at stefano.samele@polimi.it. The deadline is 01/06/22 at midday CET.<br />
Please rename your file as name_surname_stuedentidnumber.<br />
<br />
For any other information please refer to the previous project announcement.<br />
<br />
====Homework #3 2021/2022====<br />
<br />
TDB<br />
<br />
==Teaching Material (the textbook)== <br />
<br />
Lectures will be based on material taken from the book. <br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani<br />
<br />
If you are interested in a more deep treatment of the topics you can refer to the following book from the same authors<br />
<br />
* [http://www-stat.stanford.edu/~tibs/ElemStatLearn/index.html The Elements of Statistical Learning: Data Mining, Inference, and Prediction.] by Trevor Hastie, Robert Tibshirani, and Jerome Friedman.<br />
<br />
Some additional material that could be used to prepare the oral examination will be provided together with the past homeworks.<br />
<br />
===Teacher Slides ===<br />
<br />
In the following you can find the lecture slides used by the teacher and the teaching assistants during classes.<br />
<br />
* [[Media:ML-2020-A0-LinearAlgebraBasics.pdf | [2020/2021] Linear Algebra Basics]]: Basic elements of linear algebra, e.g., vectors, matrices, basis, span, etc.<br />
* [[Media:ML-2122-00-Intro.pdf | [2021/2022] Course introduction]]: introductory slides of the course with useful information about the grading, and the course logistics. Some examples from supervised and unsupervised learning. Regression, classification, clustering terminology and examples.<br />
* [[Media:ML-2122-01-StatisticalLearning.pdf | [2021/2022] Statistical Learning Introduction]]: Statistical Learning definition, rationale, and trade-offs (e.g., prediction vs. inference, parametric vs non parametric models, flexibility vs. interpretability, etc.)<br />
* [[Media:ML-2122-02-LinearRegression.pdf | [2021/2022] Linear Regression]]: Simple Linear Regression and Multiple Linear Regression. Generalized Linear models. Cross-validation techniques. Feature selection. Ridge Regression and Lasso.<br />
* [[Media:ML-2021-03-LinearClassification.pdf | [2020/2021] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods. Discriminative vs. generative methods. Support Vector Machines. <br />
* [[Media:ML-2021-04-Clustering.pdf | [2020/2021] Clustering]]: Introduction to unsupervised learning and clustering, hierarchical clustering, k-means, DBSCNA, indexes for clustering evaluation. <br />
* [[Media:ML-2021-05-PrincipalComponentAnalysis.pdf | [2020/2021] Principal Component Analysis]]: Principal Component Analysis, Geometric Interpretation, Singular Values Decomposition.<br />
<br />
===Laboratories===<br />
<br />
We will use Python (with Jupyter notebooks) throughout the course, thus we kindly ask you to install the "Anaconda" package to be ready for the labs. Here are the [https://www.anaconda.com/products/individual download links]. You can find a simple Jupyter notebook [[Media:ML2021-test.zip | HERE]] to test if the installation succeeded.<br />
<br />
To open the notebook<br />
* launch the "Anaconda Navigator" app<br />
* launch the "jupyter Notebook" app within the navigator, it should automatically open a webpage (it may take a while)<br />
* on the webpage, navigate on the folder where you downloaded the "lab01.00-TestEnvironment.ipynb" file, and press on the file to open it<br />
* then follow the instruction within the notebook<br />
<br />
If you didn't install anaconda but just jupyter, or if you can't find Anaconda Navigator <br />
* open a shell ("Anaconda Prompt" if you are using Windows)<br />
* move on to the folder where you downloaded "lab01.00-TestEnvironment.ipynb"<br />
* run the "jupyter notebook" command, it should automatically open a webpage<br />
* then on the webpage press on the "lab01.00-TestEnvironment.ipynb" file and follow the instructions within the notebook<br />
<br />
The following are the notebook used in the labs:<br />
*[[Media:ML2122-lab01.zip | [2021/2022] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session including the testing environment ([[Media:ML2122-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab02.zip | [2021/2022] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2122-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab03.zip | [2021/2022] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2122-lab03_solutions_part1.zip |complete version]])<br />
*[[Media:ML2122-lab04.zip | [2021/2022] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2122-lab04_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab05.zip | [2021/2022] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fifth lab session ([[Media:ML2122-lab05_solutions.zip |complete version]])<br />
<!--<br />
*[[Media:ML2021-lab01.zip | [2020/2021] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session ([[Media:ML2021-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab02.zip | [2020/2021] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2021-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab03.zip | [2020/2021] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2021-lab03_solutions_tmp.zip |complete version]])<br />
*[[Media:ML2021-lab04.zip | [2020/2021] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab04_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab05.zip | [2020/2021] Material for the fifth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab05_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab06.zip | [2020/2021] Material for the sixth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab06_solutions.zip |complete version]])<br />
--><br />
<!--<br />
* [[Media:ML-2016-03-AssessingModelAccuracy.pdf | [2016] Statistical Learning and Model Assessment]]: Model Assessment for Regression and Classification, Bias-Variance trade-off, Model complexity and overfitting, K-Nearest Neighbors Classifier vs. Bayes Classifier.<br />
* [[Media:ML-2016-05-LinearClassification.pdf | [2016] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods.<br />
* [[Media:ML-2016-06-SupportVectorMachines.pdf | [2016] Support Vector Machines]]: Discriminative vs. generative methids. Hyperplanes learning and Perceptron. Maximum Margin Classifiers. The Kernel trick and Support Vector Machines.<br />
For exercises and lab material please refer to [http://davide.eynard.it/pattern-analysis-and-machine-intelligence-2015-2016/ Davide Eynard website].<br />
--><br />
<br />
===Additional Resources===<br />
Papers and links useful to integrate the textbook<br />
<br />
* [http://www.ekof.bg.ac.rs/wp-content/uploads/2016/09/Ponavljanje-matematike-Wayne-Winston-Operations-Research-Applications-and-Algorithms-4-edition.pdf Basic Linear Algebra]: "Basic Linear Algebra" chapter from Wayne Winston book "Operations Research Applications and Algorithms (4th ed.)"<br />
* [http://scott.fortmann-roe.com/docs/BiasVariance.html Bias vs. Variance]: "Understanding the Bias-Variance Tradeoff" essay by Scott Fortmann-Roe<br />
* [http://www.onmyphd.com/?p=kkt.karush.kuhn.tucker Karush Kuhn Tucker Conditions]: a short note on their meaning with references to relevant wikipedia pages<br />
* [http://students.brown.edu/seeing-theory/ Seeing Theory]: a website where the basic concepts of probability and statistics are explained in a visual way.<br />
<br />
Python examples to better practice with numpy library<br />
* [https://github.com/Kyubyong/numpy_exercises Some numpy exercises], we did roughly 1, 2, 4, 6, 9, 10, 13<br />
* [https://github.com/rougier/numpy-100 Othen numpy exercises] from simple to complex<br />
* [https://www.w3resource.com/python-exercises/numpy/index-array.php More numpy exercises] from simple to complex<br />
<br />
===Year 2020/2021 Recordings (use at your own risk)===<br />
<br />
As I registered these due to pandemics, I am making them available. They DO NOT REPLACE THIS YEAR classroom lectures which are to be considered as the official material of this year, but they might be useful to double-check your notes.<br />
<br />
* 24/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
* 25/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] <br />
* 03/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off]<br />
* 04/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
* 10/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression]<br />
* 18/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression]<br />
* 25/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression]<br />
* 31/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment]<br />
* 01/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso]<br />
* 08/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression]<br />
* 14/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression]<br />
* 15/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis]<br />
* 29/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
* 06/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] <br />
* 12/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] <br />
* 13/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering]<br />
* 20/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering]<br />
* 27/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering]<br />
* 03/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation]<br />
* 04/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] <br />
<br />
Also, labs are available, however, the teaching assistant this year has changed.<br />
<br />
* 17/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
* 24/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
* 07/04/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
* 05/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
* 19/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
* 26/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
<br />
<!--<br />
===Past Exams and Sample Questions===<br />
For some samples of exams you can check the last year PAMI ones<br />
<br />
* [[Media:2016_02_03_PAMI.pdf |03/02/2016 PAMI Exam]]<br />
* [[Media:2016_02_19_PAMI.pdf |19/02/2016 PAMI Exam]]<br />
* [[Media:2016_07_06_PAMI.pdf |06/07/2016 PAMI Exam]]<br />
* [[Media:2016_09_09_PAMI.pdf |09/09/2016 PAMI Exam]]<br />
* [[Media:2016_09_28_PAMI.pdf |28/09/2016 PAMI Exam]]<br />
--><br />
===Online Resources===<br />
<br />
The following are links to online sources which might be useful to complement the material above<br />
* [https://towardsdatascience.com/linear-algebra-survival-kit-for-machine-learning-94901a62465e An Introduction to Linear Algebra] with numpy examples. It provides the very fundamental definitions, does not cover eigenvalues and eigenvectors.<br />
* [https://www.r-bloggers.com/in-depth-introduction-to-machine-learning-in-15-hours-of-expert-videos/ Statistical Learning MOOC] covering the entire ISL book offered by Trevor Hastie and Rob Tibshirani. Start anytime in self-paced mode.<br />
* [http://math.arizona.edu/~hzhang/math574m.html MATH 574M] University of Arizona Course on ''Statistical Machine Learning and Data Mining''; here you can find slides covering part of the course topics (the reference book for this course is again ''The Elements of Statistical Learning'')<br />
<br />
<!--<br />
== 2013-2014 Homework ==<br />
<br />
The 2013 Homework (alike the 2012 one) is organized as an octave series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
=== Part 1: Linear Classification Methods ===<br />
<br />
* [[Media:homework_pami_classification_2013_2014.pdf | Homework 2013-2014 on Classification]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 17/11 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
=== Part 2: Regression ===<br />
* [[Media:homework_pami_regression_2013_2014.pdf | Homework 2013-2014 Regression]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to malago@di.unimi.it (cc to matteo.matteucci@polimi.it) is Friday 20/12 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:diabete.mat | diabete.mat]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
For any question or doubt please sen us an email as soon as possible.<br />
<br />
'''Note 1:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
<strike>'''Note 2:''' rename the file Diabete.data into diabete.mat ... still fighting with the CSM :-)</strike><br />
<br />
'''Note 3:''' the code has been tested with octave under linux, we suggest to use it not to spend too much time with installing it under windows or using matlab. If you do not have linux installed, try using a live CD as the ubuntu 13.04 live distro ;-)<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at this post<br />
<br />
* [http://davide.eynard.it/2013/12/30/octave-clustering-demo-part-6-more-evaluation/ Homework 2013-2014 on clustering evaluation]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is the end of the course. You have to '''send it to davide.eynard_at_gmail.com Friday 24/01 23:59'''.<br />
<br />
'''Note 1:''' for any doubt or question send an email, as soon as possible, to Davide Eynard so to have a prompt reply and not get stuck during homework execution.<br />
<br />
'''Note 2:''' you have to turn in only the solution of "Ocatave clustering demo part 6", while the other parts can be used as reference to improve your understanding in basic clustering algorithms.<br />
<br />
=== Part 2: Classification ===<br />
<br />
* [[Media:homework_pami_classification_2013.pdf | Homework 2013 Classification]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 23/06 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
<br />
<br />
'''Errata Corrige''': there were a few bugs in the homework text. I have updated the pdf and they were:<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the Fisher projection it is more correct to use only the training data to learn the projection and then we can train and test on the corresponding subsets<br />
<br />
a = FisherProjection(X(training,:),Y(training,:));<br />
reducedX = X*a(:,1);<br />
[mu_0, mu_1, sigma, p_0, p_1] = linearDiscriminantAnalysis_train(reducedX(training), Y(training))<br />
<br />
I forgot to filter for just the training samples when performing Quadratic Discriminant Analysis<br />
<br />
quadX = expandToQuadraticSpace(X);<br />
%check this out!<br />
size(quadX)<br />
beta = linearRegression_train(quadX(training), Y(training));<br />
<br />
And in general you should always train on the training data and test on the testing data ;-).<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at these posts<br />
<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-4-k-medoids/ Homework 2013 on k-medoids]<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-5-hierarchical-clustering/ Homework 2013 on hierarchical clustering]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is '''before the you take the exam''' sending it to davide.eynard_at_gmail.com.<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3:] follow this tutorial and answer the questions from all 5 sub-tutorials.<br />
<br />
== 2012 Homework ==<br />
<br />
The Homework of 2012 organized like an octave/matlab series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
* [[Media:PAMI_homework_2012_1.pdf | Homework 2012 part 1]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to matteucci@elet.polimi.it and malago@elet.polimi.it is Tuesday 5/6 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
'''Note:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
* [[Media:PAMI_homework_2012_2.pdf | Homework 2012 part 2]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade; the deadline to submit the solution by email to matteucci@elet.polimi.it is the day before the exam you decide to attend''' (e.g., if you decide to take the exam on the 26/6 then you need to turn it in by 25/6).<br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Errata Corrige''': there were a few bugs a bug in the homework text. I have updated the pdf and they were:<br />
In the code for loading the data I forgot to remove the first column which you do not need<br />
data = dlmread('SAheart.data',',',1,1);<br />
X = data(:,1:9);<br />
Y = data(:,10);<br />
<br />
In the StratifiedSampling function the sorted verctors should be assigned<br />
% just an ahestetic sorting<br />
testing = sort(testing);<br />
training = sort(training);<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the expansion to quadratic space the starting index for the inner loop should i and not 1. Moreover in some cases it might be possible to have columns which are duplicated (e.g., with boolean attribute); in this case you should not need the robust version of linear regression.<br />
function extendedX = expandToQuadraticSpace(X)<br />
% adds new columns to extendedX; keeps X for other calculations<br />
extendedX = X;<br />
for i=1:size(X, 2)<br />
for j=i:size(X, 2)<br />
newColumn = X(:, i) .* X(:, j);<br />
extendedX = [extendedX newColumn];<br />
end<br />
end<br />
% remove duplicated columns<br />
duplicates = [];<br />
for i=1:size(extendedX, 2)<br />
for j=i+1:size(extendedX, 2)<br />
if(sum(extendedX(:,i)==extendedX(:,j)) == size(X,1))<br />
duplicates = [duplicates j];<br />
end<br />
end<br />
end<br />
extendedX(:,duplicates) = [];<br />
end<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3]: the third part of the homework is '''optional''', so you are not required to complete it. However, if you want to give it a try and use it to understand the topics covered by Davide Eynard in his lectures you are welcome. As usual, the questions in this homework are very close to the ones you will find in classworks, so we suggest to have a look at hose anyway! '''In case you decide to turn it in and have it contribute with a 10% to the grade, the deadline to submit the solution by email to matteucci@elet.polimi.it and davide.eynard@polimi.it is the day before you decide to take the exam''' (e.g., if you decide to take the exam on the 10/7 then you need to turn it in by 9/7)<br />
<br />
'''Note:''' homeworks are meant to let you see (and practice) a little bit with the topics presented during the course. They are evaluated because you spent some time on those and thus you deserve some credit for that ;-)<br />
<br />
== 2011 Homework ==<br />
<br />
Here you can find the homework for the year 2011 and the material you need to complete it. Please read the F.A.Q. below and for any unsolved doubt contact the teachers of the course.<br />
<br />
* [[Media:PAMI_homework_2011_v02.pdf | Homework 2011 v02]] a minor change in the signature of the logistic regression function<br />
* [[Media:PAMI_homework_2011_v01.pdf | Homework 2011 v01]] text with questions and exercises<br />
* [[Media:dataset.txt | Dataset]] for the clustering exercise in csv format<br />
<br />
'''Frequently Asked Questions'''<br />
<br />
* '''''How do I take the square root of a matrix?''''': check the diagonalization approach from [http://en.wikipedia.org/wiki/Square_root_of_a_matrix].<br />
<br />
* '''''How do I compute the chi square statistics?'''': in the slide there is a cut and paste error since e_ij=R_it*C_tj as described here [http://en.wikipedia.org/wiki/Pearson's_chi-square_test]<br />
<br />
* '''''When it is due? In which format?''''': The homework is due on the 29/06 and should be delivered by email. Send us (all the course teachers) the .m files in a zip archive attached to this email and a link to the pdf with the written part (not to flood our mailboxes). <br />
<br />
* '''''Can we do that in groups? How many people per group?''''': Yes, you can work on the homework in groups, but no more than 3 people per group are allowed. Put the names of all homework authors in the pdf and in all the .m files. If you discuss something with other people, w.r.t. the people in your group, point it out in the pdf file as well.<br />
<br />
* '''''Can we ask questions about the exercises or the code?''''': Yes you should! First of all, there might be unclear things in the exercise descriptions and those should be clarified as soon as possible for all (this is why the homework is versioned). But you could ask for help as well, our goal is to have you all solving all the questions and get a high grade ... but we will not do the homework on you behalf ;-)<br />
<br />
* '''''How the optional questions are graded?''''': They compensate for possible errors in the other questions; we suggest to work on them anyway to be sure you get the maximum grading.<br />
<br />
* '''''How the homework will be graded?''''': we are interested in understanding if you understood or not; thus we are not interested in the result, but we want to check how you get to the result. So please: 1) clarify all the assumptions and all the steps in your exercises 2) comment as much as possible your .m files!<br />
<br />
--></div>Matteohttps://chrome.deib.polimi.it/index.php?title=File:ML-2122-HW2.zip&diff=3838File:ML-2122-HW2.zip2022-05-19T07:32:20Z<p>Matteo: </p>
<hr />
<div></div>Matteohttps://chrome.deib.polimi.it/index.php?title=Machine_Learning_Bio&diff=3837Machine Learning Bio2022-05-19T07:31:49Z<p>Matteo: /* Course Evaluation */</p>
<hr />
<div>__FORCETOC__<br />
<br />
The following are last-minute news you should be aware of ;-)<br />
* 04/05/2022: Changed lecture schedule<br />
* 02/05/2022: Changed deadline first homework -> 11/05/2022 at noon<br />
* 22/04/2022: The first homework is out!!!<br />
* 08/03/2022: Added material for the first lab<br />
* 06/03/2022: Slides from first lectures and last year's recordings updated <br />
* 23/02/2022: Lectures start today!<br />
<!--<br />
* 11/09/2021: Grade of the [[Media:ML2021-Grades_210911.pdf|Summer session + homeworks]] <br />
* 09/07/2021: Grade of the [[Media:ML2021-Grades_210624.pdf|24/06/2021 oral exams]] <br />
* 09/07/2021: Updated Homework + Oral [[Media:ML2021-Conversion.pdf|conversion table]]<br />
* 03/07/2021: Updated Homework available [[Media:ML2021-homework-new.zip|here!!!]]<br />
* 08/06/2021: Updated all videos and all slides from the course.<br />
* 02/06/2021: You can fin the 2020/2021 homework [[Media:ML2021-homework.zip|here!!!]]<br />
* 26/05/2021: The link to the form to request an instance of remote examination for June and July is [https://forms.office.com/r/FUrVt8eZNx here]!<br />
* 09/04/2021: From next week lectures will be back to presence (plus webex streaming)<br />
* 22/03/2021: Added completed material from the last lab plus some exercises ... <br />
* 17/03/2021: Added the material for the lab of today ... <br />
* 10/03/2021: 11/03/2021 lecture has been canceled<br />
* 06/03/2021: website update with linear algebra slides and (working) links to all lectures<br />
* 05/03/2021: Since today we are moved fully online so lectures will happen in my webex room (same holds for labs)<br />
* 24/02/2021: Lectures start today<br />
--><br />
<!--<br />
* 08/08/2020: Grading for all projects and first two calls [[Media:Grades_20200723.pdf|are here!!]] <br />
* 22/06/2020: Grading mechanism explained, check [[Media:ML2020_grading_system.pdf|here a handy recap]] <br />
* 14/06/2020: [[Media:ML2020_homework.zip |Here it come the 2020 homework!!!]]<br />
* 03/06/2020: All slides updated<br />
* 02/05/2020: Updated course schedule and added videos to the previous lectures<br />
* 04/04/2020: Updated schedule and added videos of previous lectures<br />
* 31/03/2020: Updated schedule and added material on linear algebra<br />
* 19/03/2020: Added lab material, both with empty notebooks and final result<br />
* 11/03/2020: Added today's lecture videos and planned next week schedule (To Be Completed)<br />
* 11/03/2020: The course starts today!<br />
* 03/03/2020: The course is going to start soon ...<br />
--><br />
<br />
==Course Aim & Organization==<br />
<br />
The objective of the Machine Learning course is to give an in-depth presentation of the techniques most used for pattern recognition, knowledge discovery, and data analysis/modeling. These techniques are presented both from a theoretical (i.e., statistics and information theory) perspective and a practical one (i.e., coding examples) through the descriptions of algorithms and their implementations in a general-purpose programming language (i.e., python).<br />
<br />
The course presents the classical supervised and unsupervised learning paradigms described and discussed presenting regression, classification, and clustering problems in Bioinformatics. The course is composed of a set of lectures on specific machine learning techniques (e.g., generalized linear regression, logistic regression, linear and quadratic discriminant analysis, support vector machines, k-nearest-neighborhood, clustering, etc.) preceded by the introduction of the Statistical Learning framework which acts as a common reference framework for the entire course.<br />
<br />
===Teachers===<br />
<br />
The course is composed of a blending of lectures and exercises by the course teacher and a teaching assistant.<br />
<br />
* [http://www.deib.polimi.it/ita/personale/dettagli/267262 Matteo Matteucci]: the course teacher <br />
* [https://www.deib.polimi.it/ita/personale/dettagli/1638984 Stefano Samele]: the teaching assistant <br />
<br />
===Course Program===<br />
<br />
The course mostly follows the following book which is also available for download in pdf<br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani<br />
<br />
The course lectures will present the theory and practice of the following:<br />
* Machine Learning and Pattern Classification: the general concepts of Machine Learning and Pattern Recognition are introduced within the framework of Statistical Decision Theory with reference to the bias-variance trade-off and the Bayes classifier;<br />
* Generalized Linear Regression: linear methods for regression will be presented and discussed introducing different techniques (e.g., Linear Regression, Ridge Regression, K-Nearest Neighbors Regression, Non-Linear Regression, etc.) and the most common methodologies for model validation and selection (e.g., AIC, BIC, cross-validation, stepwise feature selection, Lasso, etc.).<br />
* Linear and Non-Linear Classification: generative and discriminative techniques for classification will be described and discussed (e.g., Logistic Regression, Linear and Quadratic Discriminant Analysis, K-Nearest Neighbors, Perceptron Rule, and Support Vector Machines, etc.). Metrics for classifiers evaluation and comparison are presented in this part of the course (e.g., accuracy, precision, recall, ROC, AUC, F-measure, Matthew coefficient).<br />
* Unsupervised Learning: the most common approaches to unsupervised learning are described mostly focusing on clustering methods such as hierarchical clustering, k-means, k-medoids, Mixture of Gaussians, DBSCAN, etc<br />
<br />
These topics will be presented both from a theoretical perspective and a practical one via implementations in the general-purpose programming language python.<br />
<br />
===Detailed course schedule===<br />
<br />
A detailed schedule of the course can be found here; topics are just indicative while days and teachers are correct up to some last-minute change (I will notify you by email). Please note that not all days we have lectures!!<br />
<br />
Note: Lecture timetable interpretation<br />
* On Wednesday, in room 26.02, starts at 15:15 (cum tempore), ends at 18:15<br />
* On Thursday, in room 26.01, starts at 12:15 (cum tempore), ends at 14:15<br />
<br />
<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|23/02/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Machine Learning Intro<br />
|-<br />
|24/02/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Statistical Learning Theory (Ch. 1 ISL)<br />
|-<br />
|02/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Statistical Learning Theory - Bias/Variance Trade-off (Ch. 2 ISL)<br />
|-<br />
|03/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Introduction to Linear Algebra<br />
|-<br />
|09/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Python + Numpy + Bias/Variance<br />
|-<br />
|10/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Simple Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|16/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Multi Variate Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|17/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL) <br />
|-<br />
|23/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Multivariate Linear Regression Laboratory<br />
|-<br />
|24/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Generalized Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|30/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Feature Selection and Model Assessment (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|31/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Ridge Regression and Lasso (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|06/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Generalized Linear Regression and Feature Selection Laboratory<br />
|-<br />
|07/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: KNN and Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|13/04/2022 || Wednesday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|14/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|20/04/2022 || Wednesday || 15:15-18:15 || 26.02 ||Matteo Matteucci || Lecture || Classification: Linear Discriminanr Analysis (Ch. 4 ISL)<br />
|-<br />
|21/04/2022 || Thursday || 12:15 - 14:15 || 26.01 || Matteo Matteucci || Lecture || Evaluation methods for classification<br />
|-<br />
|27/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Logistic Regression and LDA Laboratory<br />
|-<br />
|28/04/2022 || Thursday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|04/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || The Perceptron (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|06/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL) <br />
|-<br />
|11/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Unsupervised Learning and Clustering (Ch. 10 ISL)<br />
|-<br />
|12/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Clustering (Ch. 10 ISL)<br />
|-<br />
|18/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || SVM and Classifiers Evaluation Laboratory<br />
|-<br />
|19/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|25/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Clustering Laboratory<br />
|-<br />
|26/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|01/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Clustering Evaluation<br />
|-<br />
|02/06/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|08/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Principal Component Analysis (Ch. 10 ISL)<br />
|}<br />
<br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|24/02/2021 || Wednesday || 15:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
|-<br />
|25/02/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] (Ch. 1 ISL)<br />
|-<br />
|03/03/2021 || Wednesday || 14:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off] (Ch. 2 ISL)<br />
|-<br />
|04/03/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
|-<br />
|10/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|11/03/2021 || Thursday || --- || --- || --- || ---|| --- No lecture ---<br />
|-<br />
|17/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
|-<br />
|18/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|24/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
|-<br />
|25/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|31/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|01/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|07/04/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
|-<br />
|08/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|14/04/2021 || Wednesday || '''15:15-18:15''' || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|15/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis] (Ch. 4 ISL)<br />
|-<br />
|22/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|23/04/2021 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|28/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|29/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
|-<br />
|05/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
|-<br />
|06/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|12/05/2021 || Wednesday || 14:15-18:15 || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|13/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering] (Ch. 10 ISL)<br />
|-<br />
|19/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
|-<br />
|20/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering] (Ch. 10 ISL)<br />
|-<br />
|26/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
|-<br />
|27/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering] (Ch. 10 ISL)<br />
|-<br />
|02/06/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|03/06/2021 || Thursday || 08:15-11:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|04/06/2021 || Friday || 14:15-17:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|11/03/2020 || Wednesday || 14:15 - 18:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3565a411-bed7-4b20-9dd6-00ee8b9ddd54 Course Introduction], [https://web.microsoftstream.com/video/4a702565-386d-4bed-a0c1-9d1daa015703 Introduction to Machine Learning], and [https://web.microsoftstream.com/video/cef9a912-ee47-4254-8f26-318a6a014424 Statistical Machine Learning] (Ch. 1 ISL)<br />
|-<br />
|12/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/389145d3-c3e5-48c2-bf82-d7877bf14b8c Statistical Decision Theory and Bias-Variance trade off] (Ch. 2 ISL)<br />
|-<br />
|18/03/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/bb2155d6-a6f2-4f82-af48-3ceb22951c4b Python + Numpy + Bias/Variance] Laboratory<br />
|-<br />
|19/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b0359dad-971c-412d-8508-fde45e1dc3fe Statistical Decision Theory and Bias-Variance trade off (continued)] (Ch. 2 ISL)<br />
|-<br />
|25/03/2017 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f88827c9-0994-4d3f-80bf-1c9b6637ba18 Simple Linear Regression and Multivariate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|26/03/2017 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/deb2b3f5-d90d-47b8-b309-1ab88979f805 Multivariate Linear Regression (continued)] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|01/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/da0e35db-6995-412a-99ad-f409f0a6752d Multivariae Linear Regression (Part 1)] [https://web.microsoftstream.com/video/8defdff7-ae83-4753-a353-3d39194e63ac (Part 2)] Laboratory<br />
|-<br />
|02/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/c81f59c8-7023-4206-a771-8be062b7cb21 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|08/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/0255cfa0-98de-4465-a8bf-07c93e0974ee Issues with Linear Regression and Generalized Linear Regression] and [https://web.microsoftstream.com/video/e3392148-f1ee-426d-a271-3d8fcf11008a Feature Selection] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|09/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/03656a6b-46c7-483e-9263-0036144adb00 Feature Selection (continued)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|15/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/58093db6-f365-4184-8ce0-c12c03a1589f Generalized Linear Regression and Feature Selection (Part1)] [https://web.microsoftstream.com/video/52b0d7f5-a725-4406-aab3-3be5145d950f (Part 2)] Laboratory<br />
|-<br />
|16/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1565c508-4448-4678-a9e4-4ff411684227 Feature Selection (LASSO)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|22/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d04083a9-8961-4448-bcf2-0576d9dccf4c Classification by KNN (Part 1)] and [https://web.microsoftstream.com/video/c56ef675-486a-425c-819d-404868e07906 Logistic Regression (Part 2)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|23/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3a5f66b1-80d2-4ee5-ba14-7757ae662c97 Classification by Logistic Regression (continued)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|29/04/2020 || Wednesday || 14:15 - 17:15 || --- || --- || --- || --- No Lecture (Laurea) ---<br />
|-<br />
|30/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/a171bc2a-35e7-42c7-bdd0-d295ecfd7e26 Classification by Linear Discriminant Analysis] (Ch. 4 ISL)<br />
|-<br />
|06/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/cef18863-e3fd-481e-bcad-a18455796fd7 Classification via Logistic Regression, and LDA Laboratory (Part 1)] and [https://web.microsoftstream.com/video/670b7f72-5b6b-4168-9f1c-211a9ad25f48 (Part 2)]<br />
|-<br />
|07/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b2ed8ca0-c0c0-4c1a-836d-b2ffee20d85e Evaluation Methods for Classification]<br />
|-<br />
|13/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/2b881d7d-d11e-4432-8873-973bc36eeb61 Perceptron Learning] and [https://web.microsoftstream.com/video/00564932-919a-49a1-9fa5-eb7706640781 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|14/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b72fa8de-f98d-43cf-9609-5833625a4b5c Support Vector Machines and Kernel Trick] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|20/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/fab1f62e-cea0-4cc9-9366-0ccd6bcd161b Classification (SVM and classifiers evaluation) Laboratory (Part 1)] and [https://web.microsoftstream.com/video/130b806d-5390-4321-9d05-f63e079f30a1 (Part 2)]<br />
|-<br />
|21/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1125b85e-f4a1-49d1-991f-333fff893a1e Introduction to Unsupervised Learning] (Ch. 10 ISL)<br />
|-<br />
|27/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d8d0efb5-adfb-4376-afe3-26afb7ffd664 Clustering: Hierachical, k-means, and DBSCAN (Part 1)] and [https://web.microsoftstream.com/video/b7307896-bff7-4fd0-973f-d37fd7f91e13 (Part 2)] (Ch. 10 ISL)<br />
|-<br />
|28/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3f2975c2-1143-4870-8aed-a1a06382be14 Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|03/06/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/0fa04b48-f8c3-488b-bfab-92547d3a9c38 Clustering Laboratory (Part 1)] and [https://web.microsoftstream.com/video/24a40515-afdd-4cca-9b62-19e544c7e12e (Part 2)]<br />
|-<br />
|04/06/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f58132ba-afd3-47ce-89c8-ba16782d8f37 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
|-<br />
|27/11/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Classification by Linear Discriminant Analysis (Ch. 4 ISL)<br />
|-<br />
|03/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Exercises on Classification by Linear Discriminant Analysis<br />
|-<br />
|04/12/2017 || Tuesday || --- || --- || --- || No Lecture <br />
|-<br />
|10/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Clustering: Intro, k-means and the alike, GMM, and hierachical<br />
|-<br />
|11/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Davide Eynard || Clustering: Density-based, Spectral + Evaluation<br />
|-<br />
|14/12/2017 || Friday || 10:15 - 13:15 || TBD || Matteo Matteucci || Classification: from generative to discriminative approaches (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|17/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|18/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|}<br />
--><br />
Chapters are intended as complete except for<br />
* Ch.4 ESL: Section 4.5<br />
* Ch.12 ESL: Sections 12.1, 12.2, 12.3<br />
* Ch.9 ISL: Sections 9.1, 9.2, 9.3<br />
<br />
===Course Evaluation===<br />
<br />
The course evaluation is composed by two parts:<br />
<br />
* HW: Homework with exercises covering the whole program (up to 6 points)<br />
* OR: An oral discussion covering the whole program (up to 26 points)<br />
<br />
the final score will be the sum of HW (not compulsory) and OR scores. You will get the oral grade as a mark in the scale of 30 up to 32/30 which you have to multiply by 0.8125 and then you add to it the score of the project. For your convenience here it is [[Media:ML2021-Conversion.pdf|a conversion table]] with the final mark in case you do not turn in the project or you get the whole 6 marks in the project.<br />
<br />
====Homework #1 2021/2022====<br />
<br />
The first project asks you to develop a regression model on the [[Media:ML-2122-HW1.zip | Forest Fires Data Set]]. The goal of the model is to predict, given a set of features the burned area of forest fires. The project should focus on investigating the part of features selection for the regression task to understand the relationships between the different variables involved fully. <br />
An accurate and helpful description of the dataset is included in the forestfire.names file.<br />
<br />
The project should consist of an executable python notebook, sufficiently commented. Most of the cells should be adequately followed or preceded by an explanation of what you are doing, why, what the output is, how you interpret it, and so on.<br />
<br />
You can submit your notebook via email at stefano.samele@polimi.it. The deadline is 11/05/22 at midday CET.<br />
The notebook should already display all the cells' outputs. A copy and a re-execution will be performed to evaluate your work: we need to be sure your code is actually executable and displays consistent results.<br />
<br />
You can attend the project in a group of maximum two. Scores (0-1-2, with half points) will be assigned based on the ability to organize the investigation and the code, adopt relevant methodologies presented during laboratories, understand and interpret results, and comply with project requests.<br />
<br />
====Homework #2 2021/2022====<br />
<br />
The second project asks you to develop a classification model for the [[Media:ML-2122-HW2.zip | Autism Screening Adult Data Set]]. The task consists in predicting whether the patient is affected by an Autistic Spectrum Disorder, based on a set of specific features. The goal of the project is to build, given the set of models explained during the laboratories, the best fit for the task. <br />
<br />
You can submit your notebook via email at stefano.samele@polimi.it. The deadline is 01/06/22 at midday CET.<br />
Please rename your file as name_surname_stuedentidnumber.<br />
<br />
For any other information please refer to the previous project announcement.<br />
<br />
====Homework #3 2021/2022====<br />
<br />
TDB<br />
<br />
==Teaching Material (the textbook)== <br />
<br />
Lectures will be based on material taken from the book. <br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani<br />
<br />
If you are interested in a more deep treatment of the topics you can refer to the following book from the same authors<br />
<br />
* [http://www-stat.stanford.edu/~tibs/ElemStatLearn/index.html The Elements of Statistical Learning: Data Mining, Inference, and Prediction.] by Trevor Hastie, Robert Tibshirani, and Jerome Friedman.<br />
<br />
Some additional material that could be used to prepare the oral examination will be provided together with the past homeworks.<br />
<br />
===Teacher Slides ===<br />
<br />
In the following you can find the lecture slides used by the teacher and the teaching assistants during classes.<br />
<br />
* [[Media:ML-2020-A0-LinearAlgebraBasics.pdf | [2020/2021] Linear Algebra Basics]]: Basic elements of linear algebra, e.g., vectors, matrices, basis, span, etc.<br />
* [[Media:ML-2122-00-Intro.pdf | [2021/2022] Course introduction]]: introductory slides of the course with useful information about the grading, and the course logistics. Some examples from supervised and unsupervised learning. Regression, classification, clustering terminology and examples.<br />
* [[Media:ML-2122-01-StatisticalLearning.pdf | [2021/2022] Statistical Learning Introduction]]: Statistical Learning definition, rationale, and trade-offs (e.g., prediction vs. inference, parametric vs non parametric models, flexibility vs. interpretability, etc.)<br />
* [[Media:ML-2122-02-LinearRegression.pdf | [2021/2022] Linear Regression]]: Simple Linear Regression and Multiple Linear Regression. Generalized Linear models. Cross-validation techniques. Feature selection. Ridge Regression and Lasso.<br />
* [[Media:ML-2021-03-LinearClassification.pdf | [2020/2021] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods. Discriminative vs. generative methods. Support Vector Machines. <br />
* [[Media:ML-2021-04-Clustering.pdf | [2020/2021] Clustering]]: Introduction to unsupervised learning and clustering, hierarchical clustering, k-means, DBSCNA, indexes for clustering evaluation. <br />
* [[Media:ML-2021-05-PrincipalComponentAnalysis.pdf | [2020/2021] Principal Component Analysis]]: Principal Component Analysis, Geometric Interpretation, Singular Values Decomposition.<br />
<br />
===Laboratories===<br />
<br />
We will use Python (with Jupyter notebooks) throughout the course, thus we kindly ask you to install the "Anaconda" package to be ready for the labs. Here are the [https://www.anaconda.com/products/individual download links]. You can find a simple Jupyter notebook [[Media:ML2021-test.zip | HERE]] to test if the installation succeeded.<br />
<br />
To open the notebook<br />
* launch the "Anaconda Navigator" app<br />
* launch the "jupyter Notebook" app within the navigator, it should automatically open a webpage (it may take a while)<br />
* on the webpage, navigate on the folder where you downloaded the "lab01.00-TestEnvironment.ipynb" file, and press on the file to open it<br />
* then follow the instruction within the notebook<br />
<br />
If you didn't install anaconda but just jupyter, or if you can't find Anaconda Navigator <br />
* open a shell ("Anaconda Prompt" if you are using Windows)<br />
* move on to the folder where you downloaded "lab01.00-TestEnvironment.ipynb"<br />
* run the "jupyter notebook" command, it should automatically open a webpage<br />
* then on the webpage press on the "lab01.00-TestEnvironment.ipynb" file and follow the instructions within the notebook<br />
<br />
The following are the notebook used in the labs:<br />
*[[Media:ML2122-lab01.zip | [2021/2022] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session including the testing environment ([[Media:ML2122-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab02.zip | [2021/2022] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2122-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab03.zip | [2021/2022] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2122-lab03_solutions_part1.zip |complete version]])<br />
*[[Media:ML2122-lab04.zip | [2021/2022] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2122-lab04_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab05.zip | [2021/2022] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fifth lab session ([[Media:ML2122-lab05_solutions.zip |complete version]])<br />
<!--<br />
*[[Media:ML2021-lab01.zip | [2020/2021] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session ([[Media:ML2021-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab02.zip | [2020/2021] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2021-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab03.zip | [2020/2021] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2021-lab03_solutions_tmp.zip |complete version]])<br />
*[[Media:ML2021-lab04.zip | [2020/2021] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab04_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab05.zip | [2020/2021] Material for the fifth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab05_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab06.zip | [2020/2021] Material for the sixth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab06_solutions.zip |complete version]])<br />
--><br />
<!--<br />
* [[Media:ML-2016-03-AssessingModelAccuracy.pdf | [2016] Statistical Learning and Model Assessment]]: Model Assessment for Regression and Classification, Bias-Variance trade-off, Model complexity and overfitting, K-Nearest Neighbors Classifier vs. Bayes Classifier.<br />
* [[Media:ML-2016-05-LinearClassification.pdf | [2016] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods.<br />
* [[Media:ML-2016-06-SupportVectorMachines.pdf | [2016] Support Vector Machines]]: Discriminative vs. generative methids. Hyperplanes learning and Perceptron. Maximum Margin Classifiers. The Kernel trick and Support Vector Machines.<br />
For exercises and lab material please refer to [http://davide.eynard.it/pattern-analysis-and-machine-intelligence-2015-2016/ Davide Eynard website].<br />
--><br />
<br />
===Additional Resources===<br />
Papers and links useful to integrate the textbook<br />
<br />
* [http://www.ekof.bg.ac.rs/wp-content/uploads/2016/09/Ponavljanje-matematike-Wayne-Winston-Operations-Research-Applications-and-Algorithms-4-edition.pdf Basic Linear Algebra]: "Basic Linear Algebra" chapter from Wayne Winston book "Operations Research Applications and Algorithms (4th ed.)"<br />
* [http://scott.fortmann-roe.com/docs/BiasVariance.html Bias vs. Variance]: "Understanding the Bias-Variance Tradeoff" essay by Scott Fortmann-Roe<br />
* [http://www.onmyphd.com/?p=kkt.karush.kuhn.tucker Karush Kuhn Tucker Conditions]: a short note on their meaning with references to relevant wikipedia pages<br />
* [http://students.brown.edu/seeing-theory/ Seeing Theory]: a website where the basic concepts of probability and statistics are explained in a visual way.<br />
<br />
Python examples to better practice with numpy library<br />
* [https://github.com/Kyubyong/numpy_exercises Some numpy exercises], we did roughly 1, 2, 4, 6, 9, 10, 13<br />
* [https://github.com/rougier/numpy-100 Othen numpy exercises] from simple to complex<br />
* [https://www.w3resource.com/python-exercises/numpy/index-array.php More numpy exercises] from simple to complex<br />
<br />
===Year 2020/2021 Recordings (use at your own risk)===<br />
<br />
As I registered these due to pandemics, I am making them available. They DO NOT REPLACE THIS YEAR classroom lectures which are to be considered as the official material of this year, but they might be useful to double-check your notes.<br />
<br />
* 24/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
* 25/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] <br />
* 03/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off]<br />
* 04/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
* 10/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression]<br />
* 18/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression]<br />
* 25/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression]<br />
* 31/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment]<br />
* 01/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso]<br />
* 08/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression]<br />
* 14/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression]<br />
* 15/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis]<br />
* 29/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
* 06/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] <br />
* 12/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] <br />
* 13/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering]<br />
* 20/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering]<br />
* 27/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering]<br />
* 03/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation]<br />
* 04/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] <br />
<br />
Also, labs are available, however, the teaching assistant this year has changed.<br />
<br />
* 17/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
* 24/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
* 07/04/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
* 05/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
* 19/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
* 26/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
<br />
<!--<br />
===Past Exams and Sample Questions===<br />
For some samples of exams you can check the last year PAMI ones<br />
<br />
* [[Media:2016_02_03_PAMI.pdf |03/02/2016 PAMI Exam]]<br />
* [[Media:2016_02_19_PAMI.pdf |19/02/2016 PAMI Exam]]<br />
* [[Media:2016_07_06_PAMI.pdf |06/07/2016 PAMI Exam]]<br />
* [[Media:2016_09_09_PAMI.pdf |09/09/2016 PAMI Exam]]<br />
* [[Media:2016_09_28_PAMI.pdf |28/09/2016 PAMI Exam]]<br />
--><br />
===Online Resources===<br />
<br />
The following are links to online sources which might be useful to complement the material above<br />
* [https://towardsdatascience.com/linear-algebra-survival-kit-for-machine-learning-94901a62465e An Introduction to Linear Algebra] with numpy examples. It provides the very fundamental definitions, does not cover eigenvalues and eigenvectors.<br />
* [https://www.r-bloggers.com/in-depth-introduction-to-machine-learning-in-15-hours-of-expert-videos/ Statistical Learning MOOC] covering the entire ISL book offered by Trevor Hastie and Rob Tibshirani. Start anytime in self-paced mode.<br />
* [http://math.arizona.edu/~hzhang/math574m.html MATH 574M] University of Arizona Course on ''Statistical Machine Learning and Data Mining''; here you can find slides covering part of the course topics (the reference book for this course is again ''The Elements of Statistical Learning'')<br />
<br />
<!--<br />
== 2013-2014 Homework ==<br />
<br />
The 2013 Homework (alike the 2012 one) is organized as an octave series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
=== Part 1: Linear Classification Methods ===<br />
<br />
* [[Media:homework_pami_classification_2013_2014.pdf | Homework 2013-2014 on Classification]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 17/11 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
=== Part 2: Regression ===<br />
* [[Media:homework_pami_regression_2013_2014.pdf | Homework 2013-2014 Regression]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to malago@di.unimi.it (cc to matteo.matteucci@polimi.it) is Friday 20/12 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:diabete.mat | diabete.mat]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
For any question or doubt please sen us an email as soon as possible.<br />
<br />
'''Note 1:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
<strike>'''Note 2:''' rename the file Diabete.data into diabete.mat ... still fighting with the CSM :-)</strike><br />
<br />
'''Note 3:''' the code has been tested with octave under linux, we suggest to use it not to spend too much time with installing it under windows or using matlab. If you do not have linux installed, try using a live CD as the ubuntu 13.04 live distro ;-)<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at this post<br />
<br />
* [http://davide.eynard.it/2013/12/30/octave-clustering-demo-part-6-more-evaluation/ Homework 2013-2014 on clustering evaluation]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is the end of the course. You have to '''send it to davide.eynard_at_gmail.com Friday 24/01 23:59'''.<br />
<br />
'''Note 1:''' for any doubt or question send an email, as soon as possible, to Davide Eynard so to have a prompt reply and not get stuck during homework execution.<br />
<br />
'''Note 2:''' you have to turn in only the solution of "Ocatave clustering demo part 6", while the other parts can be used as reference to improve your understanding in basic clustering algorithms.<br />
<br />
=== Part 2: Classification ===<br />
<br />
* [[Media:homework_pami_classification_2013.pdf | Homework 2013 Classification]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 23/06 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
<br />
<br />
'''Errata Corrige''': there were a few bugs in the homework text. I have updated the pdf and they were:<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the Fisher projection it is more correct to use only the training data to learn the projection and then we can train and test on the corresponding subsets<br />
<br />
a = FisherProjection(X(training,:),Y(training,:));<br />
reducedX = X*a(:,1);<br />
[mu_0, mu_1, sigma, p_0, p_1] = linearDiscriminantAnalysis_train(reducedX(training), Y(training))<br />
<br />
I forgot to filter for just the training samples when performing Quadratic Discriminant Analysis<br />
<br />
quadX = expandToQuadraticSpace(X);<br />
%check this out!<br />
size(quadX)<br />
beta = linearRegression_train(quadX(training), Y(training));<br />
<br />
And in general you should always train on the training data and test on the testing data ;-).<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at these posts<br />
<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-4-k-medoids/ Homework 2013 on k-medoids]<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-5-hierarchical-clustering/ Homework 2013 on hierarchical clustering]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is '''before the you take the exam''' sending it to davide.eynard_at_gmail.com.<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3:] follow this tutorial and answer the questions from all 5 sub-tutorials.<br />
<br />
== 2012 Homework ==<br />
<br />
The Homework of 2012 organized like an octave/matlab series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
* [[Media:PAMI_homework_2012_1.pdf | Homework 2012 part 1]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to matteucci@elet.polimi.it and malago@elet.polimi.it is Tuesday 5/6 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
'''Note:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
* [[Media:PAMI_homework_2012_2.pdf | Homework 2012 part 2]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade; the deadline to submit the solution by email to matteucci@elet.polimi.it is the day before the exam you decide to attend''' (e.g., if you decide to take the exam on the 26/6 then you need to turn it in by 25/6).<br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Errata Corrige''': there were a few bugs a bug in the homework text. I have updated the pdf and they were:<br />
In the code for loading the data I forgot to remove the first column which you do not need<br />
data = dlmread('SAheart.data',',',1,1);<br />
X = data(:,1:9);<br />
Y = data(:,10);<br />
<br />
In the StratifiedSampling function the sorted verctors should be assigned<br />
% just an ahestetic sorting<br />
testing = sort(testing);<br />
training = sort(training);<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the expansion to quadratic space the starting index for the inner loop should i and not 1. Moreover in some cases it might be possible to have columns which are duplicated (e.g., with boolean attribute); in this case you should not need the robust version of linear regression.<br />
function extendedX = expandToQuadraticSpace(X)<br />
% adds new columns to extendedX; keeps X for other calculations<br />
extendedX = X;<br />
for i=1:size(X, 2)<br />
for j=i:size(X, 2)<br />
newColumn = X(:, i) .* X(:, j);<br />
extendedX = [extendedX newColumn];<br />
end<br />
end<br />
% remove duplicated columns<br />
duplicates = [];<br />
for i=1:size(extendedX, 2)<br />
for j=i+1:size(extendedX, 2)<br />
if(sum(extendedX(:,i)==extendedX(:,j)) == size(X,1))<br />
duplicates = [duplicates j];<br />
end<br />
end<br />
end<br />
extendedX(:,duplicates) = [];<br />
end<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3]: the third part of the homework is '''optional''', so you are not required to complete it. However, if you want to give it a try and use it to understand the topics covered by Davide Eynard in his lectures you are welcome. As usual, the questions in this homework are very close to the ones you will find in classworks, so we suggest to have a look at hose anyway! '''In case you decide to turn it in and have it contribute with a 10% to the grade, the deadline to submit the solution by email to matteucci@elet.polimi.it and davide.eynard@polimi.it is the day before you decide to take the exam''' (e.g., if you decide to take the exam on the 10/7 then you need to turn it in by 9/7)<br />
<br />
'''Note:''' homeworks are meant to let you see (and practice) a little bit with the topics presented during the course. They are evaluated because you spent some time on those and thus you deserve some credit for that ;-)<br />
<br />
== 2011 Homework ==<br />
<br />
Here you can find the homework for the year 2011 and the material you need to complete it. Please read the F.A.Q. below and for any unsolved doubt contact the teachers of the course.<br />
<br />
* [[Media:PAMI_homework_2011_v02.pdf | Homework 2011 v02]] a minor change in the signature of the logistic regression function<br />
* [[Media:PAMI_homework_2011_v01.pdf | Homework 2011 v01]] text with questions and exercises<br />
* [[Media:dataset.txt | Dataset]] for the clustering exercise in csv format<br />
<br />
'''Frequently Asked Questions'''<br />
<br />
* '''''How do I take the square root of a matrix?''''': check the diagonalization approach from [http://en.wikipedia.org/wiki/Square_root_of_a_matrix].<br />
<br />
* '''''How do I compute the chi square statistics?'''': in the slide there is a cut and paste error since e_ij=R_it*C_tj as described here [http://en.wikipedia.org/wiki/Pearson's_chi-square_test]<br />
<br />
* '''''When it is due? In which format?''''': The homework is due on the 29/06 and should be delivered by email. Send us (all the course teachers) the .m files in a zip archive attached to this email and a link to the pdf with the written part (not to flood our mailboxes). <br />
<br />
* '''''Can we do that in groups? How many people per group?''''': Yes, you can work on the homework in groups, but no more than 3 people per group are allowed. Put the names of all homework authors in the pdf and in all the .m files. If you discuss something with other people, w.r.t. the people in your group, point it out in the pdf file as well.<br />
<br />
* '''''Can we ask questions about the exercises or the code?''''': Yes you should! First of all, there might be unclear things in the exercise descriptions and those should be clarified as soon as possible for all (this is why the homework is versioned). But you could ask for help as well, our goal is to have you all solving all the questions and get a high grade ... but we will not do the homework on you behalf ;-)<br />
<br />
* '''''How the optional questions are graded?''''': They compensate for possible errors in the other questions; we suggest to work on them anyway to be sure you get the maximum grading.<br />
<br />
* '''''How the homework will be graded?''''': we are interested in understanding if you understood or not; thus we are not interested in the result, but we want to check how you get to the result. So please: 1) clarify all the assumptions and all the steps in your exercises 2) comment as much as possible your .m files!<br />
<br />
--></div>Matteohttps://chrome.deib.polimi.it/index.php?title=File:ML2122-lab05.zip&diff=3836File:ML2122-lab05.zip2022-05-18T11:18:32Z<p>Matteo: </p>
<hr />
<div></div>Matteohttps://chrome.deib.polimi.it/index.php?title=Machine_Learning_Bio&diff=3835Machine Learning Bio2022-05-18T11:18:09Z<p>Matteo: /* Laboratories */</p>
<hr />
<div>__FORCETOC__<br />
<br />
The following are last-minute news you should be aware of ;-)<br />
* 04/05/2022: Changed lecture schedule<br />
* 02/05/2022: Changed deadline first homework -> 11/05/2022 at noon<br />
* 22/04/2022: The first homework is out!!!<br />
* 08/03/2022: Added material for the first lab<br />
* 06/03/2022: Slides from first lectures and last year's recordings updated <br />
* 23/02/2022: Lectures start today!<br />
<!--<br />
* 11/09/2021: Grade of the [[Media:ML2021-Grades_210911.pdf|Summer session + homeworks]] <br />
* 09/07/2021: Grade of the [[Media:ML2021-Grades_210624.pdf|24/06/2021 oral exams]] <br />
* 09/07/2021: Updated Homework + Oral [[Media:ML2021-Conversion.pdf|conversion table]]<br />
* 03/07/2021: Updated Homework available [[Media:ML2021-homework-new.zip|here!!!]]<br />
* 08/06/2021: Updated all videos and all slides from the course.<br />
* 02/06/2021: You can fin the 2020/2021 homework [[Media:ML2021-homework.zip|here!!!]]<br />
* 26/05/2021: The link to the form to request an instance of remote examination for June and July is [https://forms.office.com/r/FUrVt8eZNx here]!<br />
* 09/04/2021: From next week lectures will be back to presence (plus webex streaming)<br />
* 22/03/2021: Added completed material from the last lab plus some exercises ... <br />
* 17/03/2021: Added the material for the lab of today ... <br />
* 10/03/2021: 11/03/2021 lecture has been canceled<br />
* 06/03/2021: website update with linear algebra slides and (working) links to all lectures<br />
* 05/03/2021: Since today we are moved fully online so lectures will happen in my webex room (same holds for labs)<br />
* 24/02/2021: Lectures start today<br />
--><br />
<!--<br />
* 08/08/2020: Grading for all projects and first two calls [[Media:Grades_20200723.pdf|are here!!]] <br />
* 22/06/2020: Grading mechanism explained, check [[Media:ML2020_grading_system.pdf|here a handy recap]] <br />
* 14/06/2020: [[Media:ML2020_homework.zip |Here it come the 2020 homework!!!]]<br />
* 03/06/2020: All slides updated<br />
* 02/05/2020: Updated course schedule and added videos to the previous lectures<br />
* 04/04/2020: Updated schedule and added videos of previous lectures<br />
* 31/03/2020: Updated schedule and added material on linear algebra<br />
* 19/03/2020: Added lab material, both with empty notebooks and final result<br />
* 11/03/2020: Added today's lecture videos and planned next week schedule (To Be Completed)<br />
* 11/03/2020: The course starts today!<br />
* 03/03/2020: The course is going to start soon ...<br />
--><br />
<br />
==Course Aim & Organization==<br />
<br />
The objective of the Machine Learning course is to give an in-depth presentation of the techniques most used for pattern recognition, knowledge discovery, and data analysis/modeling. These techniques are presented both from a theoretical (i.e., statistics and information theory) perspective and a practical one (i.e., coding examples) through the descriptions of algorithms and their implementations in a general-purpose programming language (i.e., python).<br />
<br />
The course presents the classical supervised and unsupervised learning paradigms described and discussed presenting regression, classification, and clustering problems in Bioinformatics. The course is composed of a set of lectures on specific machine learning techniques (e.g., generalized linear regression, logistic regression, linear and quadratic discriminant analysis, support vector machines, k-nearest-neighborhood, clustering, etc.) preceded by the introduction of the Statistical Learning framework which acts as a common reference framework for the entire course.<br />
<br />
===Teachers===<br />
<br />
The course is composed of a blending of lectures and exercises by the course teacher and a teaching assistant.<br />
<br />
* [http://www.deib.polimi.it/ita/personale/dettagli/267262 Matteo Matteucci]: the course teacher <br />
* [https://www.deib.polimi.it/ita/personale/dettagli/1638984 Stefano Samele]: the teaching assistant <br />
<br />
===Course Program===<br />
<br />
The course mostly follows the following book which is also available for download in pdf<br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani<br />
<br />
The course lectures will present the theory and practice of the following:<br />
* Machine Learning and Pattern Classification: the general concepts of Machine Learning and Pattern Recognition are introduced within the framework of Statistical Decision Theory with reference to the bias-variance trade-off and the Bayes classifier;<br />
* Generalized Linear Regression: linear methods for regression will be presented and discussed introducing different techniques (e.g., Linear Regression, Ridge Regression, K-Nearest Neighbors Regression, Non-Linear Regression, etc.) and the most common methodologies for model validation and selection (e.g., AIC, BIC, cross-validation, stepwise feature selection, Lasso, etc.).<br />
* Linear and Non-Linear Classification: generative and discriminative techniques for classification will be described and discussed (e.g., Logistic Regression, Linear and Quadratic Discriminant Analysis, K-Nearest Neighbors, Perceptron Rule, and Support Vector Machines, etc.). Metrics for classifiers evaluation and comparison are presented in this part of the course (e.g., accuracy, precision, recall, ROC, AUC, F-measure, Matthew coefficient).<br />
* Unsupervised Learning: the most common approaches to unsupervised learning are described mostly focusing on clustering methods such as hierarchical clustering, k-means, k-medoids, Mixture of Gaussians, DBSCAN, etc<br />
<br />
These topics will be presented both from a theoretical perspective and a practical one via implementations in the general-purpose programming language python.<br />
<br />
===Detailed course schedule===<br />
<br />
A detailed schedule of the course can be found here; topics are just indicative while days and teachers are correct up to some last-minute change (I will notify you by email). Please note that not all days we have lectures!!<br />
<br />
Note: Lecture timetable interpretation<br />
* On Wednesday, in room 26.02, starts at 15:15 (cum tempore), ends at 18:15<br />
* On Thursday, in room 26.01, starts at 12:15 (cum tempore), ends at 14:15<br />
<br />
<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|23/02/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Machine Learning Intro<br />
|-<br />
|24/02/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Statistical Learning Theory (Ch. 1 ISL)<br />
|-<br />
|02/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Statistical Learning Theory - Bias/Variance Trade-off (Ch. 2 ISL)<br />
|-<br />
|03/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Introduction to Linear Algebra<br />
|-<br />
|09/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Python + Numpy + Bias/Variance<br />
|-<br />
|10/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Simple Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|16/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Multi Variate Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|17/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL) <br />
|-<br />
|23/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Multivariate Linear Regression Laboratory<br />
|-<br />
|24/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Generalized Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|30/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Feature Selection and Model Assessment (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|31/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Ridge Regression and Lasso (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|06/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Generalized Linear Regression and Feature Selection Laboratory<br />
|-<br />
|07/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: KNN and Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|13/04/2022 || Wednesday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|14/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|20/04/2022 || Wednesday || 15:15-18:15 || 26.02 ||Matteo Matteucci || Lecture || Classification: Linear Discriminanr Analysis (Ch. 4 ISL)<br />
|-<br />
|21/04/2022 || Thursday || 12:15 - 14:15 || 26.01 || Matteo Matteucci || Lecture || Evaluation methods for classification<br />
|-<br />
|27/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Logistic Regression and LDA Laboratory<br />
|-<br />
|28/04/2022 || Thursday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|04/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || The Perceptron (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|06/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL) <br />
|-<br />
|11/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Unsupervised Learning and Clustering (Ch. 10 ISL)<br />
|-<br />
|12/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Clustering (Ch. 10 ISL)<br />
|-<br />
|18/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || SVM and Classifiers Evaluation Laboratory<br />
|-<br />
|19/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|25/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Clustering Laboratory<br />
|-<br />
|26/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|01/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Clustering Evaluation<br />
|-<br />
|02/06/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|08/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Principal Component Analysis (Ch. 10 ISL)<br />
|}<br />
<br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|24/02/2021 || Wednesday || 15:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
|-<br />
|25/02/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] (Ch. 1 ISL)<br />
|-<br />
|03/03/2021 || Wednesday || 14:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off] (Ch. 2 ISL)<br />
|-<br />
|04/03/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
|-<br />
|10/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|11/03/2021 || Thursday || --- || --- || --- || ---|| --- No lecture ---<br />
|-<br />
|17/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
|-<br />
|18/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|24/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
|-<br />
|25/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|31/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|01/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|07/04/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
|-<br />
|08/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|14/04/2021 || Wednesday || '''15:15-18:15''' || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|15/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis] (Ch. 4 ISL)<br />
|-<br />
|22/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|23/04/2021 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|28/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|29/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
|-<br />
|05/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
|-<br />
|06/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|12/05/2021 || Wednesday || 14:15-18:15 || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|13/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering] (Ch. 10 ISL)<br />
|-<br />
|19/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
|-<br />
|20/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering] (Ch. 10 ISL)<br />
|-<br />
|26/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
|-<br />
|27/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering] (Ch. 10 ISL)<br />
|-<br />
|02/06/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|03/06/2021 || Thursday || 08:15-11:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|04/06/2021 || Friday || 14:15-17:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|11/03/2020 || Wednesday || 14:15 - 18:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3565a411-bed7-4b20-9dd6-00ee8b9ddd54 Course Introduction], [https://web.microsoftstream.com/video/4a702565-386d-4bed-a0c1-9d1daa015703 Introduction to Machine Learning], and [https://web.microsoftstream.com/video/cef9a912-ee47-4254-8f26-318a6a014424 Statistical Machine Learning] (Ch. 1 ISL)<br />
|-<br />
|12/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/389145d3-c3e5-48c2-bf82-d7877bf14b8c Statistical Decision Theory and Bias-Variance trade off] (Ch. 2 ISL)<br />
|-<br />
|18/03/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/bb2155d6-a6f2-4f82-af48-3ceb22951c4b Python + Numpy + Bias/Variance] Laboratory<br />
|-<br />
|19/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b0359dad-971c-412d-8508-fde45e1dc3fe Statistical Decision Theory and Bias-Variance trade off (continued)] (Ch. 2 ISL)<br />
|-<br />
|25/03/2017 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f88827c9-0994-4d3f-80bf-1c9b6637ba18 Simple Linear Regression and Multivariate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|26/03/2017 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/deb2b3f5-d90d-47b8-b309-1ab88979f805 Multivariate Linear Regression (continued)] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|01/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/da0e35db-6995-412a-99ad-f409f0a6752d Multivariae Linear Regression (Part 1)] [https://web.microsoftstream.com/video/8defdff7-ae83-4753-a353-3d39194e63ac (Part 2)] Laboratory<br />
|-<br />
|02/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/c81f59c8-7023-4206-a771-8be062b7cb21 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|08/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/0255cfa0-98de-4465-a8bf-07c93e0974ee Issues with Linear Regression and Generalized Linear Regression] and [https://web.microsoftstream.com/video/e3392148-f1ee-426d-a271-3d8fcf11008a Feature Selection] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|09/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/03656a6b-46c7-483e-9263-0036144adb00 Feature Selection (continued)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|15/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/58093db6-f365-4184-8ce0-c12c03a1589f Generalized Linear Regression and Feature Selection (Part1)] [https://web.microsoftstream.com/video/52b0d7f5-a725-4406-aab3-3be5145d950f (Part 2)] Laboratory<br />
|-<br />
|16/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1565c508-4448-4678-a9e4-4ff411684227 Feature Selection (LASSO)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|22/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d04083a9-8961-4448-bcf2-0576d9dccf4c Classification by KNN (Part 1)] and [https://web.microsoftstream.com/video/c56ef675-486a-425c-819d-404868e07906 Logistic Regression (Part 2)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|23/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3a5f66b1-80d2-4ee5-ba14-7757ae662c97 Classification by Logistic Regression (continued)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|29/04/2020 || Wednesday || 14:15 - 17:15 || --- || --- || --- || --- No Lecture (Laurea) ---<br />
|-<br />
|30/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/a171bc2a-35e7-42c7-bdd0-d295ecfd7e26 Classification by Linear Discriminant Analysis] (Ch. 4 ISL)<br />
|-<br />
|06/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/cef18863-e3fd-481e-bcad-a18455796fd7 Classification via Logistic Regression, and LDA Laboratory (Part 1)] and [https://web.microsoftstream.com/video/670b7f72-5b6b-4168-9f1c-211a9ad25f48 (Part 2)]<br />
|-<br />
|07/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b2ed8ca0-c0c0-4c1a-836d-b2ffee20d85e Evaluation Methods for Classification]<br />
|-<br />
|13/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/2b881d7d-d11e-4432-8873-973bc36eeb61 Perceptron Learning] and [https://web.microsoftstream.com/video/00564932-919a-49a1-9fa5-eb7706640781 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|14/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b72fa8de-f98d-43cf-9609-5833625a4b5c Support Vector Machines and Kernel Trick] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|20/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/fab1f62e-cea0-4cc9-9366-0ccd6bcd161b Classification (SVM and classifiers evaluation) Laboratory (Part 1)] and [https://web.microsoftstream.com/video/130b806d-5390-4321-9d05-f63e079f30a1 (Part 2)]<br />
|-<br />
|21/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1125b85e-f4a1-49d1-991f-333fff893a1e Introduction to Unsupervised Learning] (Ch. 10 ISL)<br />
|-<br />
|27/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d8d0efb5-adfb-4376-afe3-26afb7ffd664 Clustering: Hierachical, k-means, and DBSCAN (Part 1)] and [https://web.microsoftstream.com/video/b7307896-bff7-4fd0-973f-d37fd7f91e13 (Part 2)] (Ch. 10 ISL)<br />
|-<br />
|28/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3f2975c2-1143-4870-8aed-a1a06382be14 Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|03/06/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/0fa04b48-f8c3-488b-bfab-92547d3a9c38 Clustering Laboratory (Part 1)] and [https://web.microsoftstream.com/video/24a40515-afdd-4cca-9b62-19e544c7e12e (Part 2)]<br />
|-<br />
|04/06/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f58132ba-afd3-47ce-89c8-ba16782d8f37 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
|-<br />
|27/11/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Classification by Linear Discriminant Analysis (Ch. 4 ISL)<br />
|-<br />
|03/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Exercises on Classification by Linear Discriminant Analysis<br />
|-<br />
|04/12/2017 || Tuesday || --- || --- || --- || No Lecture <br />
|-<br />
|10/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Clustering: Intro, k-means and the alike, GMM, and hierachical<br />
|-<br />
|11/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Davide Eynard || Clustering: Density-based, Spectral + Evaluation<br />
|-<br />
|14/12/2017 || Friday || 10:15 - 13:15 || TBD || Matteo Matteucci || Classification: from generative to discriminative approaches (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|17/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|18/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|}<br />
--><br />
Chapters are intended as complete except for<br />
* Ch.4 ESL: Section 4.5<br />
* Ch.12 ESL: Sections 12.1, 12.2, 12.3<br />
* Ch.9 ISL: Sections 9.1, 9.2, 9.3<br />
<br />
===Course Evaluation===<br />
<br />
The course evaluation is composed by two parts:<br />
<br />
* HW: Homework with exercises covering the whole program (up to 6 points)<br />
* OR: An oral discussion covering the whole program (up to 26 points)<br />
<br />
the final score will be the sum of HW (not compulsory) and OR scores. You will get the oral grade as a mark in the scale of 30 up to 32/30 which you have to multiply by 0.8125 and then you add to it the score of the project. For your convenience here it is [[Media:ML2021-Conversion.pdf|a conversion table]] with the final mark in case you do not turn in the project or you get the whole 6 marks in the project.<br />
<br />
====Homework #1 2021/2022====<br />
<br />
The first project asks you to develop a regression model on the [[Media:ML-2122-HW1.zip | Forest Fires Data Set]]. The goal of the model is to predict, given a set of features the burned area of forest fires. The project should focus on investigating the part of features selection for the regression task to understand the relationships between the different variables involved fully. <br />
An accurate and helpful description of the dataset is included in the forestfire.names file.<br />
<br />
The project should consist of an executable python notebook, sufficiently commented. Most of the cells should be adequately followed or preceded by an explanation of what you are doing, why, what the output is, how you interpret it, and so on.<br />
<br />
You can submit your notebook via email at stefano.samele@polimi.it. The deadline is 11/05/22 at midday CET.<br />
The notebook should already display all the cells' outputs. A copy and a re-execution will be performed to evaluate your work: we need to be sure your code is actually executable and displays consistent results.<br />
<br />
You can attend the project in a group of maximum two. Scores (0-1-2, with half points) will be assigned based on the ability to organize the investigation and the code, adopt relevant methodologies presented during laboratories, understand and interpret results, and comply with project requests.<br />
<br />
==Teaching Material (the textbook)== <br />
<br />
Lectures will be based on material taken from the book. <br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani<br />
<br />
If you are interested in a more deep treatment of the topics you can refer to the following book from the same authors<br />
<br />
* [http://www-stat.stanford.edu/~tibs/ElemStatLearn/index.html The Elements of Statistical Learning: Data Mining, Inference, and Prediction.] by Trevor Hastie, Robert Tibshirani, and Jerome Friedman.<br />
<br />
Some additional material that could be used to prepare the oral examination will be provided together with the past homeworks.<br />
<br />
===Teacher Slides ===<br />
<br />
In the following you can find the lecture slides used by the teacher and the teaching assistants during classes.<br />
<br />
* [[Media:ML-2020-A0-LinearAlgebraBasics.pdf | [2020/2021] Linear Algebra Basics]]: Basic elements of linear algebra, e.g., vectors, matrices, basis, span, etc.<br />
* [[Media:ML-2122-00-Intro.pdf | [2021/2022] Course introduction]]: introductory slides of the course with useful information about the grading, and the course logistics. Some examples from supervised and unsupervised learning. Regression, classification, clustering terminology and examples.<br />
* [[Media:ML-2122-01-StatisticalLearning.pdf | [2021/2022] Statistical Learning Introduction]]: Statistical Learning definition, rationale, and trade-offs (e.g., prediction vs. inference, parametric vs non parametric models, flexibility vs. interpretability, etc.)<br />
* [[Media:ML-2122-02-LinearRegression.pdf | [2021/2022] Linear Regression]]: Simple Linear Regression and Multiple Linear Regression. Generalized Linear models. Cross-validation techniques. Feature selection. Ridge Regression and Lasso.<br />
* [[Media:ML-2021-03-LinearClassification.pdf | [2020/2021] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods. Discriminative vs. generative methods. Support Vector Machines. <br />
* [[Media:ML-2021-04-Clustering.pdf | [2020/2021] Clustering]]: Introduction to unsupervised learning and clustering, hierarchical clustering, k-means, DBSCNA, indexes for clustering evaluation. <br />
* [[Media:ML-2021-05-PrincipalComponentAnalysis.pdf | [2020/2021] Principal Component Analysis]]: Principal Component Analysis, Geometric Interpretation, Singular Values Decomposition.<br />
<br />
===Laboratories===<br />
<br />
We will use Python (with Jupyter notebooks) throughout the course, thus we kindly ask you to install the "Anaconda" package to be ready for the labs. Here are the [https://www.anaconda.com/products/individual download links]. You can find a simple Jupyter notebook [[Media:ML2021-test.zip | HERE]] to test if the installation succeeded.<br />
<br />
To open the notebook<br />
* launch the "Anaconda Navigator" app<br />
* launch the "jupyter Notebook" app within the navigator, it should automatically open a webpage (it may take a while)<br />
* on the webpage, navigate on the folder where you downloaded the "lab01.00-TestEnvironment.ipynb" file, and press on the file to open it<br />
* then follow the instruction within the notebook<br />
<br />
If you didn't install anaconda but just jupyter, or if you can't find Anaconda Navigator <br />
* open a shell ("Anaconda Prompt" if you are using Windows)<br />
* move on to the folder where you downloaded "lab01.00-TestEnvironment.ipynb"<br />
* run the "jupyter notebook" command, it should automatically open a webpage<br />
* then on the webpage press on the "lab01.00-TestEnvironment.ipynb" file and follow the instructions within the notebook<br />
<br />
The following are the notebook used in the labs:<br />
*[[Media:ML2122-lab01.zip | [2021/2022] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session including the testing environment ([[Media:ML2122-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab02.zip | [2021/2022] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2122-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab03.zip | [2021/2022] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2122-lab03_solutions_part1.zip |complete version]])<br />
*[[Media:ML2122-lab04.zip | [2021/2022] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2122-lab04_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab05.zip | [2021/2022] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fifth lab session ([[Media:ML2122-lab05_solutions.zip |complete version]])<br />
<!--<br />
*[[Media:ML2021-lab01.zip | [2020/2021] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session ([[Media:ML2021-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab02.zip | [2020/2021] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2021-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab03.zip | [2020/2021] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2021-lab03_solutions_tmp.zip |complete version]])<br />
*[[Media:ML2021-lab04.zip | [2020/2021] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab04_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab05.zip | [2020/2021] Material for the fifth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab05_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab06.zip | [2020/2021] Material for the sixth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab06_solutions.zip |complete version]])<br />
--><br />
<!--<br />
* [[Media:ML-2016-03-AssessingModelAccuracy.pdf | [2016] Statistical Learning and Model Assessment]]: Model Assessment for Regression and Classification, Bias-Variance trade-off, Model complexity and overfitting, K-Nearest Neighbors Classifier vs. Bayes Classifier.<br />
* [[Media:ML-2016-05-LinearClassification.pdf | [2016] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods.<br />
* [[Media:ML-2016-06-SupportVectorMachines.pdf | [2016] Support Vector Machines]]: Discriminative vs. generative methids. Hyperplanes learning and Perceptron. Maximum Margin Classifiers. The Kernel trick and Support Vector Machines.<br />
For exercises and lab material please refer to [http://davide.eynard.it/pattern-analysis-and-machine-intelligence-2015-2016/ Davide Eynard website].<br />
--><br />
<br />
===Additional Resources===<br />
Papers and links useful to integrate the textbook<br />
<br />
* [http://www.ekof.bg.ac.rs/wp-content/uploads/2016/09/Ponavljanje-matematike-Wayne-Winston-Operations-Research-Applications-and-Algorithms-4-edition.pdf Basic Linear Algebra]: "Basic Linear Algebra" chapter from Wayne Winston book "Operations Research Applications and Algorithms (4th ed.)"<br />
* [http://scott.fortmann-roe.com/docs/BiasVariance.html Bias vs. Variance]: "Understanding the Bias-Variance Tradeoff" essay by Scott Fortmann-Roe<br />
* [http://www.onmyphd.com/?p=kkt.karush.kuhn.tucker Karush Kuhn Tucker Conditions]: a short note on their meaning with references to relevant wikipedia pages<br />
* [http://students.brown.edu/seeing-theory/ Seeing Theory]: a website where the basic concepts of probability and statistics are explained in a visual way.<br />
<br />
Python examples to better practice with numpy library<br />
* [https://github.com/Kyubyong/numpy_exercises Some numpy exercises], we did roughly 1, 2, 4, 6, 9, 10, 13<br />
* [https://github.com/rougier/numpy-100 Othen numpy exercises] from simple to complex<br />
* [https://www.w3resource.com/python-exercises/numpy/index-array.php More numpy exercises] from simple to complex<br />
<br />
===Year 2020/2021 Recordings (use at your own risk)===<br />
<br />
As I registered these due to pandemics, I am making them available. They DO NOT REPLACE THIS YEAR classroom lectures which are to be considered as the official material of this year, but they might be useful to double-check your notes.<br />
<br />
* 24/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
* 25/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] <br />
* 03/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off]<br />
* 04/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
* 10/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression]<br />
* 18/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression]<br />
* 25/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression]<br />
* 31/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment]<br />
* 01/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso]<br />
* 08/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression]<br />
* 14/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression]<br />
* 15/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis]<br />
* 29/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
* 06/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] <br />
* 12/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] <br />
* 13/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering]<br />
* 20/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering]<br />
* 27/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering]<br />
* 03/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation]<br />
* 04/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] <br />
<br />
Also, labs are available, however, the teaching assistant this year has changed.<br />
<br />
* 17/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
* 24/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
* 07/04/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
* 05/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
* 19/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
* 26/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
<br />
<!--<br />
===Past Exams and Sample Questions===<br />
For some samples of exams you can check the last year PAMI ones<br />
<br />
* [[Media:2016_02_03_PAMI.pdf |03/02/2016 PAMI Exam]]<br />
* [[Media:2016_02_19_PAMI.pdf |19/02/2016 PAMI Exam]]<br />
* [[Media:2016_07_06_PAMI.pdf |06/07/2016 PAMI Exam]]<br />
* [[Media:2016_09_09_PAMI.pdf |09/09/2016 PAMI Exam]]<br />
* [[Media:2016_09_28_PAMI.pdf |28/09/2016 PAMI Exam]]<br />
--><br />
===Online Resources===<br />
<br />
The following are links to online sources which might be useful to complement the material above<br />
* [https://towardsdatascience.com/linear-algebra-survival-kit-for-machine-learning-94901a62465e An Introduction to Linear Algebra] with numpy examples. It provides the very fundamental definitions, does not cover eigenvalues and eigenvectors.<br />
* [https://www.r-bloggers.com/in-depth-introduction-to-machine-learning-in-15-hours-of-expert-videos/ Statistical Learning MOOC] covering the entire ISL book offered by Trevor Hastie and Rob Tibshirani. Start anytime in self-paced mode.<br />
* [http://math.arizona.edu/~hzhang/math574m.html MATH 574M] University of Arizona Course on ''Statistical Machine Learning and Data Mining''; here you can find slides covering part of the course topics (the reference book for this course is again ''The Elements of Statistical Learning'')<br />
<br />
<!--<br />
== 2013-2014 Homework ==<br />
<br />
The 2013 Homework (alike the 2012 one) is organized as an octave series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
=== Part 1: Linear Classification Methods ===<br />
<br />
* [[Media:homework_pami_classification_2013_2014.pdf | Homework 2013-2014 on Classification]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 17/11 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
=== Part 2: Regression ===<br />
* [[Media:homework_pami_regression_2013_2014.pdf | Homework 2013-2014 Regression]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to malago@di.unimi.it (cc to matteo.matteucci@polimi.it) is Friday 20/12 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:diabete.mat | diabete.mat]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
For any question or doubt please sen us an email as soon as possible.<br />
<br />
'''Note 1:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
<strike>'''Note 2:''' rename the file Diabete.data into diabete.mat ... still fighting with the CSM :-)</strike><br />
<br />
'''Note 3:''' the code has been tested with octave under linux, we suggest to use it not to spend too much time with installing it under windows or using matlab. If you do not have linux installed, try using a live CD as the ubuntu 13.04 live distro ;-)<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at this post<br />
<br />
* [http://davide.eynard.it/2013/12/30/octave-clustering-demo-part-6-more-evaluation/ Homework 2013-2014 on clustering evaluation]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is the end of the course. You have to '''send it to davide.eynard_at_gmail.com Friday 24/01 23:59'''.<br />
<br />
'''Note 1:''' for any doubt or question send an email, as soon as possible, to Davide Eynard so to have a prompt reply and not get stuck during homework execution.<br />
<br />
'''Note 2:''' you have to turn in only the solution of "Ocatave clustering demo part 6", while the other parts can be used as reference to improve your understanding in basic clustering algorithms.<br />
<br />
=== Part 2: Classification ===<br />
<br />
* [[Media:homework_pami_classification_2013.pdf | Homework 2013 Classification]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 23/06 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
<br />
<br />
'''Errata Corrige''': there were a few bugs in the homework text. I have updated the pdf and they were:<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the Fisher projection it is more correct to use only the training data to learn the projection and then we can train and test on the corresponding subsets<br />
<br />
a = FisherProjection(X(training,:),Y(training,:));<br />
reducedX = X*a(:,1);<br />
[mu_0, mu_1, sigma, p_0, p_1] = linearDiscriminantAnalysis_train(reducedX(training), Y(training))<br />
<br />
I forgot to filter for just the training samples when performing Quadratic Discriminant Analysis<br />
<br />
quadX = expandToQuadraticSpace(X);<br />
%check this out!<br />
size(quadX)<br />
beta = linearRegression_train(quadX(training), Y(training));<br />
<br />
And in general you should always train on the training data and test on the testing data ;-).<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at these posts<br />
<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-4-k-medoids/ Homework 2013 on k-medoids]<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-5-hierarchical-clustering/ Homework 2013 on hierarchical clustering]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is '''before the you take the exam''' sending it to davide.eynard_at_gmail.com.<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3:] follow this tutorial and answer the questions from all 5 sub-tutorials.<br />
<br />
== 2012 Homework ==<br />
<br />
The Homework of 2012 organized like an octave/matlab series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
* [[Media:PAMI_homework_2012_1.pdf | Homework 2012 part 1]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to matteucci@elet.polimi.it and malago@elet.polimi.it is Tuesday 5/6 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
'''Note:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
* [[Media:PAMI_homework_2012_2.pdf | Homework 2012 part 2]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade; the deadline to submit the solution by email to matteucci@elet.polimi.it is the day before the exam you decide to attend''' (e.g., if you decide to take the exam on the 26/6 then you need to turn it in by 25/6).<br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Errata Corrige''': there were a few bugs a bug in the homework text. I have updated the pdf and they were:<br />
In the code for loading the data I forgot to remove the first column which you do not need<br />
data = dlmread('SAheart.data',',',1,1);<br />
X = data(:,1:9);<br />
Y = data(:,10);<br />
<br />
In the StratifiedSampling function the sorted verctors should be assigned<br />
% just an ahestetic sorting<br />
testing = sort(testing);<br />
training = sort(training);<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the expansion to quadratic space the starting index for the inner loop should i and not 1. Moreover in some cases it might be possible to have columns which are duplicated (e.g., with boolean attribute); in this case you should not need the robust version of linear regression.<br />
function extendedX = expandToQuadraticSpace(X)<br />
% adds new columns to extendedX; keeps X for other calculations<br />
extendedX = X;<br />
for i=1:size(X, 2)<br />
for j=i:size(X, 2)<br />
newColumn = X(:, i) .* X(:, j);<br />
extendedX = [extendedX newColumn];<br />
end<br />
end<br />
% remove duplicated columns<br />
duplicates = [];<br />
for i=1:size(extendedX, 2)<br />
for j=i+1:size(extendedX, 2)<br />
if(sum(extendedX(:,i)==extendedX(:,j)) == size(X,1))<br />
duplicates = [duplicates j];<br />
end<br />
end<br />
end<br />
extendedX(:,duplicates) = [];<br />
end<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3]: the third part of the homework is '''optional''', so you are not required to complete it. However, if you want to give it a try and use it to understand the topics covered by Davide Eynard in his lectures you are welcome. As usual, the questions in this homework are very close to the ones you will find in classworks, so we suggest to have a look at hose anyway! '''In case you decide to turn it in and have it contribute with a 10% to the grade, the deadline to submit the solution by email to matteucci@elet.polimi.it and davide.eynard@polimi.it is the day before you decide to take the exam''' (e.g., if you decide to take the exam on the 10/7 then you need to turn it in by 9/7)<br />
<br />
'''Note:''' homeworks are meant to let you see (and practice) a little bit with the topics presented during the course. They are evaluated because you spent some time on those and thus you deserve some credit for that ;-)<br />
<br />
== 2011 Homework ==<br />
<br />
Here you can find the homework for the year 2011 and the material you need to complete it. Please read the F.A.Q. below and for any unsolved doubt contact the teachers of the course.<br />
<br />
* [[Media:PAMI_homework_2011_v02.pdf | Homework 2011 v02]] a minor change in the signature of the logistic regression function<br />
* [[Media:PAMI_homework_2011_v01.pdf | Homework 2011 v01]] text with questions and exercises<br />
* [[Media:dataset.txt | Dataset]] for the clustering exercise in csv format<br />
<br />
'''Frequently Asked Questions'''<br />
<br />
* '''''How do I take the square root of a matrix?''''': check the diagonalization approach from [http://en.wikipedia.org/wiki/Square_root_of_a_matrix].<br />
<br />
* '''''How do I compute the chi square statistics?'''': in the slide there is a cut and paste error since e_ij=R_it*C_tj as described here [http://en.wikipedia.org/wiki/Pearson's_chi-square_test]<br />
<br />
* '''''When it is due? In which format?''''': The homework is due on the 29/06 and should be delivered by email. Send us (all the course teachers) the .m files in a zip archive attached to this email and a link to the pdf with the written part (not to flood our mailboxes). <br />
<br />
* '''''Can we do that in groups? How many people per group?''''': Yes, you can work on the homework in groups, but no more than 3 people per group are allowed. Put the names of all homework authors in the pdf and in all the .m files. If you discuss something with other people, w.r.t. the people in your group, point it out in the pdf file as well.<br />
<br />
* '''''Can we ask questions about the exercises or the code?''''': Yes you should! First of all, there might be unclear things in the exercise descriptions and those should be clarified as soon as possible for all (this is why the homework is versioned). But you could ask for help as well, our goal is to have you all solving all the questions and get a high grade ... but we will not do the homework on you behalf ;-)<br />
<br />
* '''''How the optional questions are graded?''''': They compensate for possible errors in the other questions; we suggest to work on them anyway to be sure you get the maximum grading.<br />
<br />
* '''''How the homework will be graded?''''': we are interested in understanding if you understood or not; thus we are not interested in the result, but we want to check how you get to the result. So please: 1) clarify all the assumptions and all the steps in your exercises 2) comment as much as possible your .m files!<br />
<br />
--></div>Matteohttps://chrome.deib.polimi.it/index.php?title=Robotics&diff=3834Robotics2022-05-11T13:12:38Z<p>Matteo: </p>
<hr />
<div>__FORCETOC__<br />
<br />
The following are last-minute news you should be aware of ;-)<br />
* 11/05/2022: Updated the detailed schedule of lectures, double check it!!!<br />
* 11/04/2022: Corrected bags and updated slides are now available in the shared folder. New deadline: May 8 2022, 23:59 CEST<br />
* 11/04/2022: All communications regarding the project will be though the shared folder and slack<br />
* 04/04/2022: Hold-on! -> due to a bug in the bags an update of the homework will be available soon <br />
* 30/03/2022: The first homework project of the course is out!<br />
* 06/03/2022: Added link to Paolo Cudrano slides, updated slide first two weeks Matteo Matteucci<br />
* 06/03/2022: Added link to last year's recordings<br />
* 23/02/2022: Detailed calendar published<br />
* 23/02/2022: Lectures start today!<br />
<br />
<!--<br />
* 19/02/2022: results of 02/02/2022 call are [[Media:Grades_20220202.pdf|here]]. They include all HWs grades! <br />
* 31/01/2022: results of 12/01/2022 call are [[Media:Grades_20220112.pdf|here]]. They include all HWs grades! <br />
* 03/10/2021: results of 31/08/2021 call are [[Media:Grades_20210831.pdf|here]]. They include all HWs grades! <br />
* 10/09/2021: results of 31/08/2021 call for Laureandi are [[Media:Grades_20210831_tmp.pdf|here]]. They include all HW1 grades! <br />
* 20/08/2021: results of 26/07/2021 call are [[Media:Grades_20210726.pdf|here]]. They include all HW1 grades! Green grades will be rounded up with ceil.<br />
* 25/07/2021: results of 29/06/2021 call are [[Media:Grades_20210629.pdf|here]]. They include all HW1 grades! Green rows will be rounded up with ceil.<br />
* 20/07/2021: results of 29/06/2021 call are [[Media:Grades_20210629_tmp2.pdf|here]] ... they do not include all HW1 grades!<br />
* 09/07/2021: results of 29/06/2021 call for graduating students are [[Media:Grades_20210629_tmp.pdf|here]]<br />
* 08/06/2021: all lecture videos are now published and slides pdf updated.<br />
* 26/05/2021: The link to the form to request an instance of remote examination for June and July is [https://forms.office.com/r/U4hkkaiq8h here!]<br />
* 26/05/2021: Revised final schedule of the course, last lecture will be on 31/05/2021<br />
* The second robotics project is out!<br />
* 21/04/2021: You can join the course [https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZmE0NTExYWQtNjFhMi00ZjE3LTg2ZTktOTQ5MDRjZjU1ZTk5%40thread.v2/0?context=%7b%22Tid%22%3a%220a17712b-6df3-425d-808e-309df28a5eeb%22%2c%22Oid%22%3a%22335b7274-e5d4-455b-aff1-ddd0f4ef5598%22%7d MS Team here]<br />
* 14/04/2021: The first homework project is out! Check it [https://chrome.deib.polimi.it/index.php?title=Robotics#Course_Projects here]<br />
* 09/04/2021: Lab sessions will be back to presence from 20/04/2021 on (check the detailed schedule)<br />
* 09/04/2021: Added a new lecture on 21/04/2021 to recover the one missed two weeks ago<br />
* 30/03/2021: Today's lab webex room is Simone Mentasti one<br />
* 25/03/2021: Added link to the last lab video and some references about C++ <br />
* 24/03/2021: This morning lecture is canceled (afternoon lab will happen as usual)<br />
* 06/03/2021: Updated video from the lab and the lectures<br />
* 05/03/2021: Added link to USB stick linux distribution [https://chrome.deib.polimi.it/index.php?title=Robotics#Useful_stuff_from_the_web here]!!!<br />
* 05/03/2021: From today until new communication lectures and labs will be online in the professor webex room<br />
* 03/03/2021: Today's lab webex room is Simone Mentasti one (for presence no change, is the normal class)<br />
* 24/02/2021: Lecture videos and slides published <br />
* 24/02/2021: Lectures start today!<br />
--><br />
<!--<br />
* 05/10/2020: Final [[Media:Grades_20200908_hws_final.pdf|grades]] from the 08/09/2020 call <br />
* 18/07/2020: Final [[Media:Grades_20200617_hws_final.pdf|grades]] from the 17/06/2020 call <br />
* 10/07/2020: Second [[Media:Grades_20200617_hws.pdf|homework and urgent grades]] from the 17/06/2020 call <br />
* 12/06/2020: Exam rehearsal [https://polimi-it.zoom.us/j/89319381617?pwd=bE9BYi91bHRBZ2JJTTR4Qm1YaFhJQT09 zoom room] and [https://forms.office.com/Pages/ResponsePage.aspx?id=K3EXCvNtXUKAjjCd8ope6ztteKg6OERCsstxb4n43e9UMjQyRkVKQktJQzBGQ1pHQURGQTFCRU0wRy4u form to be filled] <br />
* 03/06/2020: First homework results are [[Media:Grades_2020_HW1.pdf|here]] ;-)<br />
* 24/05/2020: Updates on the material about navigation: new slides include also planning but it is not part of this year program<br />
* 24/05/2020: Link to a blog post and a paper about EKF-SLAM<br />
* 24/05/2020: Updates on the schedule, with links to videos and one additional class<br />
* 02/05/2020: Updated full course schedule<br />
* 18/04/2020: Updated videos about ROS and published first project material!!!<br />
* 04/04/2020: Updated slides about Robot Odometry with fixes<br />
* 04/04/2020: Fixed schedule, added skid-steering paper, added fixed version of kinematics slides [2019/2020]<br />
* 22/03/2020: Added link to Simone Mentasti online slides repository<br />
* 10/03/2020: Change in the detailed schedule to anticipate the ROS labs and add 2 days which I originally forgot :-)<br />
* 06/03/2020: Added FAQ section, the video of last lecture, and a "youtube" section in the teaching material<br />
* 05/03/2020: Need to log in Polimi Office 365 web-mail to access the video <br />
* 05/03/2020: Added link to the video of the lecture<br />
* 04/03/2020: The course starts today!<br />
* 03/03/2020: Under Update! Tomorrow we start the new course edition!<br />
--><br />
<br />
<!--<br />
The following are last minute news you should be aware of ;-)<br />
23/02/2020: [[Media:Grades_20200212.pdf|Here]] you find the scores for the 12/02/2020 exam call, they include also the homeworks<br />
08/02/2020: [[Media:Grades_20200122.pdf|Here]] you find the scores for the 22/01/2020 exam call, they include also the homeworks<br />
28/08/2019: [[Media:Grades_20190910.pdf|Here]] you find the scores for the 10/09/2019 exam call, they include also the homeworks<br />
28/08/2019: [[Media:Grades_20190724.pdf|Here]] you find the scores for the 24/07/2019 exam call, they include also the homeworks<br />
21/07/2019: [[Media:Grades_20190703.pdf|Here]] you find the scores for the 03/07/2019 exam call, they include also the homeworks<br />
25/06/2019: Deadline extension!!! Second part of the project is due by July the 8th at 23:59!!! <br />
28/05/2019: Schedule update with additional lecture<br />
12/05/2019: Project slide uploaded!!!<br />
11/05/2019: Change in the detailed schedule for Wednesday 15/05/2019 and Monday 27/5/2019 <br />
07/04/2019: Updated version on slides about robot localization<br />
27/03/2019: Uploaded first version of slides on robot localization<br />
10/03/2019: Uploaded slides on mobile robot odometry<br />
05/03/2019: Swap on lecture scheduling 27/03 and 29/04<br />
26/02/2019: Course slides updated<br />
25/02/2019: Here it comes a new edition of the course!<br />
01/10/2018: [[Media:Grades_20180911.pdf|Here]] you find the scores for the third exam calls, they include also the second homework<br />
30/07/2018: [[Media:Grades_20180713.pdf|Here]] you find the scores for the first and second exam calls, they include also the second homework<br />
12/07/2018: [[Media:Grades_20180628_tmp.pdf|Here]] you find the scores for the first exam call, they do not include the second homework yet<br />
01/06/2018: [[Media:Homework_20180601.pdf|Here]] you find the scores for the first homework ... on Monday you will get the second (and last) one<br />
23/05/2018: Updated schedule<br />
23/05/2018: Updated slides on SLAM<br />
17/04/2018: Updated schedule until the end of the semester<br />
25/03/2018: Updated 2017/2018 academic year for lectures and exercises <br />
11/03/2018: You can find here the [[Media:Grades_2018-02_20.pdf|grades of the 20/02/2018 call]] including the project grades <br />
28/02/2018: Update detailed schedule.<br />
26/02/2018: Course starts today!<br />
--><!--<br />
02/10/2017: you can find here the [[Media:Grades_20170904_1.pdf|grades of the 04/09/2017 call]] including the project grades (colors do not have any meaning).<br />
12/09/2017: you can find here the [[Media:Grades_20170904.pdf|grades of the 04/09/2017 call]] for LAUREANDI including the project grades (except one).<br />
12/09/2017: the final grades of the [[Media:Grades_20170717_2.pdf|17/07/2017 call]] including the project grades are out.<br />
22/08/2017: you can find here the [[Media:Grades_20170717.pdf|grades of the 17/07/2017 call]]. Projects not included.<br />
20/08/2017: the final grades of the [[Media:Grades_20170701_3.pdf|01/07/2017 call]] with the projects are out ... the following call will come shortly <br />
25/07/2017: the deadline to deliver the second part of the homework project has been moved to Monday 07/08/2017<br />
15/07/2017: you can find here the [[Media:Grades_20170701_2.pdf|grades of the 01/07/2017 call]] with the projects for the laurandi students included. <br />
11/07/2017: you can find here the [[Media:Grades_20170701.pdf|grades of the 01/07/2017 call]]. Projects not included. <br />
11/07/2017: Update on Homework project<br />
12/06/2017: Second part of the project published<br />
05/06/2017: Sent confirmation email to students who have submitted the first part of the project <br />
12/05/2017: "Project clinic" details published in the schedule<br />
10/05/2017: Two dates for the "Project clinic" are planned please stay tuned for details<br />
08/05/2017: Change in the course Schedule ... check the updates!<br />
18/04/2017: Fixed link in the Homework Part A assignment.<br />
15/04/2017: The Homework Part A is out!!<br />
15/04/2017: Uploaded slides from Bardaro about ROS<br />
06/03/2017: Lectures start today!!<br />
--><br />
<!--<br />
07/10/2016: published [[Media:Grades_20160926.pdf|results of the 26/09/2016 call including projects]]<br />
12/09/2016: published [[Media:Grades_20160905.pdf|results of the 05/09/2016 call]]. '''Yellow projects still to be graded thus the final mark does not include those yet!'''<br />
09/09/2016: published [[Media:Grades_20160627_20160720.pdf|results of the first and second call including projects]]<br />
25/08/2016: published [[Media:Grades_20160720.pdf|results of the second call of the exam]], as well al [[Media:20160720.pdf|the text of the exam]] itself<br />
15/07/2016: the deadline for delivering the course project has been extendend until the end of August 2016.<br />
15/07/2016: published [[Media:Grades_20160627.pdf|results of the first call of the exam]], as well al [[Media:20160627.pdf|the text of the exam]] itself<br />
23/06/2016: Published the slides also in ppsx format<br />
15/06/2016: Published the updated and final version of the project description<br />
13/06/2016: Deadline for the course project is July, fixed on the course webpage<br />
23/05/2016: Course schedule change on 24-25/5 and 8-9/6<br />
16/05/2016: Some updates on the detailed course schedule ...<br />
12/05/2016: Published course project description v0.9<br />
04/05/2016: Published slides about SLAM with Laser and SLAM<br />
04/05/2016: Published slides about ROS robot architecture for navigation and code examples<br />
14/04/2016: Change in course detailed schedule: no lecture on 27/04/2016 and swap of teachers between 20/04 and 28/04<br />
14/04/2016: Published slides about Kinematics and Motion Control (draft) by Matteucci<br />
13/04/2016: Published slides about Middlewares and ROS by Bardaro<br />
19/03/2016: Published slides about Sensors, Actuators (Matteucci) and Gazebosim (Bardaro)<br />
09/03/2016: Change in course timetable, lectures start at 14:00 (sharp!) and end at 15:30 (roughly)<br />
09/03/2016: Lectures start today!!<br />
--><br />
<br />
==Course Aim & Organization==<br />
<br />
This course will introduce basic concepts and techniques used within the field of autonomous mobile robotics. We analyze the fundamental challenges for autonomous intelligent systems when these move on wheels or legs and present the state of the art solutions currently employed in mobile robots and autonomous vehicles with a focus on autonomous navigation, perception, localization, and mapping.<br />
<br />
===Teachers===<br />
<br />
The course is composed by a blending of lectures and exercises by the course teacher and a teaching assistant.<br />
<br />
* [https://www.deib.polimi.it/ita/personale/dettagli/267262 Matteo Matteucci]: the course teacher and this is his [HTTP://politecnicomilano.webex.com/join/matteo.matteucci webex room]<br />
* [https://www.deib.polimi.it/eng/people/details/1304888 Simone Mentasti]: the teaching assistant and this is his [HTTP://politecnicomilano.webex.com/join/simone.mentasti webex room]<br />
* [https://www.deib.polimi.it/ita/personale/dettagli/974764 Paolo Cudrano]: the teaching assistant and this is his [HTTP://politecnicomilano.webex.com/join/paolo.cudrano webex room]<br />
<br />
===Course Program===<br />
<br />
Lectures will provide theoretical background and real-world examples. Lectures will be complemented with practical software exercises in simulation and on real data for all the proposed topics and the students will be guided in developing the algorithms to control an autonomous robot.<br />
<br />
Among other topics, we will discuss:<br />
* Mobile robots kinematics,<br />
* Sensors and perception,<br />
* Robot localization and map building,<br />
* Simultaneous Localization and Mapping (SLAM),<br />
* Path planning and collision avoidance.<br />
<br />
===Detailed course schedule===<br />
<br />
A detailed schedule of the course can be found here; topics are just indicative while days and teachers are correct up to some last minute change (I will notify you by email). Please note that not all days we have lectures!!<br />
<br />
Note: Lecture timetable interpretation<br />
* On Wednesday, in 26.11, starts at 12:15, ends at 14:15<br />
* On Thursday, in 26.11, starts at 14:50, ends at 16:15<br />
<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic <br />
|-<br />
|23/02/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Course/Robotics Intro<br />
|-<br />
|24/02/2022 || Thursday || 14:15 - 16:15 || 26.11 || Matteo Matteucci || Lecture || Actuators<br />
|-<br />
|02/03/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Sensors<br />
|-<br />
|03/03/2022 || Thursday || 14:15 - 16:15 || 26.11 || Paolo Cudrano || Laboratory || ROS Install<br />
|-<br />
|09/03/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Sensors<br />
|-<br />
|10/03/2022 || Thursday || 14:15 - 16:15 || 26.11 || Paolo Cudrano || Laboratory || ROS Basics<br />
|-<br />
|16/03/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Kinematics<br />
|-<br />
|17/03/2022 || Thursday || 14:15 - 16:15 || 26.11 || Paolo Cudrano || Laboratory || Pub / Sub<br />
|-<br />
|23/03/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Kinematics<br />
|-<br />
|24/03/2022 || Thursday || 14:15 - 16:15 || 26.11 || Paolo Cudrano || Laboratory || Services and Params<br />
|-<br />
|30/03/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Localization and Lidars <br />
|-<br />
|31/03/2022 || Thursday || 14:15 - 16:15 || 26.11 || Paolo Cudrano || Laboratory || TF / Rviz / Actions <br />
|-<br />
|06/04/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Localization and Bayes Filters<br />
|-<br />
|07/04/2022 || Thursday || 14:15 - 16:15 || 26.11 || Matteo Matteucci || Lecture || Localization and Kalman Filters<br />
|-<br />
|13/04/2022 || Wednesday || --- || --- || --- || --- || --- Prove in itinere ---<br />
|-<br />
|14/04/2022 || Thursday || 14:15 - 16:15 || 26.11 || Matteo Matteucci || Lecture || Localization and Kalman Filters<br />
|-<br />
|20/04/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Localization and Kalman Filters<br />
|-<br />
|21/04/2022 || Thursday || 14:15 - 16:15 || 26.11 || Simone Mentasti || Laboratory || rospy, rosbag, message filter, plotjuggler<br />
|-<br />
|27/04/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Localization and Kalman Filters<br />
|-<br />
|28/04/2022 || Thursday || --- || --- || --- || --- || --- Lauree ---<br />
|-<br />
|04/05/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Mapping and SLAM<br />
|-<br />
|05/05/2022 || Thursday || 14:15 - 16:15 || 26.11 || Simone Mentasti || Laboratory || ROS on multiple machines, time synchronization, Actionlib, latched pub, async spinner<br />
|-<br />
|11/05/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Mapping and SLAM<br />
|-<br />
|12/05/2022 || Thursday || 14:15 - 16:15 || 26.11 || Matteo Matteucci || Lecture || Algorithms for Robot Navigation<br />
|-<br />
|18/05/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Simone Mentasti || Laboratory || Robot Navigation, Stage, Gmapping<br />
|-<br />
|19/05/2022 || Thursday || 14:15 - 16:15 || 26.11 || Simone Mentasti || Laboratory || Robot Navigation (Part II), Robot Localization, mapviz<br />
|-<br />
|25/05/2022 || Wednesday ||--- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|26/05/2022 || Thursday || 14:15 - 16:15 || 26.11 || Simone Mentasti || Laboratory || ROS2, foxglove, second project<br />
|-<br />
|01/06/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Algorithms for Robot Navigation<br />
|-<br />
|02/06/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|08/06/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Algorithms for Robot Navigation<br />
|}<br />
<br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic <br />
|-<br />
|24/02/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=e953e0e29b744f0fa604c2c401cb40b6 Course logistics] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=2068c40227aa4091a5483bb3c57af5e1 Introduction to Robotics]<br />
|-<br />
|24/02/2021 || Wednesday || 14:15 - 16:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|02/03/2021 || Tuesday || 17:15 - 19:15 || 3.0.2 (EX S.0.5) || Paolo Cudrano || ROS Team 1 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d260c9fb0aeb4963bfb3aa7be89a1632 Introduction to middleware in Robotics]<br />
|-<br />
|03/03/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=e74e003ef5664d849f848ff3831dd7e6 Sensors and Actuators]<br />
|-<br />
|03/03/2021 || Wednesday || 14:15 - 16:15 || 25.2.2 (EX D.3.2) || Simone Mentasti || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=3196f800c2be49b88f858ca6fd96b117 Introduction to middleware in Robotics]<br />
|-<br />
|09/03/2021 || Tuesday || 17:15 - 19:15 || Online on webex || Paolo Cudrano || ROS Team 1 || ROS Basics (see next for recoding)<br />
|-<br />
|10/03/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=30df56c53c6a4ac199dafff310f1f222 Robot Sensors] and [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4dbee67823f8417f8e3784248c4712db Intro to SLAM]<br />
|-<br />
|10/03/2021 || Wednesday || 14:15 - 16:15 || Online on webex || Paolo Cudrano || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=86c7caa885764429aff9777ed5cfa322 ROS Basics]<br />
|-<br />
|16/03/2021 || Tuesday || 17:15 - 19:15 || Online on webex || Paolo Cudrano || ROS Team 1 || Publishers and Subscribers (see next for recording)<br />
|-<br />
|17/03/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d85a41c9c6404ccab84b725f902c99eb Robot Kinematics (Differential Drive)]<br />
|-<br />
|17/03/2021 || Wednesday || 14:15 - 16:15 || Online on webex || Paolo Cudrano || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=41a263d5283e4c5d8a16840a1277512b Publishers and Subscribers]<br />
|-<br />
|23/03/2021 || Tuesday || 17:15 - 19:15 || Online on webex|| Paolo Cudrano || ROS Team 1 || Services and Parameters (see next for recording)<br />
|-<br />
|<s>24/03/2021</s> || <s>Wednesday</s> || <s>10:15 - 13:15</s> || <s>Online on webex</s> || <s>Matteo Matteucci</s> || <s>Lecture</s> || <s>Robot Kinematics </s><br />
|-<br />
|24/03/2021 || Wednesday || 14:15 - 16:15 || Online on webex || Paolo Cudrano || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=3e67b96db3bb4001a3a8af5b5b12f435 Services and Parameters]<br />
|-<br />
|30/03/2021 || Tuesday || 17:15 - 19:15 || Online on webex|| Simone Mentasti || ROS Team 1 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=b9eb5355185b49c4955ad3515f0e2b7f TF, RVIZ (Mentasti recording)]<br />
|-<br />
|31/03/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=a323ca89bbbb4fd7b30fb68b1037c10c Robot Kinematics (Continued)]<br />
|-<br />
|31/03/2021 || Wednesday || 14:15 - 16:15 || Online on webex || Paolo Cudrano || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=aabb359b39a44780adc917fa1a86ebb1 TF, RVIZ (Cudrano recording)]<br />
|-<br />
|06/04/2021 || Tuesday || 17:15 - 19:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|07/04/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ddc9aed131194c568131dd7e5c0875b3 Localization and LiDARS]<br />
|-<br />
|07/04/2021 || Wednesday || 14:15 - 16:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|13/04/2021 || Tuesday || 17:15 - 19:15 ||Online on webex|| Paolo Cudrano || ROS Team 1 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=e08a2c0739214339bf2ce4fb13dbb098 Bags, Message filters and rospy] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fe8dba62b550480d8ab6254f2e5bc8f5 Project 1 Presentation]<br />
|-<br />
|14/04/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=53269a220d2a4b5b885c36bcc1984116 Localization and Bayes filters]<br />
|-<br />
|14/04/2021 || Wednesday || 14:15 - 16:15 || Online on webex || Paolo Cudrano || ROS Team 2 || Bags, Message filters and rospy (see previous for recording)<br />
|-<br />
|20/04/2021 || Tuesday || 17:15 - 19:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|21/04/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fdb9155b23794cc6aac379e0cc2c0bf6 Localization with Kalman filters and Particle filters]<br />
|-<br />
|21/04/2021 || Wednesday || 14:15 - 16:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|27/04/2021 || Tuesday || 17:15 - 19:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|28/04/2021 || Wednesday || 10:15 - 13:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|28/04/2021 || Wednesday || 14:15 - 16:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|04/05/2021 || Tuesday || 17:15 - 19:15 || 3.0.2 (EX S.0.5) || Simone Mentasti || ROS Team 1 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7f075850e538498aa019575cdcab9eb2 ROS on Multiple Devices]<br />
|-<br />
|05/05/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=486985ca26b04cb0962143a7a58491b6 Mapping and SLAM]<br />
|-<br />
|05/05/2021 || Wednesday || 14:15 - 16:15 || 25.2.2 (EX D.3.2) || Simone Mentasti || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=138182322e7a4a799e162e4c49b39a66 ROS on Multiple Devices]<br />
|-<br />
|11/05/2021 || Tuesday || 17:15 - 19:15 || 3.0.2 (EX S.0.5) || Simone Mentasti || ROS Team 1 || Robot Navigation<br />
|-<br />
|12/05/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=3aaa118d78b74c67b0398bf9cf5bf2e1 Robot Motion Control]<br />
|-<br />
|12/05/2021 || Wednesday || 14:15 - 16:15 || 25.2.2 (EX D.3.2) || Simone Mentasti || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=39ba34fc6ae649f0b308fa5630451297 Robot Navigation]<br />
|-<br />
|18/05/2021 || Tuesday || 17:15 - 19:15 || 3.0.2 (EX S.0.5) || Simone Mentasti || ROS Team 1 || Robot Navigation (see next)<br />
|-<br />
|<s>19/05/2021</s>||<s>Wednesday</s>||<s>10:15 - 13:15</s>||<s>Online on webex</s>||<s>Matteo Matteucci</s>||<s>Lecture</s>||<s>Algorithms for Robot Navigation</s><br />
|-<br />
|19/05/2021 || Wednesday || 14:15 - 16:15 || 25.2.2 (EX D.3.2) || Simone Mentasti || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=30436cc0892841c0adffd24cce00c467 Robot Navigation]<br />
|-<br />
|25/05/2021 || Tuesday || 17:15 - 19:15 || 3.0.2 (EX S.0.5) || Simone Mentasti || ROS Team 1 || IMU Tools and robot localization (see next)<br />
|-<br />
|26/05/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=da607a0ea8ee42508eeb276224ed2f54 Search-based Planning]<br />
|-<br />
|26/05/2021 || Wednesday || 14:15 - 16:15 || 25.2.2 (EX D.3.2) || Simone Mentasti || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=a5e18e1b729a48c4a373873e0d3ea96d IMU Tools and robot localization] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f0a14f56b26445b0929a7465abb9f8b0 Project Presentation] + [https://drive.google.com/drive/folders/1uMwWmQ50iwrMXTJnpTuJdt5YNmnQkrOV?usp=sharing Project folder]<br />
|-<br />
|31/05/2021 || Monday || 13:15 - 16:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6fdba09c98844f5eb26b63c39f0cd997 Sampling-based Planning]<br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic <br />
|-<br />
|04/03/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/0f7f27ac-4930-44d4-8d1c-638855a7d04b Course Logistics] and [https://web.microsoftstream.com/video/b00b4347-5e11-4e13-bbfd-404e89c73b28 Introduction to Robotics] <br />
|-<br />
|05/03/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/c3abc791-942e-44af-9f70-c9c81e0815f0 Intro to Robot Actuators and DC Motors]<br />
|-<br />
|11/03/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/7c980e36-9bcc-4462-a79a-ebfbd3967c7b More on Motors and Intro to Robot Sensors]<br />
|-<br />
|12/03/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/89e90ef3-9588-433f-bacd-f93fe6cfb492 Robot Sensors (continued)]<br />
|-<br />
|18/03/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/2a1bb9d7-99f0-40b1-9cf0-c832cdf73e2c Middleware for robotics and ROS Installation Party]<br />
|-<br />
|19/03/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/cedd53c0-24e5-4071-9a4c-de01b7e59d0d Ros workspace, Publisher/subscriber, launch file]<br />
|-<br />
|25/03/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/712641c5-ac98-4596-93db-0fb7b5aff41c Introduction to Localization and Robot Kinematics]<br />
|-<br />
|26/03/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/3da222dc-ecd9-4e09-9452-d20d606dfa23 Differential Drive Robot Kinematics and Odometry]<br />
|-<br />
|01/04/2020 || Wenesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/ccc5ae01-48e1-489d-8f2c-b71a1a1e9cb4 Skid-Steering and Omnidrectional Robot Kinematics and Odometry]<br />
|-2<br />
|02/04/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/03ff3d93-8bdc-49d1-b9fd-3b3242bfa695 Ackerman like Robot Kinematics and Odometry] <br />
|-<br />
|08/04/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || ROS ||Simone Mentasti || [https://web.microsoftstream.com/video/9c83039d-32e5-4396-889e-259eeb80f6a1 Publisher, subscriber, launch file , custom messages]<br />
|-<br />
|09/04/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/5d2c2cf1-1369-46a8-83ad-a7c4dac24f98 Services, parameters],[https://web.microsoftstream.com/video/7e937b7a-15ac-4a3c-91fa-db16beedf7ef parameters (continued), timers, node architecture]<br />
|-<br />
|15/04/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || ROS ||Simone Mentasti || [https://web.microsoftstream.com/video/d454b7b3-382d-4b96-b082-d7c77bbe11ef TF, Rviz, Actionlib]<br />
|-<br />
|16/04/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/8ee81454-b420-4d53-ab11-b847d0ee9c46 Message filter, rospy]<br />
|-<br />
|16/04/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/a02ba753-bbcc-4f9d-84c1-b8d756b94425 Project presentation]<br />
|-<br />
|22/04/2020 || Wenesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/b2d048b9-a93d-4fc7-b24b-1185ae16d9d3 Introduction to Robot Localization and LIDAR sensor modeling]<br />
|-<br />
|23/04/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/6c43fe49-74ed-4111-a2c3-fe67bb6a94dd Robot Localization and Bayes Filters (discrete)]<br />
|-<br />
|29/04/2020 || Wednesday || 14:15 - 16:15 || Teams Virtual Room || --- || --- || -- No lectures (Lauree) --<br />
|-<br />
|30/04/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/df9ace9e-286d-4d7d-98dd-1218ef873a62 Robot Localization with (Extended) Kalman Filters]<br />
|-<br />
|06/05/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci|| [https://web.microsoftstream.com/video/8dcaf0c6-0508-415e-991a-322c91cc9410 Robot Localization with Particle Filters]<br />
|-<br />
|07/05/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci|| [https://web.microsoftstream.com/video/13d8a902-697a-4a21-8b0e-182595b62198 Robot Mapping]<br />
|-<br />
|13/05/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/a35eb86f-faf4-4849-b075-6c766fe35e15 Simultaneous Localization and Mapping]<br />
|-<br />
|14/05/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/2ee901d0-d883-477d-bcf3-9f7c93f3ab19 Simultaneous Localization and Mapping]<br />
|-<br />
|20/05/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/10b205f8-75d9-4010-ade7-f42c0e7f8afe Robot Navigation Algorithms]<br />
|-<br />
|21/05/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/e798be4d-f6a3-40bd-a657-3141cc5a5342 Robot Navigation Algorithms]<br />
|-<br />
|27/05/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/f77b9fa4-3582-495c-b9d3-4a145ec2d53f ROS on multiple devices, Actionlib]<br />
|-<br />
|28/05/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/ffb64e1b-defa-43dc-8e61-c3394fb472ec Robot Navigation (Introduction)] <br />
|-<br />
|03/06/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/ca22b7e3-a71d-4dbe-a344-4979a3198e8b Robot simulators] and [https://web.microsoftstream.com/video/36cb2045-2e24-4b84-8773-d5c171ecf4ed Robot Navigation (Examples)]<br />
|-<br />
|04/06/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/d285b29c-df90-44d1-9df6-8ceb375654cd IMU Tools, Robot Localization]<br />
|-<br />
|04/06/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/e7e8bbbc-0387-4920-bf10-feeb29ab6c81 Second project presentation] with [[Media:Robotics_2019_2020_second_project.pdf |slides]]<br />
|-<br />
|12/06/2020 || Friday || 16:30 - 18:30 || Zoom Virtual Room || Lecture || Matteo Matteucci || Q&A + Exam Rehearsal <br />
|}<br />
--><br />
<!--|-<br />
|13/05/2020 || Wednesday || 12:15 - 14:15 || 5.1.1 || Lecture || Matteo Matteucci || Simultaneous Localization and Mapping<br />
|-<br />
|14/05/2020 || Thursday || 14:15 - 16:15 || 6.0.1 || Lecture || Matteo Matteucci || Simultaneous Localization and Mapping<br />
|-<br />
|20/05/2020 || Wednesday || 12:15 - 14:15 || 5.1.1 || Lecture || Matteo Matteucci || Robot Navigation Algorithms<br />
|-<br />
|21/05/2020 || Thursday || 14:15 - 16:15 || 6.0.1 || Lecture || Matteo Matteucci || Robot Navigation Algorithms<br />
|-<br />
|27/05/2020 || Wednesday || 12:15 - 14:15 || 5.1.1 || ROS || Simone Mentasti || Message filters, rospy. First project presentation<br />
|-<br />
|28/05/2020 || Thursday || 14:15 - 16:15 || 6.0.1 || ROS || Simone Mentasti || ROS on multiple machines, time syncronization, stage<br />
|-<br />
|03/06/2020 || Wednesday || 12:15 - 14:15 || 5.1.1 || ROS || Simone Mentasti || Robot Navigation (Part I)<br />
|-<br />
|04/06/2020 || Thursday || 14:15 - 16:15 || 6.0.1 || ROS || Simone Mentasti || Robot Navigation (Part II)<br />
|-<br />
| -- || -- || -- || -- || -- || -- || --<br />
|-<br />
| -- || -- || -- || -- || -- || -- || -- <br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Topic<br />
|-<br />
|25/02/2018 || Monday || 16:15 - 18:15 || 5.0.1 || Matteo Matteucci || Course Introduction<br />
|-<br />
|27/02/2018 || Wednesday || 12:15 - 14:15 || 5.03 || Matteo Matteucci || Robot Sensors and Actuators<br />
|-<br />
|04/03/2018 || Monday || 16:15 - 18:15 || 5.0.1 || Matteo Matteucci || -- No Lecture --<br />
|-<br />
|06/03/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Matteo Matteucci || Robot Sensors and Actuators<br />
|-<br />
|12/03/2018 || Monday || 16:15 - 18:15 || D1.2 || Simone Mentasti || Gazebosim and SDF<br />
|-<br />
|14/03/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Simone Mentasti || Differential Robot in Gazebo<br />
|-<br />
|19/03/2018 || Monday || 16:15 - 18:15 || D1.2 || Simone Mentasti || Sensors and Actuators in Gazebo<br />
|-<br />
|21/03/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Simone Mentasti || Middleware for robotics<br />
|-<br />
|26/03/2018 || Monday || 16:15 - 18:15 || D1.2 || Matteo Matteucci|| Robot Sensors and Actuators<br />
|-<br />
|28/03/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Matteo Matteucci|| Robot Kinematics<br />
|-<br />
|02/04/2018 || Monday || 16:15 - 18:15 || ... || ...|| -- No Lecture --<br />
|-<br />
|04/04/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Matteo Matteucci|| Robot Kinematics<br />
|-<br />
|09/04/2018 || Monday || 16:15 - 18:15 || D1.2 || Matteo Matteucci|| Robot Navigation Algorithms<br />
|-<br />
|11/04/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Matteo Matteucci|| Robot Navigation Algorithms<br />
|-<br />
|16/04/2018 || Monday || 16:15 - 18:15 || D1.2 || Simone Mentasti|| Introduction to ROS<br />
|-<br />
|18/04/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Simone Mentasti|| ROS Programming<br />
|-<br />
|23/04/2018 || Monday || 16:15 - 18:15 || D1.2 || Simone Mentasti|| Integration between ROS and Gazebo<br />
|-<br />
|25/04/2018 || Wednesday || 12:15 - 14:15 || D1.2 || -- || -- No Lecture --<br />
|-<br />
|30/04/2018 || Monday || 16:15 - 18:15 || D1.2 || -- || -- No Lecture --<br />
|-<br />
|02/05/2018 || Wednesday || 12:15 - 14:15 || D1.2 || -- || -- No Lecture --<br />
|-<br />
|07/05/2018 || Monday || 16:15 - 18:15 || D1.2 || Matteo Matteucci || Robot Navigation Algorithms<br />
|-<br />
|09/05/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Simone Mentasti || Advanced ROS Topics<br />
|-<br />
|14/05/2018 || Monday || 16:15 - 18:15 || D1.2 || Matteo Matteucci || Robot Localization and Mapping<br />
|-<br />
|16/05/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Matteo Matteucci || Robot Localization and Mapping<br />
|-<br />
|21/05/2018 || Monday || 16:15 - 18:15 || D1.2 || Matteo Matteucci || Robot Localization and Mapping<br />
|-<br />
|23/05/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Matteo Matteucci || Robot Localization and Mapping<br />
|-<br />
|28/05/2018 || Monday || 16:15 - 18:15 || D1.2 || Matteo Matteucci || Robot Localization and Mapping<br />
|-<br />
|30/05/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Matteo Matteucci || Robot Localization and Mapping<br />
|-<br />
|04/06/2018 || Monday || 16:15 - 18:15 || D1.2 || Simone Mentasti || ROS Movebase Package<br />
|-<br />
|06/06/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Simone Mentasti || ROS Movebase Package<br />
|-<br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Topic<br />
|-<br />
|06/03/2016 || Monday || 16:15 - 18:15 || T.1.1 || Matteo Matteucci || Course Introduction<br />
|-<br />
|08/03/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Matteo Matteucci || Robot Kinematics<br />
|-<br />
|13/03/2016 || Monday || 16:15 - 18:15 || T.1.1 || Matteo Matteucci || Robot Kinematics<br />
|-<br />
|15/03/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Gianluca Bardaro || Gazebosim and URDF<br />
|-<br />
|20/03/2016 || Monday || 16:15 - 18:15 || T.1.1 || Gianluca Bardaro || Differential drive in Gazebo<br />
|-<br />
|22/03/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Gianluca Bardaro || Middleware for robotics<br />
|-<br />
|27/03/2016 || Monday || 16:15 - 18:15 || T.1.1 || Gianluca Bardaro || A gentle introduction to ROS<br />
|-<br />
|29/03/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Gianluca Bardaro || Differential drive control in ROS<br />
|-<br />
|03/04/2016 || Monday || 16:15 - 18:15 || T.1.1 || Matteo Matteucci || Robot Kinematics<br />
|-<br />
|05/04/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Matteo Matteucci || Robot Kinematics<br />
|-<br />
|10/04/2016 || Monday || 16:15 - 18:15 || T.1.1 || Matteo Matteucci || Sensors and Actuators<br />
|-<br />
|12/04/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Matteo Matteucci || Sensors and Actuators<br />
|-<br />
|17/04/2016 || Monday || 16:15 - 18:15 || - || - || No Lecture<br />
|-<br />
|19/04/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Matteo Matteucci || Robot navigation algorithms<br />
|-<br />
|24/04/2016 || Monday || 16:15 - 18:15 || - || - || No Lecture<br />
|-<br />
|26/04/2016 || Wednesday || 12:15 - 14:15 || - || - || No Lecture (suspension)<br />
|-<br />
|01/05/2016 || Monday || 16:15 - 18:15 || - || - || No Lecture<br />
|-<br />
|03/05/2016 || Wednesday || 12:15 - 14:15 || - || - || No Lecture (suspension)<br />
|-<br />
|08/05/2016 || Monday || 16:15 - 18:15 || T.1.1- || Matteo Matteucci || Robot navigation algorithms<br />
|-<br />
|10/05/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Matteo Matteucci || Trajectory planning<br />
|-<br />
|15/05/2016 || Monday || 16:15 - 18:15 || - || - || No Lecture<br />
|-<br />
|17/05/2016 || Wednesday || 12:15 - 14:15 || - || - || No Lecture<br />
|-<br />
|22/05/2016 || Monday || 16:15 - 18:15 || T.1.1 || Gianluca Bardaro || Trajectory planning and navigation in ROS<br />
|-<br />
|24/05/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Gianluca Bardaro || ROS tf + actionlib<br />
|-<br />
|25/05/2016 || Thursday || 10:00 - 12:00 || PT1 (DEIB) || Gianluca Bardaro || "Project clinic"<br />
|-<br />
|29/05/2016 || Monday || 16:15 - 18:15 || T.1.1 || Gianluca Bardaro || ROS Navigation with movebase<br />
|-<br />
|30/05/2016 || Tuesday || 10:00 - 12:00 || PT1 (DEIB) || Gianluca Bardaro || "Project clinic"<br />
|-<br />
|31/05/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Gianluca Bardaro || Ros Navigation with movebase (continued)<br />
|-<br />
|05/06/2016 || Monday || 16:15 - 18:15 || T.1.1 || Matteo Matteucci || Introduction to probability and Simultaneous Localization and Mapping (SLAM)<br />
|-<br />
|07/06/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Matteo Matteucci || Occupancy grids and Laser sensor model<br />
|-<br />
|12/06/2016 || Monday || 16:15 - 18:15 || T.1.1- || Matteo Matteucci || Mapping with known poses and scan matching<br />
|-<br />
|14/06/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Matteo Matteucci || EKF-SLAM and FAST Slam<br />
|-<br />
|19/06/2016 || Monday || 16:15 - 18:15 || T.1.1- || Matteo Matteucci || Particle filters and Monte Carlo Localization<br />
|-<br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Topic<br />
|-<br />
|09/03/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Course Introduction<br />
|-<br />
|10/03/2016 || Thursday || 14:00 - 15:30 || D11 || Matteo Matteucci || Sensors and Actuators<br />
|-<br />
|16/03/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Sensors and Actuators<br />
|-<br />
|17/03/2016 || Thursday || 14:00 - 15:30 || D11 || Gianluca Bardaro || Gazebosim and URDF<br />
|-<br />
|23/03/2016 || Wednesday || 14:00 - 15:30 || EG3 || Gianluca Bardaro || Differential drive in Gazebo<br />
|-<br />
|24/03/2016 || Thursday || 14:00 - 15:30 || -- || -- || No Classes<br />
|-<br />
|30/03/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Sensors and Actuators<br />
|-<br />
|31/03/2016 || Thursday || 14:00 - 15:30 || D11 || Matteo Matteucci || Robot kinematics<br />
|-<br />
|06/04/2016 || Wednesday || 14:00 - 15:30 || EG3 || Gianluca Bardaro || Middleware for robotics<br />
|-<br />
|07/04/2016 || Thursday || 14:00 - 15:30 || D11 || Gianluca Bardaro || A gentle introduction to ROS<br />
|-<br />
|13/04/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Robot kinematics<br />
|-<br />
|14/04/2016 || Thursday || 14:00 - 15:30 || D11 || Matteo Matteucci || Robot navigation algorithms<br />
|-<br />
|20/04/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Trajectory planning introduction<br />
|-<br />
|21/04/2016 || Thursday || 14:00 - 15:30 || D11 || Gianluca Bardaro || Differential drive control in ROS<br />
|-<br />
|27/04/2016 || Wednesday || 14:00 - 15:30 || -- || -- || No Classes<br />
|-<br />
|28/04/2016 || Thursday || 14:00 - 15:30 || D11 || Gianluca Bardaro || Trajectory planning and navigation in ROS<br />
|-<br />
|04/05/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Trajectory planning (continued)<br />
|-<br />
|05/05/2016 || Thursday || 14:00 - 15:30 || D11 || Matteo Matteucci || Introduction to probability and Simultaneous Localization and Mapping (SLAM)<br />
|-<br />
|11/05/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Occupancy grids and Laser sensor model<br />
|-<br />
|12/05/2016 || Thursday || 14:00 - 15:30 || D11 || Matteo Matteucci || Mapping with known poses and scan matching + Project presentation<br />
|-<br />
|18/05/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || EKF-SLAM and FAST Slam<br />
|-<br />
|19/05/2016 || Thursday || 14:00 - 15:30 || D11 || Matteo Matteucci || Particle filters and Monte Carlo Localization<br />
|-<br />
|25/05/2016 || Wednesday || -- || -- || -- || No Classes<br />
|-<br />
|26/05/2016 || Thursday || -- || -- || -- || No Classes<br />
|-<br />
|01/06/2016 || Wednesday || 14:00 - 15:30 || EG3 || Gianluca Bardaro || ROS tf + actionlib<br />
|-<br />
|02/06/2016 || Thursday || -- || -- || -- || No Classes<br />
|-<br />
|08/06/2016 || Wednesday || 14:00 - 15:30 || EG3 || Gianluca Bardaro || ROS Navigation with movebase<br />
|-<br />
|09/06/2016 || Thursday || 14:00 - 15:30 || D11 || Gianluca Bardaro || Ros Navigation with movebase (continued)<br />
|-<br />
|15/06/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Questions and answers about theory<br />
|-<br />
|16/06/2016 || Wednesday || 14:00 - 15:30 || EG3 || Gianluca Bardaro || Questions and answers about project and exercises<br />
|-<br />
|}<br />
--><br />
<br />
===Course Evaluation===<br />
<br />
Course evaluation is composed by two parts:<br />
<br />
* A written examination covering the whole program graded up to 26/32<br />
* A home project in simulation practicing the topics of the course graded up to 6/32<br />
<br />
The final score will sum the grade of the written exam and the grade of the home project.<br />
<br />
===Course Project (i.e., the two [2] homeworks)===<br />
<br />
In the course project, you will use [http://www.ros.org/ ROS] to develop a simple autonomous mobile robot performing simple mapping, localization, and navigation task. The project requires some coding either in C++ / Python following what will be presented during the lectures (we suggest using C++ as it will be the language used in class). The project will be presented in two (2) parts you have about one month to do each. Details will follow.<br />
<br />
==Teaching Material (the textbook)== <br />
<br />
Lectures will be based on material from different sources, teachers will provide their slides to students as soon they are available. <br />
<br />
===Course Slides 2021/2022===<br />
<br />
Slides from the lectures by Matteo Matteucci<br />
*[[Media:Robotics_00_2122_Course_Introduction.pdf|[2021/2022] Course Introduction]]: introductory slides of the course with useful information about the course syllabus, grading, and the course logistics. <br />
*[[Media:Robotics_01_2122_Introduction.pdf|[2021/2022] Introduction to Robotics]]: Introduction to Robotics, definitions, examples and SAP cognitive model. <br />
*[[Media:Robotics_02_2122_Sensors_Actuators.pdf |[2021/2022] Sensors and Actuators]]: an overview of most commonly used actuator and sensors in robotics, the DC motor and its characteristics, gears and torque. Sensor classification, common sensors in robotics with pros and cons.<br />
*[[Media:Robotics_03_2122_Odometry.pdf |[2021/2022] Robot Odometry]]: Robot Localization intro, direct and inverse kinematics, robot odometry for different kinematics (differential drive, skid steering, Ackerman, etc.).<br />
*[[Media:Robotics_04_2021_Localization.pdf |[2020/2021] Robot Localization]]: Sensor models, Robot Localization, Bayesian filtering, Kalman Filtering, Monte Carlo Localization.<br />
*[[Media:Robotics_05_2021_SLAM.pdf |[2020/2021] Simultaneous Localization and Mapping]]: Mapping with known poses, scan matching, EKF-SLAM, FAST-SLAM<br />
** [https://drive.google.com/drive/folders/1JO8AQIWaOYeW11d9rInox0pZPZG-fdfc?usp=sharing At this link] you can find the videos included in the slides about (simulataneous) localization and mapping <br />
*[[Media:Robotics_06_2021_MotionControl_tmp.pdf |[2020/2021] Robot Motion Control]]: Introduction to motion control, Virtual Histogram methods, Dynamic Window Approach (+ planning algorithms)<br />
<!--<br />
*[[Media:Robotics_03_Mobile_Robots_Kinematics.pdf |[2015/2016] Mobile Robots Kinematics]]: mobile (wheeled) robot kinematics, holonomic and non holonomic constraints, differential drive model. [https://drive.google.com/open?id=0B5eSI7n7LkDhM3NIRGlNdktRSzA ppsx]<br />
*[[Media:Robotics_04_Motion_Control.pdf |[2015/2016] Robot Motion Control]]: mobile robot navigation, trajectory planning, trajectory following, and obstacle avoidance. [https://drive.google.com/open?id=0B5eSI7n7LkDhS3BXZzByYzYxVlU (ppsx)]<br />
*[[Media:Robotics_05_2018_SLAM_with_Lasers.pdf |[2017/2018] SLAM with Lasers]]: introduction to Simultaneous Localization and Mapping, EKF based SLAM, Particle Filters, and Monte Carlo Localization. [https://drive.google.com/open?id=0B5eSI7n7LkDhd2FZY1NRWmpiVm8 (ppsx)]<br />
--><br />
<!--Slides from the lectures by Simone Mentasti as well as examples can be found [https://goo.gl/GonArW at this link], for your convenience we publish here the PDF of the lectures, but check the previous link for coding examples:--><br />
<br />
Last version of slides from the lectures by Paolo Cudrano are available [https://polimi365-my.sharepoint.com/:f:/g/personal/10457911_polimi_it/Eq7UEjxDOOtNrZtvLSKLrEUBKpga-uGlXx8qkZgJjXQJMg HERE!].<br />
<br />
Last version of slides from the lectures by Simone Mentasti are available [HERE!].<br />
<!--<br />
Last version of slides from the lectures by Simone Mentasti are available [https://goo.gl/GonArW HERE!]. <br />
<br />
Past year slides are below:<br />
*[[Media:Robotics_L1_2019_ex.pdf|[2018/2019] Middleware in Robotics]]: Middleware for robotics and ROS Installation Party<br />
*[[Media:Robotics_L2_2019_ex.pdf|[2018/2019] ROS Environment]]: Ros workspace, publisher/subscriber<br />
*[[Media:Robotics_L3_2019_ex.pdf|[2018/2019] ROS Basics]]: Messages, services, parameters,launch file<br />
*[[Media:Robotics_L4_2019_ex.pdf|[2018/2019] ROS Tools]]: Bags, tf, actionlib, rqt_tools<br />
*[[Media:Robotics_L5_2019_ex.pdf|[2018/2019] Actiolib]]: Actiolib and message filters <br />
*[[Media:Robotics_L6_2019_ex.pdf|[2018/2019] ROS on Multiple Machines]]: how to run ROS nodes on different machines <br />
*[[Media:Robotics_L7_2019_ex.pdf|[2018/2019] Robot Navigation]]: ROS Navigation Stack, Movebase, Navcore, Gmapping<br />
*[[Media:Robotics_L9_2019_ex.pdf|[2018/2019] Opencv/CV_BRIDGE]]: how to nterface OpenCV and ROS <br />
*[[Media:Robotics_L10_2019_ex.pdf|[2018/2019] Robot Localization]]: useful stuff for the course project ;-)<br />
--><br />
<br />
===Year 2020/2021 Recording===<br />
As I registered these due to pandemics, I am making them available. They DO NOT REPLACE THIS YEAR classroom lectures which are to be considered as the official material of this year, but they might be useful to double-check your notes.<br />
<br />
* 24/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=e953e0e29b744f0fa604c2c401cb40b6 Course logistics] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=2068c40227aa4091a5483bb3c57af5e1 Introduction to Robotics]<br />
* 03/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=e74e003ef5664d849f848ff3831dd7e6 Sensors and Actuators]<br />
* 10/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=30df56c53c6a4ac199dafff310f1f222 Robot Sensors] and [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4dbee67823f8417f8e3784248c4712db Intro to SLAM]<br />
* 17/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d85a41c9c6404ccab84b725f902c99eb Robot Kinematics (Differential Drive)]<br />
* 31/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=a323ca89bbbb4fd7b30fb68b1037c10c Robot Kinematics (Continued)]<br />
* 07/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ddc9aed131194c568131dd7e5c0875b3 Localization and LiDARS]<br />
* 14/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=53269a220d2a4b5b885c36bcc1984116 Localization and Bayes filters]<br />
* 21/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fdb9155b23794cc6aac379e0cc2c0bf6 Localization with Kalman filters and Particle filters]<br />
* 05/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=486985ca26b04cb0962143a7a58491b6 Mapping and SLAM]<br />
* 12/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=3aaa118d78b74c67b0398bf9cf5bf2e1 Robot Motion Control]<br />
* 26/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=da607a0ea8ee42508eeb276224ed2f54 Search-based Planning]<br />
* 31/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6fdba09c98844f5eb26b63c39f0cd997 Sampling-based Planning]<br />
<br />
Also, labs are available, however, the organization during the pandemic was kind of different with 2 teams to reduce classroom occupancy. This is why they might resemble a kind of disconnected. <br />
<br />
* 02/03/2021 - Paolo Cudrano [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d260c9fb0aeb4963bfb3aa7be89a1632 Introduction to middleware in Robotics]<br />
* 09/03/2021 - Paolo Cudrano [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=86c7caa885764429aff9777ed5cfa322 ROS Basics]<br />
* 17/03/2021 - Paolo Cudrano [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=41a263d5283e4c5d8a16840a1277512b Publishers and Subscribers]<br />
* 24/03/2021 - Paolo Cudrano [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=3e67b96db3bb4001a3a8af5b5b12f435 Services and Parameters]<br />
* 31/03/2021 - Paolo Cudrano [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=aabb359b39a44780adc917fa1a86ebb1 TF, RVIZ (Cudrano recording)]<br />
* 13/04/2021 - Paolo Cudrano [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=e08a2c0739214339bf2ce4fb13dbb098 Bags, Message filters and rospy] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fe8dba62b550480d8ab6254f2e5bc8f5 Project 1 Presentation]<br />
* 04/05/2021 - Simone Mentasti [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7f075850e538498aa019575cdcab9eb2 ROS on Multiple Devices]<br />
* 12/05/2021 - Simone Mentasti [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=39ba34fc6ae649f0b308fa5630451297 Robot Navigation]<br />
* 26/05/2021 - Simone Mentasti [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=a5e18e1b729a48c4a373873e0d3ea96d IMU Tools and robot localization] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f0a14f56b26445b0929a7465abb9f8b0 Project Presentation] + [https://drive.google.com/drive/folders/1uMwWmQ50iwrMXTJnpTuJdt5YNmnQkrOV?usp=sharing Project folder]<br />
<br />
===Useful stuff from the web===<br />
These are videos from the web which might be useful to understand better the material presented in the lectures<br />
*[https://www.youtube.com/watch?v=LAtPHANEfQo Understanding DC Brushed Motors] by Learn Engineering <br />
*[https://www.youtube.com/watch?v=bCEiOnuODac Understanding DC Brushless Motors] by Learn Engineering <br />
*[https://www.youtube.com/watch?v=eyqwLiowZiU Understanding DC Stepper Motors] by Learn Engineering<br />
<br />
This blog post can be useful to better understand the EKF-SLAM idea and implementation <br />
*[https://jihongju.github.io/2019/07/06/ekfslam-hands-on-tutorial/ EKF-SLAM hands-on tutorial] by Jihong Ju<br />
<br />
If you have problems in installing Linux on your machine you can use a USB drive distro and boot on it instead of your OS. '''Note''': We are testing this guide these days we might have some tips and tricks for it so stay tuned!<br />
*[https://www.fosslinux.com/10212/how-to-install-a-complete-ubuntu-on-a-usb-flash-drive.htm How to install a complete ubuntu on a USB flash drive] (need to have the USB drive inserted to boot)<br />
<br />
The ROS framework is C++ based, if you want to check some C++ tutorial online you can have a look at<br />
* [https://www.programiz.com/cpp-programming Simple, basic topics about C++]<br />
* [https://www.cplusplus.com/doc/tutorial/ A more detailed tutorial about C++]<br />
* [https://www.learncpp.com/ An even more detailed tutorial on C++] (you can just focus on some particular chapters. In particular, Ch. 11 seems interesting as a detailed overview of Object-Oriented Programming, if you are not familiar with it.)<br />
<br />
===Useful readings===<br />
These are papers which explain some of the topics in the lecture with a higher level of details<br />
*[https://www.mdpi.com/1424-8220/15/5/9681/pdf Analysis and experimental kinematics of a skid-steering wheeled robot based on a laser scanner sensor.] Wang, Tianmiao, Yao Wu, Jianhong Liang, Chenhao Han, Jiao Chen, and Qiteng Zhao. Sensors 15, no. 5 (2015): 9681-9702.<br />
*[http://www.iri.upc.edu/people/jsola/JoanSola/objectes/curs_SLAM/SLAM2D/SLAM%20course.pdf Simultaneous localization and mapping with the extended Kalman filter.] Joan Sola'. <br />
*[http://robots.stanford.edu/papers/Thrun03g.pdf FastSLAM: An Efficient Solution to the Simultaneous Localization And Mapping Problem with Unknown Data Association.] Sebastian Thrun, Michael Montemerlo, Daphne Koller, Ben Wegbreit, Juan Nieto, and Eduardo Nebot.<br />
<br />
<!--<br />
*[[Media:Robotics_01ex_2018_Gazebo.pdf | [2017/2018] Gazebosim and SDF]]: an introduction to robotics simulators, an overview of Gazebo, its use, and the SDF file format to describe a robot simulation.<br />
*[[Media:Robotics_02ex_2018_GazeboPlugins.pdf | [2017/2018] Gazebosim and plugins]]: more about simulation with Gazebo, modeling of a caster wheel, modeling of noise with Gazebo plugins, the GPS example.<br />
*[[Media:Robotics_03ex_2018_Middleware.pdf | [2017/2018] Middleware in Robotics]]: an introduction to the use of middleware for robotics, motivation and state of the art review.<br />
--><br />
<!--<br />
Slides from the lectures by Gianluca Bardaro (you can find material under preparation [https://goo.gl/DBwhhC at this link])<br />
*[[Media:Robotics_01ex_2017_Gazebo.pdf | [2016/2017] Gazebosim and SDF]]: an introduction to robotics simulators, an overview of Gazebo, its use, and the SDF file format to describe a robot simulation.<br />
*[[Media:Robotics_02ex_2017_GazeboPlugins.pdf | [2016/2017] Gazebosim and plugins]]: more about simulation with Gazebo, modeling of a caster wheel, modeling of noise with Gazebo plugins, the GPS example.<br />
*[[Media:Robotics_03ex_2017_Middleware.pdf | [2016/2017] Middleware in Robotics]]: an introduction to the use of middleware for robotics, motivation and state of the art review.<br />
*[[Media:Robotics_03ex_2017_ROSInstall.pdf | [2016/2017] ROS Install]]: Introduction to the Robotic Operating System, installation and main conceptual elements<br />
*[[Media:Robotics_04ex_2017_ROSIntro.pdf | [2016/2017] ROS Introduction]]: Introduction to the ROS File system and overview on the most used commands<br />
*[[Media:Robotics_04ex_2017_ROSDevelopment.pdf | [2016/2017] ROS Development]]: Structure of a node and main element used in its development and building.<br />
*[[Media:Robotics_05ex_2017_ROSArchitectureExample.pdf | [2016/2017] ROS Architecture]]: Creating a simple architecture in ROS to manually control a simulated robot. See examples.zip for the source code.<br />
<br />
Additional material from the teachers<br />
*[[Media:Robotics_2017_examples.zip | [2016/2017] examples]]: gazebo model for a differential drive with a caster wheel<br />
--><br />
<!--*: an example of motion control architecture implemented in ROS, integration with Gazebo, introduction to tf.<br />
*[[Media:Robotics_06ex_Transformation_Frames.pdf | [2015/2016] Transformation Frames]]: reference frames and the tf framework to handles transformation frames in ROS.<br />
*[[Media:Robotics_07ex_Actionlib.pdf | [2015/2016] Actionlib]]: the ROS actionlib package.<br />
Additional material from the teachers<br />
*[[Media:Robotics_willy1.zip | [2015/2016] willy1.zip]]: gazebo model for a differential drive with a caster wheel<br />
*[[Media:Robotics_gps.zip | [2015/2016] gps.zip]]: gazebo plugin to simulate a faulty gps sensor<br />
*[[Media:lesson_pack.zip | [2015/2016] lesson_pack.zip]]: ROS nodes examples with object oriented template of talker and listener<br />
*[[Media:Robotics_willy2.zip | [2015/2016] willy2.zip]]: an improved gazebo model for a differential drive with a caster wheel<br />
*[[Media:Robotics_diffdrive.zip | [2015/2016] diffdrive.zip]]: a ROS motion control architecture for a diffdrive robot--><br />
<br />
===Course Projects===<br />
<br />
==== Homework 2021/2022 ====<br />
<br />
The First project con the Robotics class is available [https://polimi365-my.sharepoint.com/:f:/g/personal/10457911_polimi_it/EhsMssV_kDBKkp7gY-xGV3gBNGpBpnyoHPR_Gu5eAMebyw?e=2XCRe5 HERE!], deadline is 29/04/2022!<br />
<br />
==Frequently Asked Questions==<br />
<br />
===Course Structure===<br />
<br />
'''What is the biggest difference with the course 093217 ROBOTICS AND DESIGN?'''<br />
* Robotics and Design is a practical course focused on the development of a robotics application, you will not learn about the theoretical aspects of robotics, but you will build a robot with a purpose which changes every year. I consider the two courses as complimentary.<br />
<br />
===Exams and Evaluation===<br />
<br />
'''Are there any solutions available for the past exams?'''<br />
* No, if you have doubts or questions, just send me your proposed solution and I will reply tailoring the answer to your current understanding.<br />
<br />
'''Is it important to buy/read the text book to be able to follow the course? I can’t find it in the library, is there any alternative book?'''<br />
* No, it is not required, as from past experience attending classes and checking the material provided y the teachers is enough. Obviously reading the book will provide much more information..<br />
<br />
===Homeworks and ROS===<br />
<br />
'''In the schedule when it says ROS, are these lectures as well or are they practical work i.e. lab/excercise?'''<br />
*They are ex-cathedra lectures where you are expected to bring your laptop, it is not mandatory and you can follow the class in a classical passive way, but I suggest to consider it as a lab and take your laptop with you if you can.<br />
<br />
'''Out of all the scheduled activities this semester, approximately how many of these are practical lab/excercise?<br />
* Indeed not all ROS lectures will present coding exercises, I expect half of them will be about coding and the other half more on the technical background you need to understand what you are coding.<br />
<br />
'''Should I install ROS on my laptop/desktop?'''<br />
*Absolutely yes. This means you need to have linux on your machine, possibly ubuntu 16.04 or 18.04. This can be achieved in different ways, we suggest a native install via dual boot or as main operating system (we do not take any responsibility of something happening to your data or hardware in doing this operation). Other options such as virtual machine or live distro are not as effective as a real install, but they work.<br />
<br />
'''Which editor/IDE should I use for ROS?'''<br />
* We do not suggest any particular editor for ROS, standard text editors such as nano/gedit/sublime + a terminal are enough. Nevertheless, you can use the environment you prefer for C++ development; some students, in the past, have used Eclipse or Clion. You can also check the [http://wiki.ros.org/IDEs list of supported ROS editors] or [https://github.com/tonyrobotics/roboware-studio Roboware], the latter has been designed for ROS, but it does not offer any special feature you will miss using standard C/C++ editors. <br />
<br />
'''As I understand the “homework/project” is a group project. Is this correct and how are the groups formed?'''<br />
* It is not a group project, while it is allowed to do it in groups (up to 3 people). I expect the groups to form naturally in classes. We usually set up a slack group for the project you can organize autonomously. Nevertheless, you can do the project alone as well (but we advise you to do it in groups).<br />
<br />
'''When “Part 1” of the homework/project will start?'''<br />
* Right after we have finished the first block of lectures about ROS. This should happen around Easter plus/minus a week.<br />
<br />
==Past Years Useful Material== <br />
<br />
Here you find material from past editions of the course that you umight find useful in preparing the exam.<br />
<br />
===Past Exams and Sample Questions===<br />
<br />
Since the 2015/2016 Academic Year the course has changed the teacher and this has changed significantly the program and the exam format as well. For this reason we do not have many past exams to share with you, they will accumulate along the years tho.<br />
<br />
* [[Media:20170717.pdf|Exam of 17/07/2017]]<br />
* [[Media:20170701.pdf|Exam of 01/07/2017]]<br />
* [[Media:20160926.pdf|Exam of 26/09/2016]]<br />
* [[Media:20160905.pdf|Exam of 05/09/2016]]<br />
* [[Media:20160720.pdf|Exam of 20/07/2016]]<br />
* [[Media:20160627.pdf|Exam of 27/06/2016]]<br />
<br />
===Past Course Project===<br />
<br />
Here you find past course projects in case you are interested in checking what your colleagues have been pass through before you. In some cases they may have been more lucky in some others you might be the lucky one ... that's life! ;-) <br />
<br />
====Homework 2020/2021====<br />
<br />
Here they are the curse homework projects:<br />
* The first course project has been published on 14/04/2021<br />
** The description of the first ROS Project is [https://polimi365-my.sharepoint.com/:b:/g/personal/10457911_polimi_it/Ees1RgOSL1REiK1iqBS--ZABXEwE1jC3dQdFHTmJPlyK3A?e=ahN4bx HERE]<br />
** The material for the project is [https://polimi365-my.sharepoint.com/:f:/g/personal/10457911_polimi_it/EjJKNz1Lxr9MqW8b5XyIepsBMNrJb7O4oqF6UoHl14758A?e=40GxFe HERE]<br />
** You have to deliver it by 16/05/2021 !!!<br />
* The second course project has been published on 26/05/2021<br />
** The description of the second ROS Project is [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f0a14f56b26445b0929a7465abb9f8b0 HERE]<br />
** The material for the project is [https://drive.google.com/drive/folders/1uMwWmQ50iwrMXTJnpTuJdt5YNmnQkrOV?usp=sharing HERE]<br />
** You have to deliver it by 27/06/2021 !!!<br />
<br />
====Homework 2019/2020====<br />
<br />
Here they are the curse homework projects:<br />
* [https://drive.google.com/drive/folders/1bbkGsgcp7LNQX6F-uVFyqv0W1MBWH3CZ First project] deadline 8th of May 2020.<br />
* [[Media:Robotics_2019_2020_second_project.pdf |Second project presentation]] deadline 5th of July 2020.<br />
<br />
====Homework 2018/2019====<br />
<br />
The 2018/2019 course project is divided in two releases. The homework philosophy should be "You have to struggle, but not too much!". Indeed the homework is made to challenge you and make you exercising and learn by doing, nevertheless if you find yourself stuck please write us and we will give you the required hints to continue and complete ... this includes extending the deadline (for all) or allowing you to use python instead of C++ (for selected students). <br />
<br />
'''''Advice:''''' '''Start as soon as possible doing the homework!''' <br />
<br />
Homework<br />
* [[Media:Robotics_project_2018-2019_1.pdf | 2018/2019 Course Project Part 1]]: due on '''''Wednesday 29/05/2019''''', this is the first part of the 2018/2019 course project. <br />
* [[Media:Robotics_project_2018-2018_2.pdf | 2018/2019 Course Project Part 2]]: due on '''''Monday 08/07/2019''''', this is the second and last part of the 2018/2019 course project.<br />
<br />
====Homework 2016/2017====<br />
<br />
The 2016/2017 course project is divided in two releases to provide you something to work on as early as possible during the course. The homework philosophy should be "You have to struggle, but not too much!". Indeed the homework is made to challenge you and make you exercising and learn by doing, nevertheless if you find yourself stuck please write us and we will give you the required hints to continue and complete. <br />
<br />
'''''Advice:''''' '''Start as soon as possible doing the homework!''' <br />
<br />
Homework<br />
* [[Media:Robotics_project_2016-2017_A02.pdf | 2016/2017 Course Project Part A v1.1]]: due on '''''Wednesday 31/05/2017''''' (6 weeks from now), this is the first part of the 2016/2017 course project. <br />
* [[Media:Robotics_project_2016-2017_B01.pdf | 2016/2017 Course Project Part B v1.0]]: due on '''''Wednesday 28/07/2017''''' (6 weeks from now), this is the second part of the 2016/2017 course project. <br />
* [[Media:willy3_and_hokuyo.tgz| 2016/2017 Model for Course Project part B v1.0]]: thi si the gazebo model to be used in exercise 4 in the second part of 2016/2017 course project.<br />
<!--<br />
Notes on the homework<br />
* There was a small problem in the model provided for the second part of the project. You can fix it by changing a line in `willy3/model.sdf`, i.e., you need to change line `133` from `<publishTf>false</publishTf>` to `<publishTf>true</publishTf>, then everything should work. You can download [[Media:willy3_and_hokuyo_fixed.tgz| the fixed model here!]]<br />
* You might encounter troubles in building the full map with gmapping, thus not to have you shuck on that we provide here the perfect map of the environment in case you want to skip the gmapping part and move on with the navigation one. Needless to say that to have the full mark you have to provide also a map you have generated with gmapping, but you can develop the rest of the exercise on this map and get the score for that. You can download [[Media:willogarage_perfect.tgz| the perfect willowgarage map here!]]<br />
<br />
Some useful fatcs:<br />
* The project can be done in groups of maximum 2 people<br />
* Some data might be missing, some data might be useless, do not hesitate to write us by email! <br />
* We have not decided yet how much each part is worth, we will decide depending on the overall distribution of results in the class to harmonize the overall score and compensate for different level of difficulty among the years.<br />
<br />
Delivery procedure:<br />
* The project should be delivered by email as single compressed file '''''both''''' to Matteo Matteucci && Gianluca Bardaro. <br />
* The archive should contain:<br />
** The gazebo model as a directory with SDF files, when required, and a ROS package with nodes sources and corresponding launch files (put your names in the directories names)<br />
** A max 4 pages idiot proof report describing:<br />
*** The files provided<br />
*** The installation (if any) and compilation instructions<br />
*** Instruction to configure the execution (e.g., parameter setting)<br />
*** The instructions to execute the code and check that all the above has been done successfully<br />
* The evaluation will be performed by following your instructions, if these do not work, we assume the course project does not work (we suggest you to have someone else testing the whole on his/her computer before submitting the project).<br />
<br />
'''''Very important note:''''' read again the delivery procedure!<br />
<br />
'''''Very useul note:''''' students willing to graduate in July, need to register the exam by the 17th of July, which means they have to submit it on the 14th of July to let us evaluate it!<br />
--><br />
<br />
====Homework 2015/2016====<br />
This year project is divided in steps; each of them is worth some points out of the 5/32 points available for the final mark. You find the project description here, it is complete, it contains parts up to 4, parts 5 is optional, but we suggest to do it anyway since it requires a limited amount of time.:<br />
<br />
* [[Media:Robotics_project_2015-2016_1_0.pdf | 2015/2016 Course Project v1.0]]<br />
* [https://www.dropbox.com/s/hri9tuzh3kblzol/Safer_STL.zip?dl=0 2015/2016 Kobra STL files]: in case you want to make your simulation look more real here you find the STL files of the Kobra robot in the "Safer" version. Unfortunately the STL files are scaled down with respect to the real robot, so you have to modify those if you want to use.<br />
<br />
===Additional Resources===<br />
<br />
If you are interested in a more deep treatment of the topics presented by the teachers you can refer to the following books and papers:<br />
<br />
* [http://www.probabilistic-robotics.org/ Probabilistic Robotics] by Dieter Fox, Sebastian Thrun, and Wolfram Burgard.<br />
<br />
The following are links to online sources which might be useful to complement the material above<br />
<br />
* [http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=55890 ISO 8373:2012]: ISO Standard "Robots and robotic devices -- Vocabulary"<br />
* [http://www.ros.org/ ROS]: the Robot Operating System<br />
* [http://gazebosim.org/ Gazebo]: the Gazebo robot simulator<br />
<br />
* [http://airlab.elet.polimi.it/index.php/ROS_HOWTO AIRLab ROS Howto]: a gentle introduction to ROS with node template and program examples</div>Matteohttps://chrome.deib.polimi.it/index.php?title=Robotics&diff=3833Robotics2022-05-11T13:11:51Z<p>Matteo: /* Detailed course schedule */</p>
<hr />
<div>__FORCETOC__<br />
<br />
The following are last-minute news you should be aware of ;-)<br />
* 11/04/2022: Corrected bags and updated slides are now available in the shared folder. New deadline: May 8 2022, 23:59 CEST<br />
* 11/04/2022: All communications regarding the project will be though the shared folder and slack<br />
* 04/04/2022: Hold-on! -> due to a bug in the bags an update of the homework will be available soon <br />
* 30/03/2022: The first homework project of the course is out!<br />
* 06/03/2022: Added link to Paolo Cudrano slides, updated slide first two weeks Matteo Matteucci<br />
* 06/03/2022: Added link to last year's recordings<br />
* 23/02/2022: Detailed calendar published<br />
* 23/02/2022: Lectures start today!<br />
<br />
<!--<br />
* 19/02/2022: results of 02/02/2022 call are [[Media:Grades_20220202.pdf|here]]. They include all HWs grades! <br />
* 31/01/2022: results of 12/01/2022 call are [[Media:Grades_20220112.pdf|here]]. They include all HWs grades! <br />
* 03/10/2021: results of 31/08/2021 call are [[Media:Grades_20210831.pdf|here]]. They include all HWs grades! <br />
* 10/09/2021: results of 31/08/2021 call for Laureandi are [[Media:Grades_20210831_tmp.pdf|here]]. They include all HW1 grades! <br />
* 20/08/2021: results of 26/07/2021 call are [[Media:Grades_20210726.pdf|here]]. They include all HW1 grades! Green grades will be rounded up with ceil.<br />
* 25/07/2021: results of 29/06/2021 call are [[Media:Grades_20210629.pdf|here]]. They include all HW1 grades! Green rows will be rounded up with ceil.<br />
* 20/07/2021: results of 29/06/2021 call are [[Media:Grades_20210629_tmp2.pdf|here]] ... they do not include all HW1 grades!<br />
* 09/07/2021: results of 29/06/2021 call for graduating students are [[Media:Grades_20210629_tmp.pdf|here]]<br />
* 08/06/2021: all lecture videos are now published and slides pdf updated.<br />
* 26/05/2021: The link to the form to request an instance of remote examination for June and July is [https://forms.office.com/r/U4hkkaiq8h here!]<br />
* 26/05/2021: Revised final schedule of the course, last lecture will be on 31/05/2021<br />
* The second robotics project is out!<br />
* 21/04/2021: You can join the course [https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZmE0NTExYWQtNjFhMi00ZjE3LTg2ZTktOTQ5MDRjZjU1ZTk5%40thread.v2/0?context=%7b%22Tid%22%3a%220a17712b-6df3-425d-808e-309df28a5eeb%22%2c%22Oid%22%3a%22335b7274-e5d4-455b-aff1-ddd0f4ef5598%22%7d MS Team here]<br />
* 14/04/2021: The first homework project is out! Check it [https://chrome.deib.polimi.it/index.php?title=Robotics#Course_Projects here]<br />
* 09/04/2021: Lab sessions will be back to presence from 20/04/2021 on (check the detailed schedule)<br />
* 09/04/2021: Added a new lecture on 21/04/2021 to recover the one missed two weeks ago<br />
* 30/03/2021: Today's lab webex room is Simone Mentasti one<br />
* 25/03/2021: Added link to the last lab video and some references about C++ <br />
* 24/03/2021: This morning lecture is canceled (afternoon lab will happen as usual)<br />
* 06/03/2021: Updated video from the lab and the lectures<br />
* 05/03/2021: Added link to USB stick linux distribution [https://chrome.deib.polimi.it/index.php?title=Robotics#Useful_stuff_from_the_web here]!!!<br />
* 05/03/2021: From today until new communication lectures and labs will be online in the professor webex room<br />
* 03/03/2021: Today's lab webex room is Simone Mentasti one (for presence no change, is the normal class)<br />
* 24/02/2021: Lecture videos and slides published <br />
* 24/02/2021: Lectures start today!<br />
--><br />
<!--<br />
* 05/10/2020: Final [[Media:Grades_20200908_hws_final.pdf|grades]] from the 08/09/2020 call <br />
* 18/07/2020: Final [[Media:Grades_20200617_hws_final.pdf|grades]] from the 17/06/2020 call <br />
* 10/07/2020: Second [[Media:Grades_20200617_hws.pdf|homework and urgent grades]] from the 17/06/2020 call <br />
* 12/06/2020: Exam rehearsal [https://polimi-it.zoom.us/j/89319381617?pwd=bE9BYi91bHRBZ2JJTTR4Qm1YaFhJQT09 zoom room] and [https://forms.office.com/Pages/ResponsePage.aspx?id=K3EXCvNtXUKAjjCd8ope6ztteKg6OERCsstxb4n43e9UMjQyRkVKQktJQzBGQ1pHQURGQTFCRU0wRy4u form to be filled] <br />
* 03/06/2020: First homework results are [[Media:Grades_2020_HW1.pdf|here]] ;-)<br />
* 24/05/2020: Updates on the material about navigation: new slides include also planning but it is not part of this year program<br />
* 24/05/2020: Link to a blog post and a paper about EKF-SLAM<br />
* 24/05/2020: Updates on the schedule, with links to videos and one additional class<br />
* 02/05/2020: Updated full course schedule<br />
* 18/04/2020: Updated videos about ROS and published first project material!!!<br />
* 04/04/2020: Updated slides about Robot Odometry with fixes<br />
* 04/04/2020: Fixed schedule, added skid-steering paper, added fixed version of kinematics slides [2019/2020]<br />
* 22/03/2020: Added link to Simone Mentasti online slides repository<br />
* 10/03/2020: Change in the detailed schedule to anticipate the ROS labs and add 2 days which I originally forgot :-)<br />
* 06/03/2020: Added FAQ section, the video of last lecture, and a "youtube" section in the teaching material<br />
* 05/03/2020: Need to log in Polimi Office 365 web-mail to access the video <br />
* 05/03/2020: Added link to the video of the lecture<br />
* 04/03/2020: The course starts today!<br />
* 03/03/2020: Under Update! Tomorrow we start the new course edition!<br />
--><br />
<br />
<!--<br />
The following are last minute news you should be aware of ;-)<br />
23/02/2020: [[Media:Grades_20200212.pdf|Here]] you find the scores for the 12/02/2020 exam call, they include also the homeworks<br />
08/02/2020: [[Media:Grades_20200122.pdf|Here]] you find the scores for the 22/01/2020 exam call, they include also the homeworks<br />
28/08/2019: [[Media:Grades_20190910.pdf|Here]] you find the scores for the 10/09/2019 exam call, they include also the homeworks<br />
28/08/2019: [[Media:Grades_20190724.pdf|Here]] you find the scores for the 24/07/2019 exam call, they include also the homeworks<br />
21/07/2019: [[Media:Grades_20190703.pdf|Here]] you find the scores for the 03/07/2019 exam call, they include also the homeworks<br />
25/06/2019: Deadline extension!!! Second part of the project is due by July the 8th at 23:59!!! <br />
28/05/2019: Schedule update with additional lecture<br />
12/05/2019: Project slide uploaded!!!<br />
11/05/2019: Change in the detailed schedule for Wednesday 15/05/2019 and Monday 27/5/2019 <br />
07/04/2019: Updated version on slides about robot localization<br />
27/03/2019: Uploaded first version of slides on robot localization<br />
10/03/2019: Uploaded slides on mobile robot odometry<br />
05/03/2019: Swap on lecture scheduling 27/03 and 29/04<br />
26/02/2019: Course slides updated<br />
25/02/2019: Here it comes a new edition of the course!<br />
01/10/2018: [[Media:Grades_20180911.pdf|Here]] you find the scores for the third exam calls, they include also the second homework<br />
30/07/2018: [[Media:Grades_20180713.pdf|Here]] you find the scores for the first and second exam calls, they include also the second homework<br />
12/07/2018: [[Media:Grades_20180628_tmp.pdf|Here]] you find the scores for the first exam call, they do not include the second homework yet<br />
01/06/2018: [[Media:Homework_20180601.pdf|Here]] you find the scores for the first homework ... on Monday you will get the second (and last) one<br />
23/05/2018: Updated schedule<br />
23/05/2018: Updated slides on SLAM<br />
17/04/2018: Updated schedule until the end of the semester<br />
25/03/2018: Updated 2017/2018 academic year for lectures and exercises <br />
11/03/2018: You can find here the [[Media:Grades_2018-02_20.pdf|grades of the 20/02/2018 call]] including the project grades <br />
28/02/2018: Update detailed schedule.<br />
26/02/2018: Course starts today!<br />
--><!--<br />
02/10/2017: you can find here the [[Media:Grades_20170904_1.pdf|grades of the 04/09/2017 call]] including the project grades (colors do not have any meaning).<br />
12/09/2017: you can find here the [[Media:Grades_20170904.pdf|grades of the 04/09/2017 call]] for LAUREANDI including the project grades (except one).<br />
12/09/2017: the final grades of the [[Media:Grades_20170717_2.pdf|17/07/2017 call]] including the project grades are out.<br />
22/08/2017: you can find here the [[Media:Grades_20170717.pdf|grades of the 17/07/2017 call]]. Projects not included.<br />
20/08/2017: the final grades of the [[Media:Grades_20170701_3.pdf|01/07/2017 call]] with the projects are out ... the following call will come shortly <br />
25/07/2017: the deadline to deliver the second part of the homework project has been moved to Monday 07/08/2017<br />
15/07/2017: you can find here the [[Media:Grades_20170701_2.pdf|grades of the 01/07/2017 call]] with the projects for the laurandi students included. <br />
11/07/2017: you can find here the [[Media:Grades_20170701.pdf|grades of the 01/07/2017 call]]. Projects not included. <br />
11/07/2017: Update on Homework project<br />
12/06/2017: Second part of the project published<br />
05/06/2017: Sent confirmation email to students who have submitted the first part of the project <br />
12/05/2017: "Project clinic" details published in the schedule<br />
10/05/2017: Two dates for the "Project clinic" are planned please stay tuned for details<br />
08/05/2017: Change in the course Schedule ... check the updates!<br />
18/04/2017: Fixed link in the Homework Part A assignment.<br />
15/04/2017: The Homework Part A is out!!<br />
15/04/2017: Uploaded slides from Bardaro about ROS<br />
06/03/2017: Lectures start today!!<br />
--><br />
<!--<br />
07/10/2016: published [[Media:Grades_20160926.pdf|results of the 26/09/2016 call including projects]]<br />
12/09/2016: published [[Media:Grades_20160905.pdf|results of the 05/09/2016 call]]. '''Yellow projects still to be graded thus the final mark does not include those yet!'''<br />
09/09/2016: published [[Media:Grades_20160627_20160720.pdf|results of the first and second call including projects]]<br />
25/08/2016: published [[Media:Grades_20160720.pdf|results of the second call of the exam]], as well al [[Media:20160720.pdf|the text of the exam]] itself<br />
15/07/2016: the deadline for delivering the course project has been extendend until the end of August 2016.<br />
15/07/2016: published [[Media:Grades_20160627.pdf|results of the first call of the exam]], as well al [[Media:20160627.pdf|the text of the exam]] itself<br />
23/06/2016: Published the slides also in ppsx format<br />
15/06/2016: Published the updated and final version of the project description<br />
13/06/2016: Deadline for the course project is July, fixed on the course webpage<br />
23/05/2016: Course schedule change on 24-25/5 and 8-9/6<br />
16/05/2016: Some updates on the detailed course schedule ...<br />
12/05/2016: Published course project description v0.9<br />
04/05/2016: Published slides about SLAM with Laser and SLAM<br />
04/05/2016: Published slides about ROS robot architecture for navigation and code examples<br />
14/04/2016: Change in course detailed schedule: no lecture on 27/04/2016 and swap of teachers between 20/04 and 28/04<br />
14/04/2016: Published slides about Kinematics and Motion Control (draft) by Matteucci<br />
13/04/2016: Published slides about Middlewares and ROS by Bardaro<br />
19/03/2016: Published slides about Sensors, Actuators (Matteucci) and Gazebosim (Bardaro)<br />
09/03/2016: Change in course timetable, lectures start at 14:00 (sharp!) and end at 15:30 (roughly)<br />
09/03/2016: Lectures start today!!<br />
--><br />
<br />
==Course Aim & Organization==<br />
<br />
This course will introduce basic concepts and techniques used within the field of autonomous mobile robotics. We analyze the fundamental challenges for autonomous intelligent systems when these move on wheels or legs and present the state of the art solutions currently employed in mobile robots and autonomous vehicles with a focus on autonomous navigation, perception, localization, and mapping.<br />
<br />
===Teachers===<br />
<br />
The course is composed by a blending of lectures and exercises by the course teacher and a teaching assistant.<br />
<br />
* [https://www.deib.polimi.it/ita/personale/dettagli/267262 Matteo Matteucci]: the course teacher and this is his [HTTP://politecnicomilano.webex.com/join/matteo.matteucci webex room]<br />
* [https://www.deib.polimi.it/eng/people/details/1304888 Simone Mentasti]: the teaching assistant and this is his [HTTP://politecnicomilano.webex.com/join/simone.mentasti webex room]<br />
* [https://www.deib.polimi.it/ita/personale/dettagli/974764 Paolo Cudrano]: the teaching assistant and this is his [HTTP://politecnicomilano.webex.com/join/paolo.cudrano webex room]<br />
<br />
===Course Program===<br />
<br />
Lectures will provide theoretical background and real-world examples. Lectures will be complemented with practical software exercises in simulation and on real data for all the proposed topics and the students will be guided in developing the algorithms to control an autonomous robot.<br />
<br />
Among other topics, we will discuss:<br />
* Mobile robots kinematics,<br />
* Sensors and perception,<br />
* Robot localization and map building,<br />
* Simultaneous Localization and Mapping (SLAM),<br />
* Path planning and collision avoidance.<br />
<br />
===Detailed course schedule===<br />
<br />
A detailed schedule of the course can be found here; topics are just indicative while days and teachers are correct up to some last minute change (I will notify you by email). Please note that not all days we have lectures!!<br />
<br />
Note: Lecture timetable interpretation<br />
* On Wednesday, in 26.11, starts at 12:15, ends at 14:15<br />
* On Thursday, in 26.11, starts at 14:50, ends at 16:15<br />
<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic <br />
|-<br />
|23/02/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Course/Robotics Intro<br />
|-<br />
|24/02/2022 || Thursday || 14:15 - 16:15 || 26.11 || Matteo Matteucci || Lecture || Actuators<br />
|-<br />
|02/03/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Sensors<br />
|-<br />
|03/03/2022 || Thursday || 14:15 - 16:15 || 26.11 || Paolo Cudrano || Laboratory || ROS Install<br />
|-<br />
|09/03/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Sensors<br />
|-<br />
|10/03/2022 || Thursday || 14:15 - 16:15 || 26.11 || Paolo Cudrano || Laboratory || ROS Basics<br />
|-<br />
|16/03/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Kinematics<br />
|-<br />
|17/03/2022 || Thursday || 14:15 - 16:15 || 26.11 || Paolo Cudrano || Laboratory || Pub / Sub<br />
|-<br />
|23/03/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Kinematics<br />
|-<br />
|24/03/2022 || Thursday || 14:15 - 16:15 || 26.11 || Paolo Cudrano || Laboratory || Services and Params<br />
|-<br />
|30/03/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Localization and Lidars <br />
|-<br />
|31/03/2022 || Thursday || 14:15 - 16:15 || 26.11 || Paolo Cudrano || Laboratory || TF / Rviz / Actions <br />
|-<br />
|06/04/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Localization and Bayes Filters<br />
|-<br />
|07/04/2022 || Thursday || 14:15 - 16:15 || 26.11 || Matteo Matteucci || Lecture || Localization and Kalman Filters<br />
|-<br />
|13/04/2022 || Wednesday || --- || --- || --- || --- || --- Prove in itinere ---<br />
|-<br />
|14/04/2022 || Thursday || 14:15 - 16:15 || 26.11 || Matteo Matteucci || Lecture || Localization and Kalman Filters<br />
|-<br />
|20/04/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Localization and Kalman Filters<br />
|-<br />
|21/04/2022 || Thursday || 14:15 - 16:15 || 26.11 || Simone Mentasti || Laboratory || rospy, rosbag, message filter, plotjuggler<br />
|-<br />
|27/04/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Localization and Kalman Filters<br />
|-<br />
|28/04/2022 || Thursday || --- || --- || --- || --- || --- Lauree ---<br />
|-<br />
|04/05/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Mapping and SLAM<br />
|-<br />
|05/05/2022 || Thursday || 14:15 - 16:15 || 26.11 || Simone Mentasti || Laboratory || ROS on multiple machines, time synchronization, Actionlib, latched pub, async spinner<br />
|-<br />
|11/05/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Mapping and SLAM<br />
|-<br />
|12/05/2022 || Thursday || 14:15 - 16:15 || 26.11 || Matteo Matteucci || Lecture || Algorithms for Robot Navigation<br />
|-<br />
|18/05/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Simone Mentasti || Laboratory || Robot Navigation, Stage, Gmapping<br />
|-<br />
|19/05/2022 || Thursday || 14:15 - 16:15 || 26.11 || Simone Mentasti || Laboratory || Robot Navigation (Part II), Robot Localization, mapviz<br />
|-<br />
|25/05/2022 || Wednesday ||--- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|26/05/2022 || Thursday || 14:15 - 16:15 || 26.11 || Simone Mentasti || Laboratory || ROS2, foxglove, second project<br />
|-<br />
|01/06/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Algorithms for Robot Navigation<br />
|-<br />
|02/06/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|08/06/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Algorithms for Robot Navigation<br />
|}<br />
<br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic <br />
|-<br />
|24/02/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=e953e0e29b744f0fa604c2c401cb40b6 Course logistics] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=2068c40227aa4091a5483bb3c57af5e1 Introduction to Robotics]<br />
|-<br />
|24/02/2021 || Wednesday || 14:15 - 16:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|02/03/2021 || Tuesday || 17:15 - 19:15 || 3.0.2 (EX S.0.5) || Paolo Cudrano || ROS Team 1 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d260c9fb0aeb4963bfb3aa7be89a1632 Introduction to middleware in Robotics]<br />
|-<br />
|03/03/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=e74e003ef5664d849f848ff3831dd7e6 Sensors and Actuators]<br />
|-<br />
|03/03/2021 || Wednesday || 14:15 - 16:15 || 25.2.2 (EX D.3.2) || Simone Mentasti || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=3196f800c2be49b88f858ca6fd96b117 Introduction to middleware in Robotics]<br />
|-<br />
|09/03/2021 || Tuesday || 17:15 - 19:15 || Online on webex || Paolo Cudrano || ROS Team 1 || ROS Basics (see next for recoding)<br />
|-<br />
|10/03/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=30df56c53c6a4ac199dafff310f1f222 Robot Sensors] and [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4dbee67823f8417f8e3784248c4712db Intro to SLAM]<br />
|-<br />
|10/03/2021 || Wednesday || 14:15 - 16:15 || Online on webex || Paolo Cudrano || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=86c7caa885764429aff9777ed5cfa322 ROS Basics]<br />
|-<br />
|16/03/2021 || Tuesday || 17:15 - 19:15 || Online on webex || Paolo Cudrano || ROS Team 1 || Publishers and Subscribers (see next for recording)<br />
|-<br />
|17/03/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d85a41c9c6404ccab84b725f902c99eb Robot Kinematics (Differential Drive)]<br />
|-<br />
|17/03/2021 || Wednesday || 14:15 - 16:15 || Online on webex || Paolo Cudrano || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=41a263d5283e4c5d8a16840a1277512b Publishers and Subscribers]<br />
|-<br />
|23/03/2021 || Tuesday || 17:15 - 19:15 || Online on webex|| Paolo Cudrano || ROS Team 1 || Services and Parameters (see next for recording)<br />
|-<br />
|<s>24/03/2021</s> || <s>Wednesday</s> || <s>10:15 - 13:15</s> || <s>Online on webex</s> || <s>Matteo Matteucci</s> || <s>Lecture</s> || <s>Robot Kinematics </s><br />
|-<br />
|24/03/2021 || Wednesday || 14:15 - 16:15 || Online on webex || Paolo Cudrano || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=3e67b96db3bb4001a3a8af5b5b12f435 Services and Parameters]<br />
|-<br />
|30/03/2021 || Tuesday || 17:15 - 19:15 || Online on webex|| Simone Mentasti || ROS Team 1 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=b9eb5355185b49c4955ad3515f0e2b7f TF, RVIZ (Mentasti recording)]<br />
|-<br />
|31/03/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=a323ca89bbbb4fd7b30fb68b1037c10c Robot Kinematics (Continued)]<br />
|-<br />
|31/03/2021 || Wednesday || 14:15 - 16:15 || Online on webex || Paolo Cudrano || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=aabb359b39a44780adc917fa1a86ebb1 TF, RVIZ (Cudrano recording)]<br />
|-<br />
|06/04/2021 || Tuesday || 17:15 - 19:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|07/04/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ddc9aed131194c568131dd7e5c0875b3 Localization and LiDARS]<br />
|-<br />
|07/04/2021 || Wednesday || 14:15 - 16:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|13/04/2021 || Tuesday || 17:15 - 19:15 ||Online on webex|| Paolo Cudrano || ROS Team 1 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=e08a2c0739214339bf2ce4fb13dbb098 Bags, Message filters and rospy] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fe8dba62b550480d8ab6254f2e5bc8f5 Project 1 Presentation]<br />
|-<br />
|14/04/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=53269a220d2a4b5b885c36bcc1984116 Localization and Bayes filters]<br />
|-<br />
|14/04/2021 || Wednesday || 14:15 - 16:15 || Online on webex || Paolo Cudrano || ROS Team 2 || Bags, Message filters and rospy (see previous for recording)<br />
|-<br />
|20/04/2021 || Tuesday || 17:15 - 19:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|21/04/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fdb9155b23794cc6aac379e0cc2c0bf6 Localization with Kalman filters and Particle filters]<br />
|-<br />
|21/04/2021 || Wednesday || 14:15 - 16:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|27/04/2021 || Tuesday || 17:15 - 19:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|28/04/2021 || Wednesday || 10:15 - 13:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|28/04/2021 || Wednesday || 14:15 - 16:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|04/05/2021 || Tuesday || 17:15 - 19:15 || 3.0.2 (EX S.0.5) || Simone Mentasti || ROS Team 1 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7f075850e538498aa019575cdcab9eb2 ROS on Multiple Devices]<br />
|-<br />
|05/05/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=486985ca26b04cb0962143a7a58491b6 Mapping and SLAM]<br />
|-<br />
|05/05/2021 || Wednesday || 14:15 - 16:15 || 25.2.2 (EX D.3.2) || Simone Mentasti || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=138182322e7a4a799e162e4c49b39a66 ROS on Multiple Devices]<br />
|-<br />
|11/05/2021 || Tuesday || 17:15 - 19:15 || 3.0.2 (EX S.0.5) || Simone Mentasti || ROS Team 1 || Robot Navigation<br />
|-<br />
|12/05/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=3aaa118d78b74c67b0398bf9cf5bf2e1 Robot Motion Control]<br />
|-<br />
|12/05/2021 || Wednesday || 14:15 - 16:15 || 25.2.2 (EX D.3.2) || Simone Mentasti || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=39ba34fc6ae649f0b308fa5630451297 Robot Navigation]<br />
|-<br />
|18/05/2021 || Tuesday || 17:15 - 19:15 || 3.0.2 (EX S.0.5) || Simone Mentasti || ROS Team 1 || Robot Navigation (see next)<br />
|-<br />
|<s>19/05/2021</s>||<s>Wednesday</s>||<s>10:15 - 13:15</s>||<s>Online on webex</s>||<s>Matteo Matteucci</s>||<s>Lecture</s>||<s>Algorithms for Robot Navigation</s><br />
|-<br />
|19/05/2021 || Wednesday || 14:15 - 16:15 || 25.2.2 (EX D.3.2) || Simone Mentasti || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=30436cc0892841c0adffd24cce00c467 Robot Navigation]<br />
|-<br />
|25/05/2021 || Tuesday || 17:15 - 19:15 || 3.0.2 (EX S.0.5) || Simone Mentasti || ROS Team 1 || IMU Tools and robot localization (see next)<br />
|-<br />
|26/05/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=da607a0ea8ee42508eeb276224ed2f54 Search-based Planning]<br />
|-<br />
|26/05/2021 || Wednesday || 14:15 - 16:15 || 25.2.2 (EX D.3.2) || Simone Mentasti || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=a5e18e1b729a48c4a373873e0d3ea96d IMU Tools and robot localization] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f0a14f56b26445b0929a7465abb9f8b0 Project Presentation] + [https://drive.google.com/drive/folders/1uMwWmQ50iwrMXTJnpTuJdt5YNmnQkrOV?usp=sharing Project folder]<br />
|-<br />
|31/05/2021 || Monday || 13:15 - 16:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6fdba09c98844f5eb26b63c39f0cd997 Sampling-based Planning]<br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic <br />
|-<br />
|04/03/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/0f7f27ac-4930-44d4-8d1c-638855a7d04b Course Logistics] and [https://web.microsoftstream.com/video/b00b4347-5e11-4e13-bbfd-404e89c73b28 Introduction to Robotics] <br />
|-<br />
|05/03/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/c3abc791-942e-44af-9f70-c9c81e0815f0 Intro to Robot Actuators and DC Motors]<br />
|-<br />
|11/03/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/7c980e36-9bcc-4462-a79a-ebfbd3967c7b More on Motors and Intro to Robot Sensors]<br />
|-<br />
|12/03/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/89e90ef3-9588-433f-bacd-f93fe6cfb492 Robot Sensors (continued)]<br />
|-<br />
|18/03/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/2a1bb9d7-99f0-40b1-9cf0-c832cdf73e2c Middleware for robotics and ROS Installation Party]<br />
|-<br />
|19/03/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/cedd53c0-24e5-4071-9a4c-de01b7e59d0d Ros workspace, Publisher/subscriber, launch file]<br />
|-<br />
|25/03/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/712641c5-ac98-4596-93db-0fb7b5aff41c Introduction to Localization and Robot Kinematics]<br />
|-<br />
|26/03/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/3da222dc-ecd9-4e09-9452-d20d606dfa23 Differential Drive Robot Kinematics and Odometry]<br />
|-<br />
|01/04/2020 || Wenesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/ccc5ae01-48e1-489d-8f2c-b71a1a1e9cb4 Skid-Steering and Omnidrectional Robot Kinematics and Odometry]<br />
|-2<br />
|02/04/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/03ff3d93-8bdc-49d1-b9fd-3b3242bfa695 Ackerman like Robot Kinematics and Odometry] <br />
|-<br />
|08/04/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || ROS ||Simone Mentasti || [https://web.microsoftstream.com/video/9c83039d-32e5-4396-889e-259eeb80f6a1 Publisher, subscriber, launch file , custom messages]<br />
|-<br />
|09/04/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/5d2c2cf1-1369-46a8-83ad-a7c4dac24f98 Services, parameters],[https://web.microsoftstream.com/video/7e937b7a-15ac-4a3c-91fa-db16beedf7ef parameters (continued), timers, node architecture]<br />
|-<br />
|15/04/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || ROS ||Simone Mentasti || [https://web.microsoftstream.com/video/d454b7b3-382d-4b96-b082-d7c77bbe11ef TF, Rviz, Actionlib]<br />
|-<br />
|16/04/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/8ee81454-b420-4d53-ab11-b847d0ee9c46 Message filter, rospy]<br />
|-<br />
|16/04/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/a02ba753-bbcc-4f9d-84c1-b8d756b94425 Project presentation]<br />
|-<br />
|22/04/2020 || Wenesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/b2d048b9-a93d-4fc7-b24b-1185ae16d9d3 Introduction to Robot Localization and LIDAR sensor modeling]<br />
|-<br />
|23/04/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/6c43fe49-74ed-4111-a2c3-fe67bb6a94dd Robot Localization and Bayes Filters (discrete)]<br />
|-<br />
|29/04/2020 || Wednesday || 14:15 - 16:15 || Teams Virtual Room || --- || --- || -- No lectures (Lauree) --<br />
|-<br />
|30/04/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/df9ace9e-286d-4d7d-98dd-1218ef873a62 Robot Localization with (Extended) Kalman Filters]<br />
|-<br />
|06/05/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci|| [https://web.microsoftstream.com/video/8dcaf0c6-0508-415e-991a-322c91cc9410 Robot Localization with Particle Filters]<br />
|-<br />
|07/05/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci|| [https://web.microsoftstream.com/video/13d8a902-697a-4a21-8b0e-182595b62198 Robot Mapping]<br />
|-<br />
|13/05/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/a35eb86f-faf4-4849-b075-6c766fe35e15 Simultaneous Localization and Mapping]<br />
|-<br />
|14/05/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/2ee901d0-d883-477d-bcf3-9f7c93f3ab19 Simultaneous Localization and Mapping]<br />
|-<br />
|20/05/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/10b205f8-75d9-4010-ade7-f42c0e7f8afe Robot Navigation Algorithms]<br />
|-<br />
|21/05/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/e798be4d-f6a3-40bd-a657-3141cc5a5342 Robot Navigation Algorithms]<br />
|-<br />
|27/05/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/f77b9fa4-3582-495c-b9d3-4a145ec2d53f ROS on multiple devices, Actionlib]<br />
|-<br />
|28/05/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/ffb64e1b-defa-43dc-8e61-c3394fb472ec Robot Navigation (Introduction)] <br />
|-<br />
|03/06/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/ca22b7e3-a71d-4dbe-a344-4979a3198e8b Robot simulators] and [https://web.microsoftstream.com/video/36cb2045-2e24-4b84-8773-d5c171ecf4ed Robot Navigation (Examples)]<br />
|-<br />
|04/06/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/d285b29c-df90-44d1-9df6-8ceb375654cd IMU Tools, Robot Localization]<br />
|-<br />
|04/06/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/e7e8bbbc-0387-4920-bf10-feeb29ab6c81 Second project presentation] with [[Media:Robotics_2019_2020_second_project.pdf |slides]]<br />
|-<br />
|12/06/2020 || Friday || 16:30 - 18:30 || Zoom Virtual Room || Lecture || Matteo Matteucci || Q&A + Exam Rehearsal <br />
|}<br />
--><br />
<!--|-<br />
|13/05/2020 || Wednesday || 12:15 - 14:15 || 5.1.1 || Lecture || Matteo Matteucci || Simultaneous Localization and Mapping<br />
|-<br />
|14/05/2020 || Thursday || 14:15 - 16:15 || 6.0.1 || Lecture || Matteo Matteucci || Simultaneous Localization and Mapping<br />
|-<br />
|20/05/2020 || Wednesday || 12:15 - 14:15 || 5.1.1 || Lecture || Matteo Matteucci || Robot Navigation Algorithms<br />
|-<br />
|21/05/2020 || Thursday || 14:15 - 16:15 || 6.0.1 || Lecture || Matteo Matteucci || Robot Navigation Algorithms<br />
|-<br />
|27/05/2020 || Wednesday || 12:15 - 14:15 || 5.1.1 || ROS || Simone Mentasti || Message filters, rospy. First project presentation<br />
|-<br />
|28/05/2020 || Thursday || 14:15 - 16:15 || 6.0.1 || ROS || Simone Mentasti || ROS on multiple machines, time syncronization, stage<br />
|-<br />
|03/06/2020 || Wednesday || 12:15 - 14:15 || 5.1.1 || ROS || Simone Mentasti || Robot Navigation (Part I)<br />
|-<br />
|04/06/2020 || Thursday || 14:15 - 16:15 || 6.0.1 || ROS || Simone Mentasti || Robot Navigation (Part II)<br />
|-<br />
| -- || -- || -- || -- || -- || -- || --<br />
|-<br />
| -- || -- || -- || -- || -- || -- || -- <br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Topic<br />
|-<br />
|25/02/2018 || Monday || 16:15 - 18:15 || 5.0.1 || Matteo Matteucci || Course Introduction<br />
|-<br />
|27/02/2018 || Wednesday || 12:15 - 14:15 || 5.03 || Matteo Matteucci || Robot Sensors and Actuators<br />
|-<br />
|04/03/2018 || Monday || 16:15 - 18:15 || 5.0.1 || Matteo Matteucci || -- No Lecture --<br />
|-<br />
|06/03/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Matteo Matteucci || Robot Sensors and Actuators<br />
|-<br />
|12/03/2018 || Monday || 16:15 - 18:15 || D1.2 || Simone Mentasti || Gazebosim and SDF<br />
|-<br />
|14/03/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Simone Mentasti || Differential Robot in Gazebo<br />
|-<br />
|19/03/2018 || Monday || 16:15 - 18:15 || D1.2 || Simone Mentasti || Sensors and Actuators in Gazebo<br />
|-<br />
|21/03/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Simone Mentasti || Middleware for robotics<br />
|-<br />
|26/03/2018 || Monday || 16:15 - 18:15 || D1.2 || Matteo Matteucci|| Robot Sensors and Actuators<br />
|-<br />
|28/03/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Matteo Matteucci|| Robot Kinematics<br />
|-<br />
|02/04/2018 || Monday || 16:15 - 18:15 || ... || ...|| -- No Lecture --<br />
|-<br />
|04/04/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Matteo Matteucci|| Robot Kinematics<br />
|-<br />
|09/04/2018 || Monday || 16:15 - 18:15 || D1.2 || Matteo Matteucci|| Robot Navigation Algorithms<br />
|-<br />
|11/04/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Matteo Matteucci|| Robot Navigation Algorithms<br />
|-<br />
|16/04/2018 || Monday || 16:15 - 18:15 || D1.2 || Simone Mentasti|| Introduction to ROS<br />
|-<br />
|18/04/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Simone Mentasti|| ROS Programming<br />
|-<br />
|23/04/2018 || Monday || 16:15 - 18:15 || D1.2 || Simone Mentasti|| Integration between ROS and Gazebo<br />
|-<br />
|25/04/2018 || Wednesday || 12:15 - 14:15 || D1.2 || -- || -- No Lecture --<br />
|-<br />
|30/04/2018 || Monday || 16:15 - 18:15 || D1.2 || -- || -- No Lecture --<br />
|-<br />
|02/05/2018 || Wednesday || 12:15 - 14:15 || D1.2 || -- || -- No Lecture --<br />
|-<br />
|07/05/2018 || Monday || 16:15 - 18:15 || D1.2 || Matteo Matteucci || Robot Navigation Algorithms<br />
|-<br />
|09/05/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Simone Mentasti || Advanced ROS Topics<br />
|-<br />
|14/05/2018 || Monday || 16:15 - 18:15 || D1.2 || Matteo Matteucci || Robot Localization and Mapping<br />
|-<br />
|16/05/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Matteo Matteucci || Robot Localization and Mapping<br />
|-<br />
|21/05/2018 || Monday || 16:15 - 18:15 || D1.2 || Matteo Matteucci || Robot Localization and Mapping<br />
|-<br />
|23/05/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Matteo Matteucci || Robot Localization and Mapping<br />
|-<br />
|28/05/2018 || Monday || 16:15 - 18:15 || D1.2 || Matteo Matteucci || Robot Localization and Mapping<br />
|-<br />
|30/05/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Matteo Matteucci || Robot Localization and Mapping<br />
|-<br />
|04/06/2018 || Monday || 16:15 - 18:15 || D1.2 || Simone Mentasti || ROS Movebase Package<br />
|-<br />
|06/06/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Simone Mentasti || ROS Movebase Package<br />
|-<br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Topic<br />
|-<br />
|06/03/2016 || Monday || 16:15 - 18:15 || T.1.1 || Matteo Matteucci || Course Introduction<br />
|-<br />
|08/03/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Matteo Matteucci || Robot Kinematics<br />
|-<br />
|13/03/2016 || Monday || 16:15 - 18:15 || T.1.1 || Matteo Matteucci || Robot Kinematics<br />
|-<br />
|15/03/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Gianluca Bardaro || Gazebosim and URDF<br />
|-<br />
|20/03/2016 || Monday || 16:15 - 18:15 || T.1.1 || Gianluca Bardaro || Differential drive in Gazebo<br />
|-<br />
|22/03/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Gianluca Bardaro || Middleware for robotics<br />
|-<br />
|27/03/2016 || Monday || 16:15 - 18:15 || T.1.1 || Gianluca Bardaro || A gentle introduction to ROS<br />
|-<br />
|29/03/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Gianluca Bardaro || Differential drive control in ROS<br />
|-<br />
|03/04/2016 || Monday || 16:15 - 18:15 || T.1.1 || Matteo Matteucci || Robot Kinematics<br />
|-<br />
|05/04/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Matteo Matteucci || Robot Kinematics<br />
|-<br />
|10/04/2016 || Monday || 16:15 - 18:15 || T.1.1 || Matteo Matteucci || Sensors and Actuators<br />
|-<br />
|12/04/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Matteo Matteucci || Sensors and Actuators<br />
|-<br />
|17/04/2016 || Monday || 16:15 - 18:15 || - || - || No Lecture<br />
|-<br />
|19/04/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Matteo Matteucci || Robot navigation algorithms<br />
|-<br />
|24/04/2016 || Monday || 16:15 - 18:15 || - || - || No Lecture<br />
|-<br />
|26/04/2016 || Wednesday || 12:15 - 14:15 || - || - || No Lecture (suspension)<br />
|-<br />
|01/05/2016 || Monday || 16:15 - 18:15 || - || - || No Lecture<br />
|-<br />
|03/05/2016 || Wednesday || 12:15 - 14:15 || - || - || No Lecture (suspension)<br />
|-<br />
|08/05/2016 || Monday || 16:15 - 18:15 || T.1.1- || Matteo Matteucci || Robot navigation algorithms<br />
|-<br />
|10/05/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Matteo Matteucci || Trajectory planning<br />
|-<br />
|15/05/2016 || Monday || 16:15 - 18:15 || - || - || No Lecture<br />
|-<br />
|17/05/2016 || Wednesday || 12:15 - 14:15 || - || - || No Lecture<br />
|-<br />
|22/05/2016 || Monday || 16:15 - 18:15 || T.1.1 || Gianluca Bardaro || Trajectory planning and navigation in ROS<br />
|-<br />
|24/05/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Gianluca Bardaro || ROS tf + actionlib<br />
|-<br />
|25/05/2016 || Thursday || 10:00 - 12:00 || PT1 (DEIB) || Gianluca Bardaro || "Project clinic"<br />
|-<br />
|29/05/2016 || Monday || 16:15 - 18:15 || T.1.1 || Gianluca Bardaro || ROS Navigation with movebase<br />
|-<br />
|30/05/2016 || Tuesday || 10:00 - 12:00 || PT1 (DEIB) || Gianluca Bardaro || "Project clinic"<br />
|-<br />
|31/05/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Gianluca Bardaro || Ros Navigation with movebase (continued)<br />
|-<br />
|05/06/2016 || Monday || 16:15 - 18:15 || T.1.1 || Matteo Matteucci || Introduction to probability and Simultaneous Localization and Mapping (SLAM)<br />
|-<br />
|07/06/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Matteo Matteucci || Occupancy grids and Laser sensor model<br />
|-<br />
|12/06/2016 || Monday || 16:15 - 18:15 || T.1.1- || Matteo Matteucci || Mapping with known poses and scan matching<br />
|-<br />
|14/06/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Matteo Matteucci || EKF-SLAM and FAST Slam<br />
|-<br />
|19/06/2016 || Monday || 16:15 - 18:15 || T.1.1- || Matteo Matteucci || Particle filters and Monte Carlo Localization<br />
|-<br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Topic<br />
|-<br />
|09/03/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Course Introduction<br />
|-<br />
|10/03/2016 || Thursday || 14:00 - 15:30 || D11 || Matteo Matteucci || Sensors and Actuators<br />
|-<br />
|16/03/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Sensors and Actuators<br />
|-<br />
|17/03/2016 || Thursday || 14:00 - 15:30 || D11 || Gianluca Bardaro || Gazebosim and URDF<br />
|-<br />
|23/03/2016 || Wednesday || 14:00 - 15:30 || EG3 || Gianluca Bardaro || Differential drive in Gazebo<br />
|-<br />
|24/03/2016 || Thursday || 14:00 - 15:30 || -- || -- || No Classes<br />
|-<br />
|30/03/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Sensors and Actuators<br />
|-<br />
|31/03/2016 || Thursday || 14:00 - 15:30 || D11 || Matteo Matteucci || Robot kinematics<br />
|-<br />
|06/04/2016 || Wednesday || 14:00 - 15:30 || EG3 || Gianluca Bardaro || Middleware for robotics<br />
|-<br />
|07/04/2016 || Thursday || 14:00 - 15:30 || D11 || Gianluca Bardaro || A gentle introduction to ROS<br />
|-<br />
|13/04/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Robot kinematics<br />
|-<br />
|14/04/2016 || Thursday || 14:00 - 15:30 || D11 || Matteo Matteucci || Robot navigation algorithms<br />
|-<br />
|20/04/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Trajectory planning introduction<br />
|-<br />
|21/04/2016 || Thursday || 14:00 - 15:30 || D11 || Gianluca Bardaro || Differential drive control in ROS<br />
|-<br />
|27/04/2016 || Wednesday || 14:00 - 15:30 || -- || -- || No Classes<br />
|-<br />
|28/04/2016 || Thursday || 14:00 - 15:30 || D11 || Gianluca Bardaro || Trajectory planning and navigation in ROS<br />
|-<br />
|04/05/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Trajectory planning (continued)<br />
|-<br />
|05/05/2016 || Thursday || 14:00 - 15:30 || D11 || Matteo Matteucci || Introduction to probability and Simultaneous Localization and Mapping (SLAM)<br />
|-<br />
|11/05/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Occupancy grids and Laser sensor model<br />
|-<br />
|12/05/2016 || Thursday || 14:00 - 15:30 || D11 || Matteo Matteucci || Mapping with known poses and scan matching + Project presentation<br />
|-<br />
|18/05/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || EKF-SLAM and FAST Slam<br />
|-<br />
|19/05/2016 || Thursday || 14:00 - 15:30 || D11 || Matteo Matteucci || Particle filters and Monte Carlo Localization<br />
|-<br />
|25/05/2016 || Wednesday || -- || -- || -- || No Classes<br />
|-<br />
|26/05/2016 || Thursday || -- || -- || -- || No Classes<br />
|-<br />
|01/06/2016 || Wednesday || 14:00 - 15:30 || EG3 || Gianluca Bardaro || ROS tf + actionlib<br />
|-<br />
|02/06/2016 || Thursday || -- || -- || -- || No Classes<br />
|-<br />
|08/06/2016 || Wednesday || 14:00 - 15:30 || EG3 || Gianluca Bardaro || ROS Navigation with movebase<br />
|-<br />
|09/06/2016 || Thursday || 14:00 - 15:30 || D11 || Gianluca Bardaro || Ros Navigation with movebase (continued)<br />
|-<br />
|15/06/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Questions and answers about theory<br />
|-<br />
|16/06/2016 || Wednesday || 14:00 - 15:30 || EG3 || Gianluca Bardaro || Questions and answers about project and exercises<br />
|-<br />
|}<br />
--><br />
<br />
===Course Evaluation===<br />
<br />
Course evaluation is composed by two parts:<br />
<br />
* A written examination covering the whole program graded up to 26/32<br />
* A home project in simulation practicing the topics of the course graded up to 6/32<br />
<br />
The final score will sum the grade of the written exam and the grade of the home project.<br />
<br />
===Course Project (i.e., the two [2] homeworks)===<br />
<br />
In the course project, you will use [http://www.ros.org/ ROS] to develop a simple autonomous mobile robot performing simple mapping, localization, and navigation task. The project requires some coding either in C++ / Python following what will be presented during the lectures (we suggest using C++ as it will be the language used in class). The project will be presented in two (2) parts you have about one month to do each. Details will follow.<br />
<br />
==Teaching Material (the textbook)== <br />
<br />
Lectures will be based on material from different sources, teachers will provide their slides to students as soon they are available. <br />
<br />
===Course Slides 2021/2022===<br />
<br />
Slides from the lectures by Matteo Matteucci<br />
*[[Media:Robotics_00_2122_Course_Introduction.pdf|[2021/2022] Course Introduction]]: introductory slides of the course with useful information about the course syllabus, grading, and the course logistics. <br />
*[[Media:Robotics_01_2122_Introduction.pdf|[2021/2022] Introduction to Robotics]]: Introduction to Robotics, definitions, examples and SAP cognitive model. <br />
*[[Media:Robotics_02_2122_Sensors_Actuators.pdf |[2021/2022] Sensors and Actuators]]: an overview of most commonly used actuator and sensors in robotics, the DC motor and its characteristics, gears and torque. Sensor classification, common sensors in robotics with pros and cons.<br />
*[[Media:Robotics_03_2122_Odometry.pdf |[2021/2022] Robot Odometry]]: Robot Localization intro, direct and inverse kinematics, robot odometry for different kinematics (differential drive, skid steering, Ackerman, etc.).<br />
*[[Media:Robotics_04_2021_Localization.pdf |[2020/2021] Robot Localization]]: Sensor models, Robot Localization, Bayesian filtering, Kalman Filtering, Monte Carlo Localization.<br />
*[[Media:Robotics_05_2021_SLAM.pdf |[2020/2021] Simultaneous Localization and Mapping]]: Mapping with known poses, scan matching, EKF-SLAM, FAST-SLAM<br />
** [https://drive.google.com/drive/folders/1JO8AQIWaOYeW11d9rInox0pZPZG-fdfc?usp=sharing At this link] you can find the videos included in the slides about (simulataneous) localization and mapping <br />
*[[Media:Robotics_06_2021_MotionControl_tmp.pdf |[2020/2021] Robot Motion Control]]: Introduction to motion control, Virtual Histogram methods, Dynamic Window Approach (+ planning algorithms)<br />
<!--<br />
*[[Media:Robotics_03_Mobile_Robots_Kinematics.pdf |[2015/2016] Mobile Robots Kinematics]]: mobile (wheeled) robot kinematics, holonomic and non holonomic constraints, differential drive model. [https://drive.google.com/open?id=0B5eSI7n7LkDhM3NIRGlNdktRSzA ppsx]<br />
*[[Media:Robotics_04_Motion_Control.pdf |[2015/2016] Robot Motion Control]]: mobile robot navigation, trajectory planning, trajectory following, and obstacle avoidance. [https://drive.google.com/open?id=0B5eSI7n7LkDhS3BXZzByYzYxVlU (ppsx)]<br />
*[[Media:Robotics_05_2018_SLAM_with_Lasers.pdf |[2017/2018] SLAM with Lasers]]: introduction to Simultaneous Localization and Mapping, EKF based SLAM, Particle Filters, and Monte Carlo Localization. [https://drive.google.com/open?id=0B5eSI7n7LkDhd2FZY1NRWmpiVm8 (ppsx)]<br />
--><br />
<!--Slides from the lectures by Simone Mentasti as well as examples can be found [https://goo.gl/GonArW at this link], for your convenience we publish here the PDF of the lectures, but check the previous link for coding examples:--><br />
<br />
Last version of slides from the lectures by Paolo Cudrano are available [https://polimi365-my.sharepoint.com/:f:/g/personal/10457911_polimi_it/Eq7UEjxDOOtNrZtvLSKLrEUBKpga-uGlXx8qkZgJjXQJMg HERE!].<br />
<br />
Last version of slides from the lectures by Simone Mentasti are available [HERE!].<br />
<!--<br />
Last version of slides from the lectures by Simone Mentasti are available [https://goo.gl/GonArW HERE!]. <br />
<br />
Past year slides are below:<br />
*[[Media:Robotics_L1_2019_ex.pdf|[2018/2019] Middleware in Robotics]]: Middleware for robotics and ROS Installation Party<br />
*[[Media:Robotics_L2_2019_ex.pdf|[2018/2019] ROS Environment]]: Ros workspace, publisher/subscriber<br />
*[[Media:Robotics_L3_2019_ex.pdf|[2018/2019] ROS Basics]]: Messages, services, parameters,launch file<br />
*[[Media:Robotics_L4_2019_ex.pdf|[2018/2019] ROS Tools]]: Bags, tf, actionlib, rqt_tools<br />
*[[Media:Robotics_L5_2019_ex.pdf|[2018/2019] Actiolib]]: Actiolib and message filters <br />
*[[Media:Robotics_L6_2019_ex.pdf|[2018/2019] ROS on Multiple Machines]]: how to run ROS nodes on different machines <br />
*[[Media:Robotics_L7_2019_ex.pdf|[2018/2019] Robot Navigation]]: ROS Navigation Stack, Movebase, Navcore, Gmapping<br />
*[[Media:Robotics_L9_2019_ex.pdf|[2018/2019] Opencv/CV_BRIDGE]]: how to nterface OpenCV and ROS <br />
*[[Media:Robotics_L10_2019_ex.pdf|[2018/2019] Robot Localization]]: useful stuff for the course project ;-)<br />
--><br />
<br />
===Year 2020/2021 Recording===<br />
As I registered these due to pandemics, I am making them available. They DO NOT REPLACE THIS YEAR classroom lectures which are to be considered as the official material of this year, but they might be useful to double-check your notes.<br />
<br />
* 24/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=e953e0e29b744f0fa604c2c401cb40b6 Course logistics] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=2068c40227aa4091a5483bb3c57af5e1 Introduction to Robotics]<br />
* 03/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=e74e003ef5664d849f848ff3831dd7e6 Sensors and Actuators]<br />
* 10/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=30df56c53c6a4ac199dafff310f1f222 Robot Sensors] and [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4dbee67823f8417f8e3784248c4712db Intro to SLAM]<br />
* 17/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d85a41c9c6404ccab84b725f902c99eb Robot Kinematics (Differential Drive)]<br />
* 31/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=a323ca89bbbb4fd7b30fb68b1037c10c Robot Kinematics (Continued)]<br />
* 07/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ddc9aed131194c568131dd7e5c0875b3 Localization and LiDARS]<br />
* 14/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=53269a220d2a4b5b885c36bcc1984116 Localization and Bayes filters]<br />
* 21/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fdb9155b23794cc6aac379e0cc2c0bf6 Localization with Kalman filters and Particle filters]<br />
* 05/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=486985ca26b04cb0962143a7a58491b6 Mapping and SLAM]<br />
* 12/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=3aaa118d78b74c67b0398bf9cf5bf2e1 Robot Motion Control]<br />
* 26/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=da607a0ea8ee42508eeb276224ed2f54 Search-based Planning]<br />
* 31/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6fdba09c98844f5eb26b63c39f0cd997 Sampling-based Planning]<br />
<br />
Also, labs are available, however, the organization during the pandemic was kind of different with 2 teams to reduce classroom occupancy. This is why they might resemble a kind of disconnected. <br />
<br />
* 02/03/2021 - Paolo Cudrano [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d260c9fb0aeb4963bfb3aa7be89a1632 Introduction to middleware in Robotics]<br />
* 09/03/2021 - Paolo Cudrano [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=86c7caa885764429aff9777ed5cfa322 ROS Basics]<br />
* 17/03/2021 - Paolo Cudrano [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=41a263d5283e4c5d8a16840a1277512b Publishers and Subscribers]<br />
* 24/03/2021 - Paolo Cudrano [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=3e67b96db3bb4001a3a8af5b5b12f435 Services and Parameters]<br />
* 31/03/2021 - Paolo Cudrano [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=aabb359b39a44780adc917fa1a86ebb1 TF, RVIZ (Cudrano recording)]<br />
* 13/04/2021 - Paolo Cudrano [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=e08a2c0739214339bf2ce4fb13dbb098 Bags, Message filters and rospy] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fe8dba62b550480d8ab6254f2e5bc8f5 Project 1 Presentation]<br />
* 04/05/2021 - Simone Mentasti [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7f075850e538498aa019575cdcab9eb2 ROS on Multiple Devices]<br />
* 12/05/2021 - Simone Mentasti [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=39ba34fc6ae649f0b308fa5630451297 Robot Navigation]<br />
* 26/05/2021 - Simone Mentasti [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=a5e18e1b729a48c4a373873e0d3ea96d IMU Tools and robot localization] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f0a14f56b26445b0929a7465abb9f8b0 Project Presentation] + [https://drive.google.com/drive/folders/1uMwWmQ50iwrMXTJnpTuJdt5YNmnQkrOV?usp=sharing Project folder]<br />
<br />
===Useful stuff from the web===<br />
These are videos from the web which might be useful to understand better the material presented in the lectures<br />
*[https://www.youtube.com/watch?v=LAtPHANEfQo Understanding DC Brushed Motors] by Learn Engineering <br />
*[https://www.youtube.com/watch?v=bCEiOnuODac Understanding DC Brushless Motors] by Learn Engineering <br />
*[https://www.youtube.com/watch?v=eyqwLiowZiU Understanding DC Stepper Motors] by Learn Engineering<br />
<br />
This blog post can be useful to better understand the EKF-SLAM idea and implementation <br />
*[https://jihongju.github.io/2019/07/06/ekfslam-hands-on-tutorial/ EKF-SLAM hands-on tutorial] by Jihong Ju<br />
<br />
If you have problems in installing Linux on your machine you can use a USB drive distro and boot on it instead of your OS. '''Note''': We are testing this guide these days we might have some tips and tricks for it so stay tuned!<br />
*[https://www.fosslinux.com/10212/how-to-install-a-complete-ubuntu-on-a-usb-flash-drive.htm How to install a complete ubuntu on a USB flash drive] (need to have the USB drive inserted to boot)<br />
<br />
The ROS framework is C++ based, if you want to check some C++ tutorial online you can have a look at<br />
* [https://www.programiz.com/cpp-programming Simple, basic topics about C++]<br />
* [https://www.cplusplus.com/doc/tutorial/ A more detailed tutorial about C++]<br />
* [https://www.learncpp.com/ An even more detailed tutorial on C++] (you can just focus on some particular chapters. In particular, Ch. 11 seems interesting as a detailed overview of Object-Oriented Programming, if you are not familiar with it.)<br />
<br />
===Useful readings===<br />
These are papers which explain some of the topics in the lecture with a higher level of details<br />
*[https://www.mdpi.com/1424-8220/15/5/9681/pdf Analysis and experimental kinematics of a skid-steering wheeled robot based on a laser scanner sensor.] Wang, Tianmiao, Yao Wu, Jianhong Liang, Chenhao Han, Jiao Chen, and Qiteng Zhao. Sensors 15, no. 5 (2015): 9681-9702.<br />
*[http://www.iri.upc.edu/people/jsola/JoanSola/objectes/curs_SLAM/SLAM2D/SLAM%20course.pdf Simultaneous localization and mapping with the extended Kalman filter.] Joan Sola'. <br />
*[http://robots.stanford.edu/papers/Thrun03g.pdf FastSLAM: An Efficient Solution to the Simultaneous Localization And Mapping Problem with Unknown Data Association.] Sebastian Thrun, Michael Montemerlo, Daphne Koller, Ben Wegbreit, Juan Nieto, and Eduardo Nebot.<br />
<br />
<!--<br />
*[[Media:Robotics_01ex_2018_Gazebo.pdf | [2017/2018] Gazebosim and SDF]]: an introduction to robotics simulators, an overview of Gazebo, its use, and the SDF file format to describe a robot simulation.<br />
*[[Media:Robotics_02ex_2018_GazeboPlugins.pdf | [2017/2018] Gazebosim and plugins]]: more about simulation with Gazebo, modeling of a caster wheel, modeling of noise with Gazebo plugins, the GPS example.<br />
*[[Media:Robotics_03ex_2018_Middleware.pdf | [2017/2018] Middleware in Robotics]]: an introduction to the use of middleware for robotics, motivation and state of the art review.<br />
--><br />
<!--<br />
Slides from the lectures by Gianluca Bardaro (you can find material under preparation [https://goo.gl/DBwhhC at this link])<br />
*[[Media:Robotics_01ex_2017_Gazebo.pdf | [2016/2017] Gazebosim and SDF]]: an introduction to robotics simulators, an overview of Gazebo, its use, and the SDF file format to describe a robot simulation.<br />
*[[Media:Robotics_02ex_2017_GazeboPlugins.pdf | [2016/2017] Gazebosim and plugins]]: more about simulation with Gazebo, modeling of a caster wheel, modeling of noise with Gazebo plugins, the GPS example.<br />
*[[Media:Robotics_03ex_2017_Middleware.pdf | [2016/2017] Middleware in Robotics]]: an introduction to the use of middleware for robotics, motivation and state of the art review.<br />
*[[Media:Robotics_03ex_2017_ROSInstall.pdf | [2016/2017] ROS Install]]: Introduction to the Robotic Operating System, installation and main conceptual elements<br />
*[[Media:Robotics_04ex_2017_ROSIntro.pdf | [2016/2017] ROS Introduction]]: Introduction to the ROS File system and overview on the most used commands<br />
*[[Media:Robotics_04ex_2017_ROSDevelopment.pdf | [2016/2017] ROS Development]]: Structure of a node and main element used in its development and building.<br />
*[[Media:Robotics_05ex_2017_ROSArchitectureExample.pdf | [2016/2017] ROS Architecture]]: Creating a simple architecture in ROS to manually control a simulated robot. See examples.zip for the source code.<br />
<br />
Additional material from the teachers<br />
*[[Media:Robotics_2017_examples.zip | [2016/2017] examples]]: gazebo model for a differential drive with a caster wheel<br />
--><br />
<!--*: an example of motion control architecture implemented in ROS, integration with Gazebo, introduction to tf.<br />
*[[Media:Robotics_06ex_Transformation_Frames.pdf | [2015/2016] Transformation Frames]]: reference frames and the tf framework to handles transformation frames in ROS.<br />
*[[Media:Robotics_07ex_Actionlib.pdf | [2015/2016] Actionlib]]: the ROS actionlib package.<br />
Additional material from the teachers<br />
*[[Media:Robotics_willy1.zip | [2015/2016] willy1.zip]]: gazebo model for a differential drive with a caster wheel<br />
*[[Media:Robotics_gps.zip | [2015/2016] gps.zip]]: gazebo plugin to simulate a faulty gps sensor<br />
*[[Media:lesson_pack.zip | [2015/2016] lesson_pack.zip]]: ROS nodes examples with object oriented template of talker and listener<br />
*[[Media:Robotics_willy2.zip | [2015/2016] willy2.zip]]: an improved gazebo model for a differential drive with a caster wheel<br />
*[[Media:Robotics_diffdrive.zip | [2015/2016] diffdrive.zip]]: a ROS motion control architecture for a diffdrive robot--><br />
<br />
===Course Projects===<br />
<br />
==== Homework 2021/2022 ====<br />
<br />
The First project con the Robotics class is available [https://polimi365-my.sharepoint.com/:f:/g/personal/10457911_polimi_it/EhsMssV_kDBKkp7gY-xGV3gBNGpBpnyoHPR_Gu5eAMebyw?e=2XCRe5 HERE!], deadline is 29/04/2022!<br />
<br />
==Frequently Asked Questions==<br />
<br />
===Course Structure===<br />
<br />
'''What is the biggest difference with the course 093217 ROBOTICS AND DESIGN?'''<br />
* Robotics and Design is a practical course focused on the development of a robotics application, you will not learn about the theoretical aspects of robotics, but you will build a robot with a purpose which changes every year. I consider the two courses as complimentary.<br />
<br />
===Exams and Evaluation===<br />
<br />
'''Are there any solutions available for the past exams?'''<br />
* No, if you have doubts or questions, just send me your proposed solution and I will reply tailoring the answer to your current understanding.<br />
<br />
'''Is it important to buy/read the text book to be able to follow the course? I can’t find it in the library, is there any alternative book?'''<br />
* No, it is not required, as from past experience attending classes and checking the material provided y the teachers is enough. Obviously reading the book will provide much more information..<br />
<br />
===Homeworks and ROS===<br />
<br />
'''In the schedule when it says ROS, are these lectures as well or are they practical work i.e. lab/excercise?'''<br />
*They are ex-cathedra lectures where you are expected to bring your laptop, it is not mandatory and you can follow the class in a classical passive way, but I suggest to consider it as a lab and take your laptop with you if you can.<br />
<br />
'''Out of all the scheduled activities this semester, approximately how many of these are practical lab/excercise?<br />
* Indeed not all ROS lectures will present coding exercises, I expect half of them will be about coding and the other half more on the technical background you need to understand what you are coding.<br />
<br />
'''Should I install ROS on my laptop/desktop?'''<br />
*Absolutely yes. This means you need to have linux on your machine, possibly ubuntu 16.04 or 18.04. This can be achieved in different ways, we suggest a native install via dual boot or as main operating system (we do not take any responsibility of something happening to your data or hardware in doing this operation). Other options such as virtual machine or live distro are not as effective as a real install, but they work.<br />
<br />
'''Which editor/IDE should I use for ROS?'''<br />
* We do not suggest any particular editor for ROS, standard text editors such as nano/gedit/sublime + a terminal are enough. Nevertheless, you can use the environment you prefer for C++ development; some students, in the past, have used Eclipse or Clion. You can also check the [http://wiki.ros.org/IDEs list of supported ROS editors] or [https://github.com/tonyrobotics/roboware-studio Roboware], the latter has been designed for ROS, but it does not offer any special feature you will miss using standard C/C++ editors. <br />
<br />
'''As I understand the “homework/project” is a group project. Is this correct and how are the groups formed?'''<br />
* It is not a group project, while it is allowed to do it in groups (up to 3 people). I expect the groups to form naturally in classes. We usually set up a slack group for the project you can organize autonomously. Nevertheless, you can do the project alone as well (but we advise you to do it in groups).<br />
<br />
'''When “Part 1” of the homework/project will start?'''<br />
* Right after we have finished the first block of lectures about ROS. This should happen around Easter plus/minus a week.<br />
<br />
==Past Years Useful Material== <br />
<br />
Here you find material from past editions of the course that you umight find useful in preparing the exam.<br />
<br />
===Past Exams and Sample Questions===<br />
<br />
Since the 2015/2016 Academic Year the course has changed the teacher and this has changed significantly the program and the exam format as well. For this reason we do not have many past exams to share with you, they will accumulate along the years tho.<br />
<br />
* [[Media:20170717.pdf|Exam of 17/07/2017]]<br />
* [[Media:20170701.pdf|Exam of 01/07/2017]]<br />
* [[Media:20160926.pdf|Exam of 26/09/2016]]<br />
* [[Media:20160905.pdf|Exam of 05/09/2016]]<br />
* [[Media:20160720.pdf|Exam of 20/07/2016]]<br />
* [[Media:20160627.pdf|Exam of 27/06/2016]]<br />
<br />
===Past Course Project===<br />
<br />
Here you find past course projects in case you are interested in checking what your colleagues have been pass through before you. In some cases they may have been more lucky in some others you might be the lucky one ... that's life! ;-) <br />
<br />
====Homework 2020/2021====<br />
<br />
Here they are the curse homework projects:<br />
* The first course project has been published on 14/04/2021<br />
** The description of the first ROS Project is [https://polimi365-my.sharepoint.com/:b:/g/personal/10457911_polimi_it/Ees1RgOSL1REiK1iqBS--ZABXEwE1jC3dQdFHTmJPlyK3A?e=ahN4bx HERE]<br />
** The material for the project is [https://polimi365-my.sharepoint.com/:f:/g/personal/10457911_polimi_it/EjJKNz1Lxr9MqW8b5XyIepsBMNrJb7O4oqF6UoHl14758A?e=40GxFe HERE]<br />
** You have to deliver it by 16/05/2021 !!!<br />
* The second course project has been published on 26/05/2021<br />
** The description of the second ROS Project is [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f0a14f56b26445b0929a7465abb9f8b0 HERE]<br />
** The material for the project is [https://drive.google.com/drive/folders/1uMwWmQ50iwrMXTJnpTuJdt5YNmnQkrOV?usp=sharing HERE]<br />
** You have to deliver it by 27/06/2021 !!!<br />
<br />
====Homework 2019/2020====<br />
<br />
Here they are the curse homework projects:<br />
* [https://drive.google.com/drive/folders/1bbkGsgcp7LNQX6F-uVFyqv0W1MBWH3CZ First project] deadline 8th of May 2020.<br />
* [[Media:Robotics_2019_2020_second_project.pdf |Second project presentation]] deadline 5th of July 2020.<br />
<br />
====Homework 2018/2019====<br />
<br />
The 2018/2019 course project is divided in two releases. The homework philosophy should be "You have to struggle, but not too much!". Indeed the homework is made to challenge you and make you exercising and learn by doing, nevertheless if you find yourself stuck please write us and we will give you the required hints to continue and complete ... this includes extending the deadline (for all) or allowing you to use python instead of C++ (for selected students). <br />
<br />
'''''Advice:''''' '''Start as soon as possible doing the homework!''' <br />
<br />
Homework<br />
* [[Media:Robotics_project_2018-2019_1.pdf | 2018/2019 Course Project Part 1]]: due on '''''Wednesday 29/05/2019''''', this is the first part of the 2018/2019 course project. <br />
* [[Media:Robotics_project_2018-2018_2.pdf | 2018/2019 Course Project Part 2]]: due on '''''Monday 08/07/2019''''', this is the second and last part of the 2018/2019 course project.<br />
<br />
====Homework 2016/2017====<br />
<br />
The 2016/2017 course project is divided in two releases to provide you something to work on as early as possible during the course. The homework philosophy should be "You have to struggle, but not too much!". Indeed the homework is made to challenge you and make you exercising and learn by doing, nevertheless if you find yourself stuck please write us and we will give you the required hints to continue and complete. <br />
<br />
'''''Advice:''''' '''Start as soon as possible doing the homework!''' <br />
<br />
Homework<br />
* [[Media:Robotics_project_2016-2017_A02.pdf | 2016/2017 Course Project Part A v1.1]]: due on '''''Wednesday 31/05/2017''''' (6 weeks from now), this is the first part of the 2016/2017 course project. <br />
* [[Media:Robotics_project_2016-2017_B01.pdf | 2016/2017 Course Project Part B v1.0]]: due on '''''Wednesday 28/07/2017''''' (6 weeks from now), this is the second part of the 2016/2017 course project. <br />
* [[Media:willy3_and_hokuyo.tgz| 2016/2017 Model for Course Project part B v1.0]]: thi si the gazebo model to be used in exercise 4 in the second part of 2016/2017 course project.<br />
<!--<br />
Notes on the homework<br />
* There was a small problem in the model provided for the second part of the project. You can fix it by changing a line in `willy3/model.sdf`, i.e., you need to change line `133` from `<publishTf>false</publishTf>` to `<publishTf>true</publishTf>, then everything should work. You can download [[Media:willy3_and_hokuyo_fixed.tgz| the fixed model here!]]<br />
* You might encounter troubles in building the full map with gmapping, thus not to have you shuck on that we provide here the perfect map of the environment in case you want to skip the gmapping part and move on with the navigation one. Needless to say that to have the full mark you have to provide also a map you have generated with gmapping, but you can develop the rest of the exercise on this map and get the score for that. You can download [[Media:willogarage_perfect.tgz| the perfect willowgarage map here!]]<br />
<br />
Some useful fatcs:<br />
* The project can be done in groups of maximum 2 people<br />
* Some data might be missing, some data might be useless, do not hesitate to write us by email! <br />
* We have not decided yet how much each part is worth, we will decide depending on the overall distribution of results in the class to harmonize the overall score and compensate for different level of difficulty among the years.<br />
<br />
Delivery procedure:<br />
* The project should be delivered by email as single compressed file '''''both''''' to Matteo Matteucci && Gianluca Bardaro. <br />
* The archive should contain:<br />
** The gazebo model as a directory with SDF files, when required, and a ROS package with nodes sources and corresponding launch files (put your names in the directories names)<br />
** A max 4 pages idiot proof report describing:<br />
*** The files provided<br />
*** The installation (if any) and compilation instructions<br />
*** Instruction to configure the execution (e.g., parameter setting)<br />
*** The instructions to execute the code and check that all the above has been done successfully<br />
* The evaluation will be performed by following your instructions, if these do not work, we assume the course project does not work (we suggest you to have someone else testing the whole on his/her computer before submitting the project).<br />
<br />
'''''Very important note:''''' read again the delivery procedure!<br />
<br />
'''''Very useul note:''''' students willing to graduate in July, need to register the exam by the 17th of July, which means they have to submit it on the 14th of July to let us evaluate it!<br />
--><br />
<br />
====Homework 2015/2016====<br />
This year project is divided in steps; each of them is worth some points out of the 5/32 points available for the final mark. You find the project description here, it is complete, it contains parts up to 4, parts 5 is optional, but we suggest to do it anyway since it requires a limited amount of time.:<br />
<br />
* [[Media:Robotics_project_2015-2016_1_0.pdf | 2015/2016 Course Project v1.0]]<br />
* [https://www.dropbox.com/s/hri9tuzh3kblzol/Safer_STL.zip?dl=0 2015/2016 Kobra STL files]: in case you want to make your simulation look more real here you find the STL files of the Kobra robot in the "Safer" version. Unfortunately the STL files are scaled down with respect to the real robot, so you have to modify those if you want to use.<br />
<br />
===Additional Resources===<br />
<br />
If you are interested in a more deep treatment of the topics presented by the teachers you can refer to the following books and papers:<br />
<br />
* [http://www.probabilistic-robotics.org/ Probabilistic Robotics] by Dieter Fox, Sebastian Thrun, and Wolfram Burgard.<br />
<br />
The following are links to online sources which might be useful to complement the material above<br />
<br />
* [http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=55890 ISO 8373:2012]: ISO Standard "Robots and robotic devices -- Vocabulary"<br />
* [http://www.ros.org/ ROS]: the Robot Operating System<br />
* [http://gazebosim.org/ Gazebo]: the Gazebo robot simulator<br />
<br />
* [http://airlab.elet.polimi.it/index.php/ROS_HOWTO AIRLab ROS Howto]: a gentle introduction to ROS with node template and program examples</div>Matteohttps://chrome.deib.polimi.it/index.php?title=Robotics&diff=3832Robotics2022-05-11T09:39:48Z<p>Matteo: /* Detailed course schedule */</p>
<hr />
<div>__FORCETOC__<br />
<br />
The following are last-minute news you should be aware of ;-)<br />
* 11/04/2022: Corrected bags and updated slides are now available in the shared folder. New deadline: May 8 2022, 23:59 CEST<br />
* 11/04/2022: All communications regarding the project will be though the shared folder and slack<br />
* 04/04/2022: Hold-on! -> due to a bug in the bags an update of the homework will be available soon <br />
* 30/03/2022: The first homework project of the course is out!<br />
* 06/03/2022: Added link to Paolo Cudrano slides, updated slide first two weeks Matteo Matteucci<br />
* 06/03/2022: Added link to last year's recordings<br />
* 23/02/2022: Detailed calendar published<br />
* 23/02/2022: Lectures start today!<br />
<br />
<!--<br />
* 19/02/2022: results of 02/02/2022 call are [[Media:Grades_20220202.pdf|here]]. They include all HWs grades! <br />
* 31/01/2022: results of 12/01/2022 call are [[Media:Grades_20220112.pdf|here]]. They include all HWs grades! <br />
* 03/10/2021: results of 31/08/2021 call are [[Media:Grades_20210831.pdf|here]]. They include all HWs grades! <br />
* 10/09/2021: results of 31/08/2021 call for Laureandi are [[Media:Grades_20210831_tmp.pdf|here]]. They include all HW1 grades! <br />
* 20/08/2021: results of 26/07/2021 call are [[Media:Grades_20210726.pdf|here]]. They include all HW1 grades! Green grades will be rounded up with ceil.<br />
* 25/07/2021: results of 29/06/2021 call are [[Media:Grades_20210629.pdf|here]]. They include all HW1 grades! Green rows will be rounded up with ceil.<br />
* 20/07/2021: results of 29/06/2021 call are [[Media:Grades_20210629_tmp2.pdf|here]] ... they do not include all HW1 grades!<br />
* 09/07/2021: results of 29/06/2021 call for graduating students are [[Media:Grades_20210629_tmp.pdf|here]]<br />
* 08/06/2021: all lecture videos are now published and slides pdf updated.<br />
* 26/05/2021: The link to the form to request an instance of remote examination for June and July is [https://forms.office.com/r/U4hkkaiq8h here!]<br />
* 26/05/2021: Revised final schedule of the course, last lecture will be on 31/05/2021<br />
* The second robotics project is out!<br />
* 21/04/2021: You can join the course [https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZmE0NTExYWQtNjFhMi00ZjE3LTg2ZTktOTQ5MDRjZjU1ZTk5%40thread.v2/0?context=%7b%22Tid%22%3a%220a17712b-6df3-425d-808e-309df28a5eeb%22%2c%22Oid%22%3a%22335b7274-e5d4-455b-aff1-ddd0f4ef5598%22%7d MS Team here]<br />
* 14/04/2021: The first homework project is out! Check it [https://chrome.deib.polimi.it/index.php?title=Robotics#Course_Projects here]<br />
* 09/04/2021: Lab sessions will be back to presence from 20/04/2021 on (check the detailed schedule)<br />
* 09/04/2021: Added a new lecture on 21/04/2021 to recover the one missed two weeks ago<br />
* 30/03/2021: Today's lab webex room is Simone Mentasti one<br />
* 25/03/2021: Added link to the last lab video and some references about C++ <br />
* 24/03/2021: This morning lecture is canceled (afternoon lab will happen as usual)<br />
* 06/03/2021: Updated video from the lab and the lectures<br />
* 05/03/2021: Added link to USB stick linux distribution [https://chrome.deib.polimi.it/index.php?title=Robotics#Useful_stuff_from_the_web here]!!!<br />
* 05/03/2021: From today until new communication lectures and labs will be online in the professor webex room<br />
* 03/03/2021: Today's lab webex room is Simone Mentasti one (for presence no change, is the normal class)<br />
* 24/02/2021: Lecture videos and slides published <br />
* 24/02/2021: Lectures start today!<br />
--><br />
<!--<br />
* 05/10/2020: Final [[Media:Grades_20200908_hws_final.pdf|grades]] from the 08/09/2020 call <br />
* 18/07/2020: Final [[Media:Grades_20200617_hws_final.pdf|grades]] from the 17/06/2020 call <br />
* 10/07/2020: Second [[Media:Grades_20200617_hws.pdf|homework and urgent grades]] from the 17/06/2020 call <br />
* 12/06/2020: Exam rehearsal [https://polimi-it.zoom.us/j/89319381617?pwd=bE9BYi91bHRBZ2JJTTR4Qm1YaFhJQT09 zoom room] and [https://forms.office.com/Pages/ResponsePage.aspx?id=K3EXCvNtXUKAjjCd8ope6ztteKg6OERCsstxb4n43e9UMjQyRkVKQktJQzBGQ1pHQURGQTFCRU0wRy4u form to be filled] <br />
* 03/06/2020: First homework results are [[Media:Grades_2020_HW1.pdf|here]] ;-)<br />
* 24/05/2020: Updates on the material about navigation: new slides include also planning but it is not part of this year program<br />
* 24/05/2020: Link to a blog post and a paper about EKF-SLAM<br />
* 24/05/2020: Updates on the schedule, with links to videos and one additional class<br />
* 02/05/2020: Updated full course schedule<br />
* 18/04/2020: Updated videos about ROS and published first project material!!!<br />
* 04/04/2020: Updated slides about Robot Odometry with fixes<br />
* 04/04/2020: Fixed schedule, added skid-steering paper, added fixed version of kinematics slides [2019/2020]<br />
* 22/03/2020: Added link to Simone Mentasti online slides repository<br />
* 10/03/2020: Change in the detailed schedule to anticipate the ROS labs and add 2 days which I originally forgot :-)<br />
* 06/03/2020: Added FAQ section, the video of last lecture, and a "youtube" section in the teaching material<br />
* 05/03/2020: Need to log in Polimi Office 365 web-mail to access the video <br />
* 05/03/2020: Added link to the video of the lecture<br />
* 04/03/2020: The course starts today!<br />
* 03/03/2020: Under Update! Tomorrow we start the new course edition!<br />
--><br />
<br />
<!--<br />
The following are last minute news you should be aware of ;-)<br />
23/02/2020: [[Media:Grades_20200212.pdf|Here]] you find the scores for the 12/02/2020 exam call, they include also the homeworks<br />
08/02/2020: [[Media:Grades_20200122.pdf|Here]] you find the scores for the 22/01/2020 exam call, they include also the homeworks<br />
28/08/2019: [[Media:Grades_20190910.pdf|Here]] you find the scores for the 10/09/2019 exam call, they include also the homeworks<br />
28/08/2019: [[Media:Grades_20190724.pdf|Here]] you find the scores for the 24/07/2019 exam call, they include also the homeworks<br />
21/07/2019: [[Media:Grades_20190703.pdf|Here]] you find the scores for the 03/07/2019 exam call, they include also the homeworks<br />
25/06/2019: Deadline extension!!! Second part of the project is due by July the 8th at 23:59!!! <br />
28/05/2019: Schedule update with additional lecture<br />
12/05/2019: Project slide uploaded!!!<br />
11/05/2019: Change in the detailed schedule for Wednesday 15/05/2019 and Monday 27/5/2019 <br />
07/04/2019: Updated version on slides about robot localization<br />
27/03/2019: Uploaded first version of slides on robot localization<br />
10/03/2019: Uploaded slides on mobile robot odometry<br />
05/03/2019: Swap on lecture scheduling 27/03 and 29/04<br />
26/02/2019: Course slides updated<br />
25/02/2019: Here it comes a new edition of the course!<br />
01/10/2018: [[Media:Grades_20180911.pdf|Here]] you find the scores for the third exam calls, they include also the second homework<br />
30/07/2018: [[Media:Grades_20180713.pdf|Here]] you find the scores for the first and second exam calls, they include also the second homework<br />
12/07/2018: [[Media:Grades_20180628_tmp.pdf|Here]] you find the scores for the first exam call, they do not include the second homework yet<br />
01/06/2018: [[Media:Homework_20180601.pdf|Here]] you find the scores for the first homework ... on Monday you will get the second (and last) one<br />
23/05/2018: Updated schedule<br />
23/05/2018: Updated slides on SLAM<br />
17/04/2018: Updated schedule until the end of the semester<br />
25/03/2018: Updated 2017/2018 academic year for lectures and exercises <br />
11/03/2018: You can find here the [[Media:Grades_2018-02_20.pdf|grades of the 20/02/2018 call]] including the project grades <br />
28/02/2018: Update detailed schedule.<br />
26/02/2018: Course starts today!<br />
--><!--<br />
02/10/2017: you can find here the [[Media:Grades_20170904_1.pdf|grades of the 04/09/2017 call]] including the project grades (colors do not have any meaning).<br />
12/09/2017: you can find here the [[Media:Grades_20170904.pdf|grades of the 04/09/2017 call]] for LAUREANDI including the project grades (except one).<br />
12/09/2017: the final grades of the [[Media:Grades_20170717_2.pdf|17/07/2017 call]] including the project grades are out.<br />
22/08/2017: you can find here the [[Media:Grades_20170717.pdf|grades of the 17/07/2017 call]]. Projects not included.<br />
20/08/2017: the final grades of the [[Media:Grades_20170701_3.pdf|01/07/2017 call]] with the projects are out ... the following call will come shortly <br />
25/07/2017: the deadline to deliver the second part of the homework project has been moved to Monday 07/08/2017<br />
15/07/2017: you can find here the [[Media:Grades_20170701_2.pdf|grades of the 01/07/2017 call]] with the projects for the laurandi students included. <br />
11/07/2017: you can find here the [[Media:Grades_20170701.pdf|grades of the 01/07/2017 call]]. Projects not included. <br />
11/07/2017: Update on Homework project<br />
12/06/2017: Second part of the project published<br />
05/06/2017: Sent confirmation email to students who have submitted the first part of the project <br />
12/05/2017: "Project clinic" details published in the schedule<br />
10/05/2017: Two dates for the "Project clinic" are planned please stay tuned for details<br />
08/05/2017: Change in the course Schedule ... check the updates!<br />
18/04/2017: Fixed link in the Homework Part A assignment.<br />
15/04/2017: The Homework Part A is out!!<br />
15/04/2017: Uploaded slides from Bardaro about ROS<br />
06/03/2017: Lectures start today!!<br />
--><br />
<!--<br />
07/10/2016: published [[Media:Grades_20160926.pdf|results of the 26/09/2016 call including projects]]<br />
12/09/2016: published [[Media:Grades_20160905.pdf|results of the 05/09/2016 call]]. '''Yellow projects still to be graded thus the final mark does not include those yet!'''<br />
09/09/2016: published [[Media:Grades_20160627_20160720.pdf|results of the first and second call including projects]]<br />
25/08/2016: published [[Media:Grades_20160720.pdf|results of the second call of the exam]], as well al [[Media:20160720.pdf|the text of the exam]] itself<br />
15/07/2016: the deadline for delivering the course project has been extendend until the end of August 2016.<br />
15/07/2016: published [[Media:Grades_20160627.pdf|results of the first call of the exam]], as well al [[Media:20160627.pdf|the text of the exam]] itself<br />
23/06/2016: Published the slides also in ppsx format<br />
15/06/2016: Published the updated and final version of the project description<br />
13/06/2016: Deadline for the course project is July, fixed on the course webpage<br />
23/05/2016: Course schedule change on 24-25/5 and 8-9/6<br />
16/05/2016: Some updates on the detailed course schedule ...<br />
12/05/2016: Published course project description v0.9<br />
04/05/2016: Published slides about SLAM with Laser and SLAM<br />
04/05/2016: Published slides about ROS robot architecture for navigation and code examples<br />
14/04/2016: Change in course detailed schedule: no lecture on 27/04/2016 and swap of teachers between 20/04 and 28/04<br />
14/04/2016: Published slides about Kinematics and Motion Control (draft) by Matteucci<br />
13/04/2016: Published slides about Middlewares and ROS by Bardaro<br />
19/03/2016: Published slides about Sensors, Actuators (Matteucci) and Gazebosim (Bardaro)<br />
09/03/2016: Change in course timetable, lectures start at 14:00 (sharp!) and end at 15:30 (roughly)<br />
09/03/2016: Lectures start today!!<br />
--><br />
<br />
==Course Aim & Organization==<br />
<br />
This course will introduce basic concepts and techniques used within the field of autonomous mobile robotics. We analyze the fundamental challenges for autonomous intelligent systems when these move on wheels or legs and present the state of the art solutions currently employed in mobile robots and autonomous vehicles with a focus on autonomous navigation, perception, localization, and mapping.<br />
<br />
===Teachers===<br />
<br />
The course is composed by a blending of lectures and exercises by the course teacher and a teaching assistant.<br />
<br />
* [https://www.deib.polimi.it/ita/personale/dettagli/267262 Matteo Matteucci]: the course teacher and this is his [HTTP://politecnicomilano.webex.com/join/matteo.matteucci webex room]<br />
* [https://www.deib.polimi.it/eng/people/details/1304888 Simone Mentasti]: the teaching assistant and this is his [HTTP://politecnicomilano.webex.com/join/simone.mentasti webex room]<br />
* [https://www.deib.polimi.it/ita/personale/dettagli/974764 Paolo Cudrano]: the teaching assistant and this is his [HTTP://politecnicomilano.webex.com/join/paolo.cudrano webex room]<br />
<br />
===Course Program===<br />
<br />
Lectures will provide theoretical background and real-world examples. Lectures will be complemented with practical software exercises in simulation and on real data for all the proposed topics and the students will be guided in developing the algorithms to control an autonomous robot.<br />
<br />
Among other topics, we will discuss:<br />
* Mobile robots kinematics,<br />
* Sensors and perception,<br />
* Robot localization and map building,<br />
* Simultaneous Localization and Mapping (SLAM),<br />
* Path planning and collision avoidance.<br />
<br />
===Detailed course schedule===<br />
<br />
A detailed schedule of the course can be found here; topics are just indicative while days and teachers are correct up to some last minute change (I will notify you by email). Please note that not all days we have lectures!!<br />
<br />
Note: Lecture timetable interpretation<br />
* On Wednesday, in 26.11, starts at 12:15, ends at 14:15<br />
* On Thursday, in 26.11, starts at 14:50, ends at 16:15<br />
<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic <br />
|-<br />
|23/02/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Course/Robotics Intro<br />
|-<br />
|24/02/2022 || Thursday || 14:15 - 16:15 || 26.11 || Matteo Matteucci || Lecture || Actuators<br />
|-<br />
|02/03/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Sensors<br />
|-<br />
|03/03/2022 || Thursday || 14:15 - 16:15 || 26.11 || Paolo Cudrano || Laboratory || ROS Install<br />
|-<br />
|09/03/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Sensors<br />
|-<br />
|10/03/2022 || Thursday || 14:15 - 16:15 || 26.11 || Paolo Cudrano || Laboratory || ROS Basics<br />
|-<br />
|16/03/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Kinematics<br />
|-<br />
|17/03/2022 || Thursday || 14:15 - 16:15 || 26.11 || Paolo Cudrano || Laboratory || Pub / Sub<br />
|-<br />
|23/03/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Kinematics<br />
|-<br />
|24/03/2022 || Thursday || 14:15 - 16:15 || 26.11 || Paolo Cudrano || Laboratory || Services and Params<br />
|-<br />
|30/03/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Localization and Lidars <br />
|-<br />
|31/03/2022 || Thursday || 14:15 - 16:15 || 26.11 || Paolo Cudrano || Laboratory || TF / Rviz / Actions <br />
|-<br />
|06/04/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Localization and Bayes Filters<br />
|-<br />
|07/04/2022 || Thursday || 14:15 - 16:15 || 26.11 || Matteo Matteucci || Lecture || Localization and Kalman Filters<br />
|-<br />
|13/04/2022 || Wednesday || --- || --- || --- || --- || --- Prove in itinere ---<br />
|-<br />
|14/04/2022 || Thursday || 14:15 - 16:15 || 26.11 || Matteo Matteucci || Lecture || Localization and Kalman Filters<br />
|-<br />
|20/04/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Localization and Kalman Filters<br />
|-<br />
|21/04/2022 || Thursday || 14:15 - 16:15 || 26.11 || Simone Mentasti || Laboratory || Message filters / rospy<br />
|-<br />
|27/04/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Localization and Kalman Filters<br />
|-<br />
|28/04/2022 || Thursday || --- || --- || --- || --- || --- Lauree ---<br />
|-<br />
|04/05/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Mapping and SLAM<br />
|-<br />
|05/05/2022 || Thursday || 14:15 - 16:15 || 26.11 || Simone Mentasti || Laboratory || ROS on multiple devices<br />
|-<br />
|11/05/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Mapping and SLAM<br />
|-<br />
|12/05/2022 || Thursday || 14:15 - 16:15 || 26.11 || Matteo Matteucci || Lecture || Algorithms for Robot Navigation<br />
|-<br />
|18/05/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Simone Mentasti || Laboratory || <br />
|-<br />
|19/05/2022 || Thursday || 14:15 - 16:15 || 26.11 || Simone Mentasti || Laboratory || <br />
|-<br />
|25/05/2022 || Wednesday ||--- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|26/05/2022 || Thursday || 14:15 - 16:15 || 26.11 || Simone Mentasti || Laboratory || <br />
|-<br />
|01/06/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Algorithms for Robot Navigation<br />
|-<br />
|02/06/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|08/06/2022 || Wednesday || 12:15 - 14:15 || 26.11 || Matteo Matteucci || Lecture || Algorithms for Robot Navigation<br />
|}<br />
<br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic <br />
|-<br />
|24/02/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=e953e0e29b744f0fa604c2c401cb40b6 Course logistics] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=2068c40227aa4091a5483bb3c57af5e1 Introduction to Robotics]<br />
|-<br />
|24/02/2021 || Wednesday || 14:15 - 16:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|02/03/2021 || Tuesday || 17:15 - 19:15 || 3.0.2 (EX S.0.5) || Paolo Cudrano || ROS Team 1 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d260c9fb0aeb4963bfb3aa7be89a1632 Introduction to middleware in Robotics]<br />
|-<br />
|03/03/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=e74e003ef5664d849f848ff3831dd7e6 Sensors and Actuators]<br />
|-<br />
|03/03/2021 || Wednesday || 14:15 - 16:15 || 25.2.2 (EX D.3.2) || Simone Mentasti || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=3196f800c2be49b88f858ca6fd96b117 Introduction to middleware in Robotics]<br />
|-<br />
|09/03/2021 || Tuesday || 17:15 - 19:15 || Online on webex || Paolo Cudrano || ROS Team 1 || ROS Basics (see next for recoding)<br />
|-<br />
|10/03/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=30df56c53c6a4ac199dafff310f1f222 Robot Sensors] and [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4dbee67823f8417f8e3784248c4712db Intro to SLAM]<br />
|-<br />
|10/03/2021 || Wednesday || 14:15 - 16:15 || Online on webex || Paolo Cudrano || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=86c7caa885764429aff9777ed5cfa322 ROS Basics]<br />
|-<br />
|16/03/2021 || Tuesday || 17:15 - 19:15 || Online on webex || Paolo Cudrano || ROS Team 1 || Publishers and Subscribers (see next for recording)<br />
|-<br />
|17/03/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d85a41c9c6404ccab84b725f902c99eb Robot Kinematics (Differential Drive)]<br />
|-<br />
|17/03/2021 || Wednesday || 14:15 - 16:15 || Online on webex || Paolo Cudrano || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=41a263d5283e4c5d8a16840a1277512b Publishers and Subscribers]<br />
|-<br />
|23/03/2021 || Tuesday || 17:15 - 19:15 || Online on webex|| Paolo Cudrano || ROS Team 1 || Services and Parameters (see next for recording)<br />
|-<br />
|<s>24/03/2021</s> || <s>Wednesday</s> || <s>10:15 - 13:15</s> || <s>Online on webex</s> || <s>Matteo Matteucci</s> || <s>Lecture</s> || <s>Robot Kinematics </s><br />
|-<br />
|24/03/2021 || Wednesday || 14:15 - 16:15 || Online on webex || Paolo Cudrano || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=3e67b96db3bb4001a3a8af5b5b12f435 Services and Parameters]<br />
|-<br />
|30/03/2021 || Tuesday || 17:15 - 19:15 || Online on webex|| Simone Mentasti || ROS Team 1 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=b9eb5355185b49c4955ad3515f0e2b7f TF, RVIZ (Mentasti recording)]<br />
|-<br />
|31/03/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=a323ca89bbbb4fd7b30fb68b1037c10c Robot Kinematics (Continued)]<br />
|-<br />
|31/03/2021 || Wednesday || 14:15 - 16:15 || Online on webex || Paolo Cudrano || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=aabb359b39a44780adc917fa1a86ebb1 TF, RVIZ (Cudrano recording)]<br />
|-<br />
|06/04/2021 || Tuesday || 17:15 - 19:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|07/04/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ddc9aed131194c568131dd7e5c0875b3 Localization and LiDARS]<br />
|-<br />
|07/04/2021 || Wednesday || 14:15 - 16:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|13/04/2021 || Tuesday || 17:15 - 19:15 ||Online on webex|| Paolo Cudrano || ROS Team 1 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=e08a2c0739214339bf2ce4fb13dbb098 Bags, Message filters and rospy] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fe8dba62b550480d8ab6254f2e5bc8f5 Project 1 Presentation]<br />
|-<br />
|14/04/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=53269a220d2a4b5b885c36bcc1984116 Localization and Bayes filters]<br />
|-<br />
|14/04/2021 || Wednesday || 14:15 - 16:15 || Online on webex || Paolo Cudrano || ROS Team 2 || Bags, Message filters and rospy (see previous for recording)<br />
|-<br />
|20/04/2021 || Tuesday || 17:15 - 19:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|21/04/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fdb9155b23794cc6aac379e0cc2c0bf6 Localization with Kalman filters and Particle filters]<br />
|-<br />
|21/04/2021 || Wednesday || 14:15 - 16:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|27/04/2021 || Tuesday || 17:15 - 19:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|28/04/2021 || Wednesday || 10:15 - 13:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|28/04/2021 || Wednesday || 14:15 - 16:15 || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|04/05/2021 || Tuesday || 17:15 - 19:15 || 3.0.2 (EX S.0.5) || Simone Mentasti || ROS Team 1 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7f075850e538498aa019575cdcab9eb2 ROS on Multiple Devices]<br />
|-<br />
|05/05/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=486985ca26b04cb0962143a7a58491b6 Mapping and SLAM]<br />
|-<br />
|05/05/2021 || Wednesday || 14:15 - 16:15 || 25.2.2 (EX D.3.2) || Simone Mentasti || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=138182322e7a4a799e162e4c49b39a66 ROS on Multiple Devices]<br />
|-<br />
|11/05/2021 || Tuesday || 17:15 - 19:15 || 3.0.2 (EX S.0.5) || Simone Mentasti || ROS Team 1 || Robot Navigation<br />
|-<br />
|12/05/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=3aaa118d78b74c67b0398bf9cf5bf2e1 Robot Motion Control]<br />
|-<br />
|12/05/2021 || Wednesday || 14:15 - 16:15 || 25.2.2 (EX D.3.2) || Simone Mentasti || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=39ba34fc6ae649f0b308fa5630451297 Robot Navigation]<br />
|-<br />
|18/05/2021 || Tuesday || 17:15 - 19:15 || 3.0.2 (EX S.0.5) || Simone Mentasti || ROS Team 1 || Robot Navigation (see next)<br />
|-<br />
|<s>19/05/2021</s>||<s>Wednesday</s>||<s>10:15 - 13:15</s>||<s>Online on webex</s>||<s>Matteo Matteucci</s>||<s>Lecture</s>||<s>Algorithms for Robot Navigation</s><br />
|-<br />
|19/05/2021 || Wednesday || 14:15 - 16:15 || 25.2.2 (EX D.3.2) || Simone Mentasti || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=30436cc0892841c0adffd24cce00c467 Robot Navigation]<br />
|-<br />
|25/05/2021 || Tuesday || 17:15 - 19:15 || 3.0.2 (EX S.0.5) || Simone Mentasti || ROS Team 1 || IMU Tools and robot localization (see next)<br />
|-<br />
|26/05/2021 || Wednesday || 10:15 - 13:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=da607a0ea8ee42508eeb276224ed2f54 Search-based Planning]<br />
|-<br />
|26/05/2021 || Wednesday || 14:15 - 16:15 || 25.2.2 (EX D.3.2) || Simone Mentasti || ROS Team 2 || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=a5e18e1b729a48c4a373873e0d3ea96d IMU Tools and robot localization] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f0a14f56b26445b0929a7465abb9f8b0 Project Presentation] + [https://drive.google.com/drive/folders/1uMwWmQ50iwrMXTJnpTuJdt5YNmnQkrOV?usp=sharing Project folder]<br />
|-<br />
|31/05/2021 || Monday || 13:15 - 16:15 || Online on webex || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6fdba09c98844f5eb26b63c39f0cd997 Sampling-based Planning]<br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic <br />
|-<br />
|04/03/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/0f7f27ac-4930-44d4-8d1c-638855a7d04b Course Logistics] and [https://web.microsoftstream.com/video/b00b4347-5e11-4e13-bbfd-404e89c73b28 Introduction to Robotics] <br />
|-<br />
|05/03/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/c3abc791-942e-44af-9f70-c9c81e0815f0 Intro to Robot Actuators and DC Motors]<br />
|-<br />
|11/03/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/7c980e36-9bcc-4462-a79a-ebfbd3967c7b More on Motors and Intro to Robot Sensors]<br />
|-<br />
|12/03/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/89e90ef3-9588-433f-bacd-f93fe6cfb492 Robot Sensors (continued)]<br />
|-<br />
|18/03/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/2a1bb9d7-99f0-40b1-9cf0-c832cdf73e2c Middleware for robotics and ROS Installation Party]<br />
|-<br />
|19/03/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/cedd53c0-24e5-4071-9a4c-de01b7e59d0d Ros workspace, Publisher/subscriber, launch file]<br />
|-<br />
|25/03/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/712641c5-ac98-4596-93db-0fb7b5aff41c Introduction to Localization and Robot Kinematics]<br />
|-<br />
|26/03/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/3da222dc-ecd9-4e09-9452-d20d606dfa23 Differential Drive Robot Kinematics and Odometry]<br />
|-<br />
|01/04/2020 || Wenesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/ccc5ae01-48e1-489d-8f2c-b71a1a1e9cb4 Skid-Steering and Omnidrectional Robot Kinematics and Odometry]<br />
|-2<br />
|02/04/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/03ff3d93-8bdc-49d1-b9fd-3b3242bfa695 Ackerman like Robot Kinematics and Odometry] <br />
|-<br />
|08/04/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || ROS ||Simone Mentasti || [https://web.microsoftstream.com/video/9c83039d-32e5-4396-889e-259eeb80f6a1 Publisher, subscriber, launch file , custom messages]<br />
|-<br />
|09/04/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/5d2c2cf1-1369-46a8-83ad-a7c4dac24f98 Services, parameters],[https://web.microsoftstream.com/video/7e937b7a-15ac-4a3c-91fa-db16beedf7ef parameters (continued), timers, node architecture]<br />
|-<br />
|15/04/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || ROS ||Simone Mentasti || [https://web.microsoftstream.com/video/d454b7b3-382d-4b96-b082-d7c77bbe11ef TF, Rviz, Actionlib]<br />
|-<br />
|16/04/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/8ee81454-b420-4d53-ab11-b847d0ee9c46 Message filter, rospy]<br />
|-<br />
|16/04/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/a02ba753-bbcc-4f9d-84c1-b8d756b94425 Project presentation]<br />
|-<br />
|22/04/2020 || Wenesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/b2d048b9-a93d-4fc7-b24b-1185ae16d9d3 Introduction to Robot Localization and LIDAR sensor modeling]<br />
|-<br />
|23/04/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/6c43fe49-74ed-4111-a2c3-fe67bb6a94dd Robot Localization and Bayes Filters (discrete)]<br />
|-<br />
|29/04/2020 || Wednesday || 14:15 - 16:15 || Teams Virtual Room || --- || --- || -- No lectures (Lauree) --<br />
|-<br />
|30/04/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/df9ace9e-286d-4d7d-98dd-1218ef873a62 Robot Localization with (Extended) Kalman Filters]<br />
|-<br />
|06/05/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci|| [https://web.microsoftstream.com/video/8dcaf0c6-0508-415e-991a-322c91cc9410 Robot Localization with Particle Filters]<br />
|-<br />
|07/05/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci|| [https://web.microsoftstream.com/video/13d8a902-697a-4a21-8b0e-182595b62198 Robot Mapping]<br />
|-<br />
|13/05/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/a35eb86f-faf4-4849-b075-6c766fe35e15 Simultaneous Localization and Mapping]<br />
|-<br />
|14/05/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/2ee901d0-d883-477d-bcf3-9f7c93f3ab19 Simultaneous Localization and Mapping]<br />
|-<br />
|20/05/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/10b205f8-75d9-4010-ade7-f42c0e7f8afe Robot Navigation Algorithms]<br />
|-<br />
|21/05/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || Lecture || Matteo Matteucci || [https://web.microsoftstream.com/video/e798be4d-f6a3-40bd-a657-3141cc5a5342 Robot Navigation Algorithms]<br />
|-<br />
|27/05/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/f77b9fa4-3582-495c-b9d3-4a145ec2d53f ROS on multiple devices, Actionlib]<br />
|-<br />
|28/05/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/ffb64e1b-defa-43dc-8e61-c3394fb472ec Robot Navigation (Introduction)] <br />
|-<br />
|03/06/2020 || Wednesday || 12:15 - 14:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/ca22b7e3-a71d-4dbe-a344-4979a3198e8b Robot simulators] and [https://web.microsoftstream.com/video/36cb2045-2e24-4b84-8773-d5c171ecf4ed Robot Navigation (Examples)]<br />
|-<br />
|04/06/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/d285b29c-df90-44d1-9df6-8ceb375654cd IMU Tools, Robot Localization]<br />
|-<br />
|04/06/2020 || Thursday || 14:15 - 16:15 || Teams Virtual Room || ROS || Simone Mentasti || [https://web.microsoftstream.com/video/e7e8bbbc-0387-4920-bf10-feeb29ab6c81 Second project presentation] with [[Media:Robotics_2019_2020_second_project.pdf |slides]]<br />
|-<br />
|12/06/2020 || Friday || 16:30 - 18:30 || Zoom Virtual Room || Lecture || Matteo Matteucci || Q&A + Exam Rehearsal <br />
|}<br />
--><br />
<!--|-<br />
|13/05/2020 || Wednesday || 12:15 - 14:15 || 5.1.1 || Lecture || Matteo Matteucci || Simultaneous Localization and Mapping<br />
|-<br />
|14/05/2020 || Thursday || 14:15 - 16:15 || 6.0.1 || Lecture || Matteo Matteucci || Simultaneous Localization and Mapping<br />
|-<br />
|20/05/2020 || Wednesday || 12:15 - 14:15 || 5.1.1 || Lecture || Matteo Matteucci || Robot Navigation Algorithms<br />
|-<br />
|21/05/2020 || Thursday || 14:15 - 16:15 || 6.0.1 || Lecture || Matteo Matteucci || Robot Navigation Algorithms<br />
|-<br />
|27/05/2020 || Wednesday || 12:15 - 14:15 || 5.1.1 || ROS || Simone Mentasti || Message filters, rospy. First project presentation<br />
|-<br />
|28/05/2020 || Thursday || 14:15 - 16:15 || 6.0.1 || ROS || Simone Mentasti || ROS on multiple machines, time syncronization, stage<br />
|-<br />
|03/06/2020 || Wednesday || 12:15 - 14:15 || 5.1.1 || ROS || Simone Mentasti || Robot Navigation (Part I)<br />
|-<br />
|04/06/2020 || Thursday || 14:15 - 16:15 || 6.0.1 || ROS || Simone Mentasti || Robot Navigation (Part II)<br />
|-<br />
| -- || -- || -- || -- || -- || -- || --<br />
|-<br />
| -- || -- || -- || -- || -- || -- || -- <br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Topic<br />
|-<br />
|25/02/2018 || Monday || 16:15 - 18:15 || 5.0.1 || Matteo Matteucci || Course Introduction<br />
|-<br />
|27/02/2018 || Wednesday || 12:15 - 14:15 || 5.03 || Matteo Matteucci || Robot Sensors and Actuators<br />
|-<br />
|04/03/2018 || Monday || 16:15 - 18:15 || 5.0.1 || Matteo Matteucci || -- No Lecture --<br />
|-<br />
|06/03/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Matteo Matteucci || Robot Sensors and Actuators<br />
|-<br />
|12/03/2018 || Monday || 16:15 - 18:15 || D1.2 || Simone Mentasti || Gazebosim and SDF<br />
|-<br />
|14/03/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Simone Mentasti || Differential Robot in Gazebo<br />
|-<br />
|19/03/2018 || Monday || 16:15 - 18:15 || D1.2 || Simone Mentasti || Sensors and Actuators in Gazebo<br />
|-<br />
|21/03/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Simone Mentasti || Middleware for robotics<br />
|-<br />
|26/03/2018 || Monday || 16:15 - 18:15 || D1.2 || Matteo Matteucci|| Robot Sensors and Actuators<br />
|-<br />
|28/03/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Matteo Matteucci|| Robot Kinematics<br />
|-<br />
|02/04/2018 || Monday || 16:15 - 18:15 || ... || ...|| -- No Lecture --<br />
|-<br />
|04/04/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Matteo Matteucci|| Robot Kinematics<br />
|-<br />
|09/04/2018 || Monday || 16:15 - 18:15 || D1.2 || Matteo Matteucci|| Robot Navigation Algorithms<br />
|-<br />
|11/04/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Matteo Matteucci|| Robot Navigation Algorithms<br />
|-<br />
|16/04/2018 || Monday || 16:15 - 18:15 || D1.2 || Simone Mentasti|| Introduction to ROS<br />
|-<br />
|18/04/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Simone Mentasti|| ROS Programming<br />
|-<br />
|23/04/2018 || Monday || 16:15 - 18:15 || D1.2 || Simone Mentasti|| Integration between ROS and Gazebo<br />
|-<br />
|25/04/2018 || Wednesday || 12:15 - 14:15 || D1.2 || -- || -- No Lecture --<br />
|-<br />
|30/04/2018 || Monday || 16:15 - 18:15 || D1.2 || -- || -- No Lecture --<br />
|-<br />
|02/05/2018 || Wednesday || 12:15 - 14:15 || D1.2 || -- || -- No Lecture --<br />
|-<br />
|07/05/2018 || Monday || 16:15 - 18:15 || D1.2 || Matteo Matteucci || Robot Navigation Algorithms<br />
|-<br />
|09/05/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Simone Mentasti || Advanced ROS Topics<br />
|-<br />
|14/05/2018 || Monday || 16:15 - 18:15 || D1.2 || Matteo Matteucci || Robot Localization and Mapping<br />
|-<br />
|16/05/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Matteo Matteucci || Robot Localization and Mapping<br />
|-<br />
|21/05/2018 || Monday || 16:15 - 18:15 || D1.2 || Matteo Matteucci || Robot Localization and Mapping<br />
|-<br />
|23/05/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Matteo Matteucci || Robot Localization and Mapping<br />
|-<br />
|28/05/2018 || Monday || 16:15 - 18:15 || D1.2 || Matteo Matteucci || Robot Localization and Mapping<br />
|-<br />
|30/05/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Matteo Matteucci || Robot Localization and Mapping<br />
|-<br />
|04/06/2018 || Monday || 16:15 - 18:15 || D1.2 || Simone Mentasti || ROS Movebase Package<br />
|-<br />
|06/06/2018 || Wednesday || 12:15 - 14:15 || D1.2 || Simone Mentasti || ROS Movebase Package<br />
|-<br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Topic<br />
|-<br />
|06/03/2016 || Monday || 16:15 - 18:15 || T.1.1 || Matteo Matteucci || Course Introduction<br />
|-<br />
|08/03/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Matteo Matteucci || Robot Kinematics<br />
|-<br />
|13/03/2016 || Monday || 16:15 - 18:15 || T.1.1 || Matteo Matteucci || Robot Kinematics<br />
|-<br />
|15/03/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Gianluca Bardaro || Gazebosim and URDF<br />
|-<br />
|20/03/2016 || Monday || 16:15 - 18:15 || T.1.1 || Gianluca Bardaro || Differential drive in Gazebo<br />
|-<br />
|22/03/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Gianluca Bardaro || Middleware for robotics<br />
|-<br />
|27/03/2016 || Monday || 16:15 - 18:15 || T.1.1 || Gianluca Bardaro || A gentle introduction to ROS<br />
|-<br />
|29/03/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Gianluca Bardaro || Differential drive control in ROS<br />
|-<br />
|03/04/2016 || Monday || 16:15 - 18:15 || T.1.1 || Matteo Matteucci || Robot Kinematics<br />
|-<br />
|05/04/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Matteo Matteucci || Robot Kinematics<br />
|-<br />
|10/04/2016 || Monday || 16:15 - 18:15 || T.1.1 || Matteo Matteucci || Sensors and Actuators<br />
|-<br />
|12/04/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Matteo Matteucci || Sensors and Actuators<br />
|-<br />
|17/04/2016 || Monday || 16:15 - 18:15 || - || - || No Lecture<br />
|-<br />
|19/04/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Matteo Matteucci || Robot navigation algorithms<br />
|-<br />
|24/04/2016 || Monday || 16:15 - 18:15 || - || - || No Lecture<br />
|-<br />
|26/04/2016 || Wednesday || 12:15 - 14:15 || - || - || No Lecture (suspension)<br />
|-<br />
|01/05/2016 || Monday || 16:15 - 18:15 || - || - || No Lecture<br />
|-<br />
|03/05/2016 || Wednesday || 12:15 - 14:15 || - || - || No Lecture (suspension)<br />
|-<br />
|08/05/2016 || Monday || 16:15 - 18:15 || T.1.1- || Matteo Matteucci || Robot navigation algorithms<br />
|-<br />
|10/05/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Matteo Matteucci || Trajectory planning<br />
|-<br />
|15/05/2016 || Monday || 16:15 - 18:15 || - || - || No Lecture<br />
|-<br />
|17/05/2016 || Wednesday || 12:15 - 14:15 || - || - || No Lecture<br />
|-<br />
|22/05/2016 || Monday || 16:15 - 18:15 || T.1.1 || Gianluca Bardaro || Trajectory planning and navigation in ROS<br />
|-<br />
|24/05/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Gianluca Bardaro || ROS tf + actionlib<br />
|-<br />
|25/05/2016 || Thursday || 10:00 - 12:00 || PT1 (DEIB) || Gianluca Bardaro || "Project clinic"<br />
|-<br />
|29/05/2016 || Monday || 16:15 - 18:15 || T.1.1 || Gianluca Bardaro || ROS Navigation with movebase<br />
|-<br />
|30/05/2016 || Tuesday || 10:00 - 12:00 || PT1 (DEIB) || Gianluca Bardaro || "Project clinic"<br />
|-<br />
|31/05/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Gianluca Bardaro || Ros Navigation with movebase (continued)<br />
|-<br />
|05/06/2016 || Monday || 16:15 - 18:15 || T.1.1 || Matteo Matteucci || Introduction to probability and Simultaneous Localization and Mapping (SLAM)<br />
|-<br />
|07/06/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Matteo Matteucci || Occupancy grids and Laser sensor model<br />
|-<br />
|12/06/2016 || Monday || 16:15 - 18:15 || T.1.1- || Matteo Matteucci || Mapping with known poses and scan matching<br />
|-<br />
|14/06/2016 || Wednesday || 12:15 - 14:15 || L.26.15 || Matteo Matteucci || EKF-SLAM and FAST Slam<br />
|-<br />
|19/06/2016 || Monday || 16:15 - 18:15 || T.1.1- || Matteo Matteucci || Particle filters and Monte Carlo Localization<br />
|-<br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Topic<br />
|-<br />
|09/03/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Course Introduction<br />
|-<br />
|10/03/2016 || Thursday || 14:00 - 15:30 || D11 || Matteo Matteucci || Sensors and Actuators<br />
|-<br />
|16/03/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Sensors and Actuators<br />
|-<br />
|17/03/2016 || Thursday || 14:00 - 15:30 || D11 || Gianluca Bardaro || Gazebosim and URDF<br />
|-<br />
|23/03/2016 || Wednesday || 14:00 - 15:30 || EG3 || Gianluca Bardaro || Differential drive in Gazebo<br />
|-<br />
|24/03/2016 || Thursday || 14:00 - 15:30 || -- || -- || No Classes<br />
|-<br />
|30/03/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Sensors and Actuators<br />
|-<br />
|31/03/2016 || Thursday || 14:00 - 15:30 || D11 || Matteo Matteucci || Robot kinematics<br />
|-<br />
|06/04/2016 || Wednesday || 14:00 - 15:30 || EG3 || Gianluca Bardaro || Middleware for robotics<br />
|-<br />
|07/04/2016 || Thursday || 14:00 - 15:30 || D11 || Gianluca Bardaro || A gentle introduction to ROS<br />
|-<br />
|13/04/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Robot kinematics<br />
|-<br />
|14/04/2016 || Thursday || 14:00 - 15:30 || D11 || Matteo Matteucci || Robot navigation algorithms<br />
|-<br />
|20/04/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Trajectory planning introduction<br />
|-<br />
|21/04/2016 || Thursday || 14:00 - 15:30 || D11 || Gianluca Bardaro || Differential drive control in ROS<br />
|-<br />
|27/04/2016 || Wednesday || 14:00 - 15:30 || -- || -- || No Classes<br />
|-<br />
|28/04/2016 || Thursday || 14:00 - 15:30 || D11 || Gianluca Bardaro || Trajectory planning and navigation in ROS<br />
|-<br />
|04/05/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Trajectory planning (continued)<br />
|-<br />
|05/05/2016 || Thursday || 14:00 - 15:30 || D11 || Matteo Matteucci || Introduction to probability and Simultaneous Localization and Mapping (SLAM)<br />
|-<br />
|11/05/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Occupancy grids and Laser sensor model<br />
|-<br />
|12/05/2016 || Thursday || 14:00 - 15:30 || D11 || Matteo Matteucci || Mapping with known poses and scan matching + Project presentation<br />
|-<br />
|18/05/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || EKF-SLAM and FAST Slam<br />
|-<br />
|19/05/2016 || Thursday || 14:00 - 15:30 || D11 || Matteo Matteucci || Particle filters and Monte Carlo Localization<br />
|-<br />
|25/05/2016 || Wednesday || -- || -- || -- || No Classes<br />
|-<br />
|26/05/2016 || Thursday || -- || -- || -- || No Classes<br />
|-<br />
|01/06/2016 || Wednesday || 14:00 - 15:30 || EG3 || Gianluca Bardaro || ROS tf + actionlib<br />
|-<br />
|02/06/2016 || Thursday || -- || -- || -- || No Classes<br />
|-<br />
|08/06/2016 || Wednesday || 14:00 - 15:30 || EG3 || Gianluca Bardaro || ROS Navigation with movebase<br />
|-<br />
|09/06/2016 || Thursday || 14:00 - 15:30 || D11 || Gianluca Bardaro || Ros Navigation with movebase (continued)<br />
|-<br />
|15/06/2016 || Wednesday || 14:00 - 15:30 || EG3 || Matteo Matteucci || Questions and answers about theory<br />
|-<br />
|16/06/2016 || Wednesday || 14:00 - 15:30 || EG3 || Gianluca Bardaro || Questions and answers about project and exercises<br />
|-<br />
|}<br />
--><br />
<br />
===Course Evaluation===<br />
<br />
Course evaluation is composed by two parts:<br />
<br />
* A written examination covering the whole program graded up to 26/32<br />
* A home project in simulation practicing the topics of the course graded up to 6/32<br />
<br />
The final score will sum the grade of the written exam and the grade of the home project.<br />
<br />
===Course Project (i.e., the two [2] homeworks)===<br />
<br />
In the course project, you will use [http://www.ros.org/ ROS] to develop a simple autonomous mobile robot performing simple mapping, localization, and navigation task. The project requires some coding either in C++ / Python following what will be presented during the lectures (we suggest using C++ as it will be the language used in class). The project will be presented in two (2) parts you have about one month to do each. Details will follow.<br />
<br />
==Teaching Material (the textbook)== <br />
<br />
Lectures will be based on material from different sources, teachers will provide their slides to students as soon they are available. <br />
<br />
===Course Slides 2021/2022===<br />
<br />
Slides from the lectures by Matteo Matteucci<br />
*[[Media:Robotics_00_2122_Course_Introduction.pdf|[2021/2022] Course Introduction]]: introductory slides of the course with useful information about the course syllabus, grading, and the course logistics. <br />
*[[Media:Robotics_01_2122_Introduction.pdf|[2021/2022] Introduction to Robotics]]: Introduction to Robotics, definitions, examples and SAP cognitive model. <br />
*[[Media:Robotics_02_2122_Sensors_Actuators.pdf |[2021/2022] Sensors and Actuators]]: an overview of most commonly used actuator and sensors in robotics, the DC motor and its characteristics, gears and torque. Sensor classification, common sensors in robotics with pros and cons.<br />
*[[Media:Robotics_03_2122_Odometry.pdf |[2021/2022] Robot Odometry]]: Robot Localization intro, direct and inverse kinematics, robot odometry for different kinematics (differential drive, skid steering, Ackerman, etc.).<br />
*[[Media:Robotics_04_2021_Localization.pdf |[2020/2021] Robot Localization]]: Sensor models, Robot Localization, Bayesian filtering, Kalman Filtering, Monte Carlo Localization.<br />
*[[Media:Robotics_05_2021_SLAM.pdf |[2020/2021] Simultaneous Localization and Mapping]]: Mapping with known poses, scan matching, EKF-SLAM, FAST-SLAM<br />
** [https://drive.google.com/drive/folders/1JO8AQIWaOYeW11d9rInox0pZPZG-fdfc?usp=sharing At this link] you can find the videos included in the slides about (simulataneous) localization and mapping <br />
*[[Media:Robotics_06_2021_MotionControl_tmp.pdf |[2020/2021] Robot Motion Control]]: Introduction to motion control, Virtual Histogram methods, Dynamic Window Approach (+ planning algorithms)<br />
<!--<br />
*[[Media:Robotics_03_Mobile_Robots_Kinematics.pdf |[2015/2016] Mobile Robots Kinematics]]: mobile (wheeled) robot kinematics, holonomic and non holonomic constraints, differential drive model. [https://drive.google.com/open?id=0B5eSI7n7LkDhM3NIRGlNdktRSzA ppsx]<br />
*[[Media:Robotics_04_Motion_Control.pdf |[2015/2016] Robot Motion Control]]: mobile robot navigation, trajectory planning, trajectory following, and obstacle avoidance. [https://drive.google.com/open?id=0B5eSI7n7LkDhS3BXZzByYzYxVlU (ppsx)]<br />
*[[Media:Robotics_05_2018_SLAM_with_Lasers.pdf |[2017/2018] SLAM with Lasers]]: introduction to Simultaneous Localization and Mapping, EKF based SLAM, Particle Filters, and Monte Carlo Localization. [https://drive.google.com/open?id=0B5eSI7n7LkDhd2FZY1NRWmpiVm8 (ppsx)]<br />
--><br />
<!--Slides from the lectures by Simone Mentasti as well as examples can be found [https://goo.gl/GonArW at this link], for your convenience we publish here the PDF of the lectures, but check the previous link for coding examples:--><br />
<br />
Last version of slides from the lectures by Paolo Cudrano are available [https://polimi365-my.sharepoint.com/:f:/g/personal/10457911_polimi_it/Eq7UEjxDOOtNrZtvLSKLrEUBKpga-uGlXx8qkZgJjXQJMg HERE!].<br />
<br />
Last version of slides from the lectures by Simone Mentasti are available [HERE!].<br />
<!--<br />
Last version of slides from the lectures by Simone Mentasti are available [https://goo.gl/GonArW HERE!]. <br />
<br />
Past year slides are below:<br />
*[[Media:Robotics_L1_2019_ex.pdf|[2018/2019] Middleware in Robotics]]: Middleware for robotics and ROS Installation Party<br />
*[[Media:Robotics_L2_2019_ex.pdf|[2018/2019] ROS Environment]]: Ros workspace, publisher/subscriber<br />
*[[Media:Robotics_L3_2019_ex.pdf|[2018/2019] ROS Basics]]: Messages, services, parameters,launch file<br />
*[[Media:Robotics_L4_2019_ex.pdf|[2018/2019] ROS Tools]]: Bags, tf, actionlib, rqt_tools<br />
*[[Media:Robotics_L5_2019_ex.pdf|[2018/2019] Actiolib]]: Actiolib and message filters <br />
*[[Media:Robotics_L6_2019_ex.pdf|[2018/2019] ROS on Multiple Machines]]: how to run ROS nodes on different machines <br />
*[[Media:Robotics_L7_2019_ex.pdf|[2018/2019] Robot Navigation]]: ROS Navigation Stack, Movebase, Navcore, Gmapping<br />
*[[Media:Robotics_L9_2019_ex.pdf|[2018/2019] Opencv/CV_BRIDGE]]: how to nterface OpenCV and ROS <br />
*[[Media:Robotics_L10_2019_ex.pdf|[2018/2019] Robot Localization]]: useful stuff for the course project ;-)<br />
--><br />
<br />
===Year 2020/2021 Recording===<br />
As I registered these due to pandemics, I am making them available. They DO NOT REPLACE THIS YEAR classroom lectures which are to be considered as the official material of this year, but they might be useful to double-check your notes.<br />
<br />
* 24/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=e953e0e29b744f0fa604c2c401cb40b6 Course logistics] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=2068c40227aa4091a5483bb3c57af5e1 Introduction to Robotics]<br />
* 03/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=e74e003ef5664d849f848ff3831dd7e6 Sensors and Actuators]<br />
* 10/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=30df56c53c6a4ac199dafff310f1f222 Robot Sensors] and [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4dbee67823f8417f8e3784248c4712db Intro to SLAM]<br />
* 17/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d85a41c9c6404ccab84b725f902c99eb Robot Kinematics (Differential Drive)]<br />
* 31/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=a323ca89bbbb4fd7b30fb68b1037c10c Robot Kinematics (Continued)]<br />
* 07/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ddc9aed131194c568131dd7e5c0875b3 Localization and LiDARS]<br />
* 14/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=53269a220d2a4b5b885c36bcc1984116 Localization and Bayes filters]<br />
* 21/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fdb9155b23794cc6aac379e0cc2c0bf6 Localization with Kalman filters and Particle filters]<br />
* 05/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=486985ca26b04cb0962143a7a58491b6 Mapping and SLAM]<br />
* 12/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=3aaa118d78b74c67b0398bf9cf5bf2e1 Robot Motion Control]<br />
* 26/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=da607a0ea8ee42508eeb276224ed2f54 Search-based Planning]<br />
* 31/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6fdba09c98844f5eb26b63c39f0cd997 Sampling-based Planning]<br />
<br />
Also, labs are available, however, the organization during the pandemic was kind of different with 2 teams to reduce classroom occupancy. This is why they might resemble a kind of disconnected. <br />
<br />
* 02/03/2021 - Paolo Cudrano [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d260c9fb0aeb4963bfb3aa7be89a1632 Introduction to middleware in Robotics]<br />
* 09/03/2021 - Paolo Cudrano [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=86c7caa885764429aff9777ed5cfa322 ROS Basics]<br />
* 17/03/2021 - Paolo Cudrano [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=41a263d5283e4c5d8a16840a1277512b Publishers and Subscribers]<br />
* 24/03/2021 - Paolo Cudrano [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=3e67b96db3bb4001a3a8af5b5b12f435 Services and Parameters]<br />
* 31/03/2021 - Paolo Cudrano [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=aabb359b39a44780adc917fa1a86ebb1 TF, RVIZ (Cudrano recording)]<br />
* 13/04/2021 - Paolo Cudrano [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=e08a2c0739214339bf2ce4fb13dbb098 Bags, Message filters and rospy] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fe8dba62b550480d8ab6254f2e5bc8f5 Project 1 Presentation]<br />
* 04/05/2021 - Simone Mentasti [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7f075850e538498aa019575cdcab9eb2 ROS on Multiple Devices]<br />
* 12/05/2021 - Simone Mentasti [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=39ba34fc6ae649f0b308fa5630451297 Robot Navigation]<br />
* 26/05/2021 - Simone Mentasti [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=a5e18e1b729a48c4a373873e0d3ea96d IMU Tools and robot localization] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f0a14f56b26445b0929a7465abb9f8b0 Project Presentation] + [https://drive.google.com/drive/folders/1uMwWmQ50iwrMXTJnpTuJdt5YNmnQkrOV?usp=sharing Project folder]<br />
<br />
===Useful stuff from the web===<br />
These are videos from the web which might be useful to understand better the material presented in the lectures<br />
*[https://www.youtube.com/watch?v=LAtPHANEfQo Understanding DC Brushed Motors] by Learn Engineering <br />
*[https://www.youtube.com/watch?v=bCEiOnuODac Understanding DC Brushless Motors] by Learn Engineering <br />
*[https://www.youtube.com/watch?v=eyqwLiowZiU Understanding DC Stepper Motors] by Learn Engineering<br />
<br />
This blog post can be useful to better understand the EKF-SLAM idea and implementation <br />
*[https://jihongju.github.io/2019/07/06/ekfslam-hands-on-tutorial/ EKF-SLAM hands-on tutorial] by Jihong Ju<br />
<br />
If you have problems in installing Linux on your machine you can use a USB drive distro and boot on it instead of your OS. '''Note''': We are testing this guide these days we might have some tips and tricks for it so stay tuned!<br />
*[https://www.fosslinux.com/10212/how-to-install-a-complete-ubuntu-on-a-usb-flash-drive.htm How to install a complete ubuntu on a USB flash drive] (need to have the USB drive inserted to boot)<br />
<br />
The ROS framework is C++ based, if you want to check some C++ tutorial online you can have a look at<br />
* [https://www.programiz.com/cpp-programming Simple, basic topics about C++]<br />
* [https://www.cplusplus.com/doc/tutorial/ A more detailed tutorial about C++]<br />
* [https://www.learncpp.com/ An even more detailed tutorial on C++] (you can just focus on some particular chapters. In particular, Ch. 11 seems interesting as a detailed overview of Object-Oriented Programming, if you are not familiar with it.)<br />
<br />
===Useful readings===<br />
These are papers which explain some of the topics in the lecture with a higher level of details<br />
*[https://www.mdpi.com/1424-8220/15/5/9681/pdf Analysis and experimental kinematics of a skid-steering wheeled robot based on a laser scanner sensor.] Wang, Tianmiao, Yao Wu, Jianhong Liang, Chenhao Han, Jiao Chen, and Qiteng Zhao. Sensors 15, no. 5 (2015): 9681-9702.<br />
*[http://www.iri.upc.edu/people/jsola/JoanSola/objectes/curs_SLAM/SLAM2D/SLAM%20course.pdf Simultaneous localization and mapping with the extended Kalman filter.] Joan Sola'. <br />
*[http://robots.stanford.edu/papers/Thrun03g.pdf FastSLAM: An Efficient Solution to the Simultaneous Localization And Mapping Problem with Unknown Data Association.] Sebastian Thrun, Michael Montemerlo, Daphne Koller, Ben Wegbreit, Juan Nieto, and Eduardo Nebot.<br />
<br />
<!--<br />
*[[Media:Robotics_01ex_2018_Gazebo.pdf | [2017/2018] Gazebosim and SDF]]: an introduction to robotics simulators, an overview of Gazebo, its use, and the SDF file format to describe a robot simulation.<br />
*[[Media:Robotics_02ex_2018_GazeboPlugins.pdf | [2017/2018] Gazebosim and plugins]]: more about simulation with Gazebo, modeling of a caster wheel, modeling of noise with Gazebo plugins, the GPS example.<br />
*[[Media:Robotics_03ex_2018_Middleware.pdf | [2017/2018] Middleware in Robotics]]: an introduction to the use of middleware for robotics, motivation and state of the art review.<br />
--><br />
<!--<br />
Slides from the lectures by Gianluca Bardaro (you can find material under preparation [https://goo.gl/DBwhhC at this link])<br />
*[[Media:Robotics_01ex_2017_Gazebo.pdf | [2016/2017] Gazebosim and SDF]]: an introduction to robotics simulators, an overview of Gazebo, its use, and the SDF file format to describe a robot simulation.<br />
*[[Media:Robotics_02ex_2017_GazeboPlugins.pdf | [2016/2017] Gazebosim and plugins]]: more about simulation with Gazebo, modeling of a caster wheel, modeling of noise with Gazebo plugins, the GPS example.<br />
*[[Media:Robotics_03ex_2017_Middleware.pdf | [2016/2017] Middleware in Robotics]]: an introduction to the use of middleware for robotics, motivation and state of the art review.<br />
*[[Media:Robotics_03ex_2017_ROSInstall.pdf | [2016/2017] ROS Install]]: Introduction to the Robotic Operating System, installation and main conceptual elements<br />
*[[Media:Robotics_04ex_2017_ROSIntro.pdf | [2016/2017] ROS Introduction]]: Introduction to the ROS File system and overview on the most used commands<br />
*[[Media:Robotics_04ex_2017_ROSDevelopment.pdf | [2016/2017] ROS Development]]: Structure of a node and main element used in its development and building.<br />
*[[Media:Robotics_05ex_2017_ROSArchitectureExample.pdf | [2016/2017] ROS Architecture]]: Creating a simple architecture in ROS to manually control a simulated robot. See examples.zip for the source code.<br />
<br />
Additional material from the teachers<br />
*[[Media:Robotics_2017_examples.zip | [2016/2017] examples]]: gazebo model for a differential drive with a caster wheel<br />
--><br />
<!--*: an example of motion control architecture implemented in ROS, integration with Gazebo, introduction to tf.<br />
*[[Media:Robotics_06ex_Transformation_Frames.pdf | [2015/2016] Transformation Frames]]: reference frames and the tf framework to handles transformation frames in ROS.<br />
*[[Media:Robotics_07ex_Actionlib.pdf | [2015/2016] Actionlib]]: the ROS actionlib package.<br />
Additional material from the teachers<br />
*[[Media:Robotics_willy1.zip | [2015/2016] willy1.zip]]: gazebo model for a differential drive with a caster wheel<br />
*[[Media:Robotics_gps.zip | [2015/2016] gps.zip]]: gazebo plugin to simulate a faulty gps sensor<br />
*[[Media:lesson_pack.zip | [2015/2016] lesson_pack.zip]]: ROS nodes examples with object oriented template of talker and listener<br />
*[[Media:Robotics_willy2.zip | [2015/2016] willy2.zip]]: an improved gazebo model for a differential drive with a caster wheel<br />
*[[Media:Robotics_diffdrive.zip | [2015/2016] diffdrive.zip]]: a ROS motion control architecture for a diffdrive robot--><br />
<br />
===Course Projects===<br />
<br />
==== Homework 2021/2022 ====<br />
<br />
The First project con the Robotics class is available [https://polimi365-my.sharepoint.com/:f:/g/personal/10457911_polimi_it/EhsMssV_kDBKkp7gY-xGV3gBNGpBpnyoHPR_Gu5eAMebyw?e=2XCRe5 HERE!], deadline is 29/04/2022!<br />
<br />
==Frequently Asked Questions==<br />
<br />
===Course Structure===<br />
<br />
'''What is the biggest difference with the course 093217 ROBOTICS AND DESIGN?'''<br />
* Robotics and Design is a practical course focused on the development of a robotics application, you will not learn about the theoretical aspects of robotics, but you will build a robot with a purpose which changes every year. I consider the two courses as complimentary.<br />
<br />
===Exams and Evaluation===<br />
<br />
'''Are there any solutions available for the past exams?'''<br />
* No, if you have doubts or questions, just send me your proposed solution and I will reply tailoring the answer to your current understanding.<br />
<br />
'''Is it important to buy/read the text book to be able to follow the course? I can’t find it in the library, is there any alternative book?'''<br />
* No, it is not required, as from past experience attending classes and checking the material provided y the teachers is enough. Obviously reading the book will provide much more information..<br />
<br />
===Homeworks and ROS===<br />
<br />
'''In the schedule when it says ROS, are these lectures as well or are they practical work i.e. lab/excercise?'''<br />
*They are ex-cathedra lectures where you are expected to bring your laptop, it is not mandatory and you can follow the class in a classical passive way, but I suggest to consider it as a lab and take your laptop with you if you can.<br />
<br />
'''Out of all the scheduled activities this semester, approximately how many of these are practical lab/excercise?<br />
* Indeed not all ROS lectures will present coding exercises, I expect half of them will be about coding and the other half more on the technical background you need to understand what you are coding.<br />
<br />
'''Should I install ROS on my laptop/desktop?'''<br />
*Absolutely yes. This means you need to have linux on your machine, possibly ubuntu 16.04 or 18.04. This can be achieved in different ways, we suggest a native install via dual boot or as main operating system (we do not take any responsibility of something happening to your data or hardware in doing this operation). Other options such as virtual machine or live distro are not as effective as a real install, but they work.<br />
<br />
'''Which editor/IDE should I use for ROS?'''<br />
* We do not suggest any particular editor for ROS, standard text editors such as nano/gedit/sublime + a terminal are enough. Nevertheless, you can use the environment you prefer for C++ development; some students, in the past, have used Eclipse or Clion. You can also check the [http://wiki.ros.org/IDEs list of supported ROS editors] or [https://github.com/tonyrobotics/roboware-studio Roboware], the latter has been designed for ROS, but it does not offer any special feature you will miss using standard C/C++ editors. <br />
<br />
'''As I understand the “homework/project” is a group project. Is this correct and how are the groups formed?'''<br />
* It is not a group project, while it is allowed to do it in groups (up to 3 people). I expect the groups to form naturally in classes. We usually set up a slack group for the project you can organize autonomously. Nevertheless, you can do the project alone as well (but we advise you to do it in groups).<br />
<br />
'''When “Part 1” of the homework/project will start?'''<br />
* Right after we have finished the first block of lectures about ROS. This should happen around Easter plus/minus a week.<br />
<br />
==Past Years Useful Material== <br />
<br />
Here you find material from past editions of the course that you umight find useful in preparing the exam.<br />
<br />
===Past Exams and Sample Questions===<br />
<br />
Since the 2015/2016 Academic Year the course has changed the teacher and this has changed significantly the program and the exam format as well. For this reason we do not have many past exams to share with you, they will accumulate along the years tho.<br />
<br />
* [[Media:20170717.pdf|Exam of 17/07/2017]]<br />
* [[Media:20170701.pdf|Exam of 01/07/2017]]<br />
* [[Media:20160926.pdf|Exam of 26/09/2016]]<br />
* [[Media:20160905.pdf|Exam of 05/09/2016]]<br />
* [[Media:20160720.pdf|Exam of 20/07/2016]]<br />
* [[Media:20160627.pdf|Exam of 27/06/2016]]<br />
<br />
===Past Course Project===<br />
<br />
Here you find past course projects in case you are interested in checking what your colleagues have been pass through before you. In some cases they may have been more lucky in some others you might be the lucky one ... that's life! ;-) <br />
<br />
====Homework 2020/2021====<br />
<br />
Here they are the curse homework projects:<br />
* The first course project has been published on 14/04/2021<br />
** The description of the first ROS Project is [https://polimi365-my.sharepoint.com/:b:/g/personal/10457911_polimi_it/Ees1RgOSL1REiK1iqBS--ZABXEwE1jC3dQdFHTmJPlyK3A?e=ahN4bx HERE]<br />
** The material for the project is [https://polimi365-my.sharepoint.com/:f:/g/personal/10457911_polimi_it/EjJKNz1Lxr9MqW8b5XyIepsBMNrJb7O4oqF6UoHl14758A?e=40GxFe HERE]<br />
** You have to deliver it by 16/05/2021 !!!<br />
* The second course project has been published on 26/05/2021<br />
** The description of the second ROS Project is [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f0a14f56b26445b0929a7465abb9f8b0 HERE]<br />
** The material for the project is [https://drive.google.com/drive/folders/1uMwWmQ50iwrMXTJnpTuJdt5YNmnQkrOV?usp=sharing HERE]<br />
** You have to deliver it by 27/06/2021 !!!<br />
<br />
====Homework 2019/2020====<br />
<br />
Here they are the curse homework projects:<br />
* [https://drive.google.com/drive/folders/1bbkGsgcp7LNQX6F-uVFyqv0W1MBWH3CZ First project] deadline 8th of May 2020.<br />
* [[Media:Robotics_2019_2020_second_project.pdf |Second project presentation]] deadline 5th of July 2020.<br />
<br />
====Homework 2018/2019====<br />
<br />
The 2018/2019 course project is divided in two releases. The homework philosophy should be "You have to struggle, but not too much!". Indeed the homework is made to challenge you and make you exercising and learn by doing, nevertheless if you find yourself stuck please write us and we will give you the required hints to continue and complete ... this includes extending the deadline (for all) or allowing you to use python instead of C++ (for selected students). <br />
<br />
'''''Advice:''''' '''Start as soon as possible doing the homework!''' <br />
<br />
Homework<br />
* [[Media:Robotics_project_2018-2019_1.pdf | 2018/2019 Course Project Part 1]]: due on '''''Wednesday 29/05/2019''''', this is the first part of the 2018/2019 course project. <br />
* [[Media:Robotics_project_2018-2018_2.pdf | 2018/2019 Course Project Part 2]]: due on '''''Monday 08/07/2019''''', this is the second and last part of the 2018/2019 course project.<br />
<br />
====Homework 2016/2017====<br />
<br />
The 2016/2017 course project is divided in two releases to provide you something to work on as early as possible during the course. The homework philosophy should be "You have to struggle, but not too much!". Indeed the homework is made to challenge you and make you exercising and learn by doing, nevertheless if you find yourself stuck please write us and we will give you the required hints to continue and complete. <br />
<br />
'''''Advice:''''' '''Start as soon as possible doing the homework!''' <br />
<br />
Homework<br />
* [[Media:Robotics_project_2016-2017_A02.pdf | 2016/2017 Course Project Part A v1.1]]: due on '''''Wednesday 31/05/2017''''' (6 weeks from now), this is the first part of the 2016/2017 course project. <br />
* [[Media:Robotics_project_2016-2017_B01.pdf | 2016/2017 Course Project Part B v1.0]]: due on '''''Wednesday 28/07/2017''''' (6 weeks from now), this is the second part of the 2016/2017 course project. <br />
* [[Media:willy3_and_hokuyo.tgz| 2016/2017 Model for Course Project part B v1.0]]: thi si the gazebo model to be used in exercise 4 in the second part of 2016/2017 course project.<br />
<!--<br />
Notes on the homework<br />
* There was a small problem in the model provided for the second part of the project. You can fix it by changing a line in `willy3/model.sdf`, i.e., you need to change line `133` from `<publishTf>false</publishTf>` to `<publishTf>true</publishTf>, then everything should work. You can download [[Media:willy3_and_hokuyo_fixed.tgz| the fixed model here!]]<br />
* You might encounter troubles in building the full map with gmapping, thus not to have you shuck on that we provide here the perfect map of the environment in case you want to skip the gmapping part and move on with the navigation one. Needless to say that to have the full mark you have to provide also a map you have generated with gmapping, but you can develop the rest of the exercise on this map and get the score for that. You can download [[Media:willogarage_perfect.tgz| the perfect willowgarage map here!]]<br />
<br />
Some useful fatcs:<br />
* The project can be done in groups of maximum 2 people<br />
* Some data might be missing, some data might be useless, do not hesitate to write us by email! <br />
* We have not decided yet how much each part is worth, we will decide depending on the overall distribution of results in the class to harmonize the overall score and compensate for different level of difficulty among the years.<br />
<br />
Delivery procedure:<br />
* The project should be delivered by email as single compressed file '''''both''''' to Matteo Matteucci && Gianluca Bardaro. <br />
* The archive should contain:<br />
** The gazebo model as a directory with SDF files, when required, and a ROS package with nodes sources and corresponding launch files (put your names in the directories names)<br />
** A max 4 pages idiot proof report describing:<br />
*** The files provided<br />
*** The installation (if any) and compilation instructions<br />
*** Instruction to configure the execution (e.g., parameter setting)<br />
*** The instructions to execute the code and check that all the above has been done successfully<br />
* The evaluation will be performed by following your instructions, if these do not work, we assume the course project does not work (we suggest you to have someone else testing the whole on his/her computer before submitting the project).<br />
<br />
'''''Very important note:''''' read again the delivery procedure!<br />
<br />
'''''Very useul note:''''' students willing to graduate in July, need to register the exam by the 17th of July, which means they have to submit it on the 14th of July to let us evaluate it!<br />
--><br />
<br />
====Homework 2015/2016====<br />
This year project is divided in steps; each of them is worth some points out of the 5/32 points available for the final mark. You find the project description here, it is complete, it contains parts up to 4, parts 5 is optional, but we suggest to do it anyway since it requires a limited amount of time.:<br />
<br />
* [[Media:Robotics_project_2015-2016_1_0.pdf | 2015/2016 Course Project v1.0]]<br />
* [https://www.dropbox.com/s/hri9tuzh3kblzol/Safer_STL.zip?dl=0 2015/2016 Kobra STL files]: in case you want to make your simulation look more real here you find the STL files of the Kobra robot in the "Safer" version. Unfortunately the STL files are scaled down with respect to the real robot, so you have to modify those if you want to use.<br />
<br />
===Additional Resources===<br />
<br />
If you are interested in a more deep treatment of the topics presented by the teachers you can refer to the following books and papers:<br />
<br />
* [http://www.probabilistic-robotics.org/ Probabilistic Robotics] by Dieter Fox, Sebastian Thrun, and Wolfram Burgard.<br />
<br />
The following are links to online sources which might be useful to complement the material above<br />
<br />
* [http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=55890 ISO 8373:2012]: ISO Standard "Robots and robotic devices -- Vocabulary"<br />
* [http://www.ros.org/ ROS]: the Robot Operating System<br />
* [http://gazebosim.org/ Gazebo]: the Gazebo robot simulator<br />
<br />
* [http://airlab.elet.polimi.it/index.php/ROS_HOWTO AIRLab ROS Howto]: a gentle introduction to ROS with node template and program examples</div>Matteohttps://chrome.deib.polimi.it/index.php?title=Machine_Learning_Bio&diff=3831Machine Learning Bio2022-05-04T13:21:01Z<p>Matteo: </p>
<hr />
<div>__FORCETOC__<br />
<br />
The following are last-minute news you should be aware of ;-)<br />
* 04/05/2022: Changed lecture schedule<br />
* 02/05/2022: Changed deadline first homework -> 11/05/2022 at noon<br />
* 22/04/2022: The first homework is out!!!<br />
* 08/03/2022: Added material for the first lab<br />
* 06/03/2022: Slides from first lectures and last year's recordings updated <br />
* 23/02/2022: Lectures start today!<br />
<!--<br />
* 11/09/2021: Grade of the [[Media:ML2021-Grades_210911.pdf|Summer session + homeworks]] <br />
* 09/07/2021: Grade of the [[Media:ML2021-Grades_210624.pdf|24/06/2021 oral exams]] <br />
* 09/07/2021: Updated Homework + Oral [[Media:ML2021-Conversion.pdf|conversion table]]<br />
* 03/07/2021: Updated Homework available [[Media:ML2021-homework-new.zip|here!!!]]<br />
* 08/06/2021: Updated all videos and all slides from the course.<br />
* 02/06/2021: You can fin the 2020/2021 homework [[Media:ML2021-homework.zip|here!!!]]<br />
* 26/05/2021: The link to the form to request an instance of remote examination for June and July is [https://forms.office.com/r/FUrVt8eZNx here]!<br />
* 09/04/2021: From next week lectures will be back to presence (plus webex streaming)<br />
* 22/03/2021: Added completed material from the last lab plus some exercises ... <br />
* 17/03/2021: Added the material for the lab of today ... <br />
* 10/03/2021: 11/03/2021 lecture has been canceled<br />
* 06/03/2021: website update with linear algebra slides and (working) links to all lectures<br />
* 05/03/2021: Since today we are moved fully online so lectures will happen in my webex room (same holds for labs)<br />
* 24/02/2021: Lectures start today<br />
--><br />
<!--<br />
* 08/08/2020: Grading for all projects and first two calls [[Media:Grades_20200723.pdf|are here!!]] <br />
* 22/06/2020: Grading mechanism explained, check [[Media:ML2020_grading_system.pdf|here a handy recap]] <br />
* 14/06/2020: [[Media:ML2020_homework.zip |Here it come the 2020 homework!!!]]<br />
* 03/06/2020: All slides updated<br />
* 02/05/2020: Updated course schedule and added videos to the previous lectures<br />
* 04/04/2020: Updated schedule and added videos of previous lectures<br />
* 31/03/2020: Updated schedule and added material on linear algebra<br />
* 19/03/2020: Added lab material, both with empty notebooks and final result<br />
* 11/03/2020: Added today's lecture videos and planned next week schedule (To Be Completed)<br />
* 11/03/2020: The course starts today!<br />
* 03/03/2020: The course is going to start soon ...<br />
--><br />
<br />
==Course Aim & Organization==<br />
<br />
The objective of the Machine Learning course is to give an in-depth presentation of the techniques most used for pattern recognition, knowledge discovery, and data analysis/modeling. These techniques are presented both from a theoretical (i.e., statistics and information theory) perspective and a practical one (i.e., coding examples) through the descriptions of algorithms and their implementations in a general-purpose programming language (i.e., python).<br />
<br />
The course presents the classical supervised and unsupervised learning paradigms described and discussed presenting regression, classification, and clustering problems in Bioinformatics. The course is composed of a set of lectures on specific machine learning techniques (e.g., generalized linear regression, logistic regression, linear and quadratic discriminant analysis, support vector machines, k-nearest-neighborhood, clustering, etc.) preceded by the introduction of the Statistical Learning framework which acts as a common reference framework for the entire course.<br />
<br />
===Teachers===<br />
<br />
The course is composed of a blending of lectures and exercises by the course teacher and a teaching assistant.<br />
<br />
* [http://www.deib.polimi.it/ita/personale/dettagli/267262 Matteo Matteucci]: the course teacher <br />
* [https://www.deib.polimi.it/ita/personale/dettagli/1638984 Stefano Samele]: the teaching assistant <br />
<br />
===Course Program===<br />
<br />
The course mostly follows the following book which is also available for download in pdf<br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani<br />
<br />
The course lectures will present the theory and practice of the following:<br />
* Machine Learning and Pattern Classification: the general concepts of Machine Learning and Pattern Recognition are introduced within the framework of Statistical Decision Theory with reference to the bias-variance trade-off and the Bayes classifier;<br />
* Generalized Linear Regression: linear methods for regression will be presented and discussed introducing different techniques (e.g., Linear Regression, Ridge Regression, K-Nearest Neighbors Regression, Non-Linear Regression, etc.) and the most common methodologies for model validation and selection (e.g., AIC, BIC, cross-validation, stepwise feature selection, Lasso, etc.).<br />
* Linear and Non-Linear Classification: generative and discriminative techniques for classification will be described and discussed (e.g., Logistic Regression, Linear and Quadratic Discriminant Analysis, K-Nearest Neighbors, Perceptron Rule, and Support Vector Machines, etc.). Metrics for classifiers evaluation and comparison are presented in this part of the course (e.g., accuracy, precision, recall, ROC, AUC, F-measure, Matthew coefficient).<br />
* Unsupervised Learning: the most common approaches to unsupervised learning are described mostly focusing on clustering methods such as hierarchical clustering, k-means, k-medoids, Mixture of Gaussians, DBSCAN, etc<br />
<br />
These topics will be presented both from a theoretical perspective and a practical one via implementations in the general-purpose programming language python.<br />
<br />
===Detailed course schedule===<br />
<br />
A detailed schedule of the course can be found here; topics are just indicative while days and teachers are correct up to some last-minute change (I will notify you by email). Please note that not all days we have lectures!!<br />
<br />
Note: Lecture timetable interpretation<br />
* On Wednesday, in room 26.02, starts at 15:15 (cum tempore), ends at 18:15<br />
* On Thursday, in room 26.01, starts at 12:15 (cum tempore), ends at 14:15<br />
<br />
<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|23/02/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Machine Learning Intro<br />
|-<br />
|24/02/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Statistical Learning Theory (Ch. 1 ISL)<br />
|-<br />
|02/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Statistical Learning Theory - Bias/Variance Trade-off (Ch. 2 ISL)<br />
|-<br />
|03/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Introduction to Linear Algebra<br />
|-<br />
|09/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Python + Numpy + Bias/Variance<br />
|-<br />
|10/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Simple Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|16/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Multi Variate Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|17/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL) <br />
|-<br />
|23/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Multivariate Linear Regression Laboratory<br />
|-<br />
|24/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Generalized Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|30/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Feature Selection and Model Assessment (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|31/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Ridge Regression and Lasso (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|06/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Generalized Linear Regression and Feature Selection Laboratory<br />
|-<br />
|07/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: KNN and Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|13/04/2022 || Wednesday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|14/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|20/04/2022 || Wednesday || 15:15-18:15 || 26.02 ||Matteo Matteucci || Lecture || Classification: Linear Discriminanr Analysis (Ch. 4 ISL)<br />
|-<br />
|21/04/2022 || Thursday || 12:15 - 14:15 || 26.01 || Matteo Matteucci || Lecture || Evaluation methods for classification<br />
|-<br />
|27/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Logistic Regression and LDA Laboratory<br />
|-<br />
|28/04/2022 || Thursday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|04/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || The Perceptron (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|06/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL) <br />
|-<br />
|11/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Unsupervised Learning and Clustering (Ch. 10 ISL)<br />
|-<br />
|12/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Clustering (Ch. 10 ISL)<br />
|-<br />
|18/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || SVM and Classifiers Evaluation Laboratory<br />
|-<br />
|19/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|25/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Clustering Laboratory<br />
|-<br />
|26/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|01/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Clustering Evaluation<br />
|-<br />
|02/06/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|08/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Principal Component Analysis (Ch. 10 ISL)<br />
|}<br />
<br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|24/02/2021 || Wednesday || 15:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
|-<br />
|25/02/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] (Ch. 1 ISL)<br />
|-<br />
|03/03/2021 || Wednesday || 14:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off] (Ch. 2 ISL)<br />
|-<br />
|04/03/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
|-<br />
|10/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|11/03/2021 || Thursday || --- || --- || --- || ---|| --- No lecture ---<br />
|-<br />
|17/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
|-<br />
|18/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|24/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
|-<br />
|25/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|31/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|01/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|07/04/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
|-<br />
|08/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|14/04/2021 || Wednesday || '''15:15-18:15''' || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|15/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis] (Ch. 4 ISL)<br />
|-<br />
|22/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|23/04/2021 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|28/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|29/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
|-<br />
|05/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
|-<br />
|06/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|12/05/2021 || Wednesday || 14:15-18:15 || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|13/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering] (Ch. 10 ISL)<br />
|-<br />
|19/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
|-<br />
|20/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering] (Ch. 10 ISL)<br />
|-<br />
|26/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
|-<br />
|27/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering] (Ch. 10 ISL)<br />
|-<br />
|02/06/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|03/06/2021 || Thursday || 08:15-11:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|04/06/2021 || Friday || 14:15-17:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|11/03/2020 || Wednesday || 14:15 - 18:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3565a411-bed7-4b20-9dd6-00ee8b9ddd54 Course Introduction], [https://web.microsoftstream.com/video/4a702565-386d-4bed-a0c1-9d1daa015703 Introduction to Machine Learning], and [https://web.microsoftstream.com/video/cef9a912-ee47-4254-8f26-318a6a014424 Statistical Machine Learning] (Ch. 1 ISL)<br />
|-<br />
|12/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/389145d3-c3e5-48c2-bf82-d7877bf14b8c Statistical Decision Theory and Bias-Variance trade off] (Ch. 2 ISL)<br />
|-<br />
|18/03/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/bb2155d6-a6f2-4f82-af48-3ceb22951c4b Python + Numpy + Bias/Variance] Laboratory<br />
|-<br />
|19/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b0359dad-971c-412d-8508-fde45e1dc3fe Statistical Decision Theory and Bias-Variance trade off (continued)] (Ch. 2 ISL)<br />
|-<br />
|25/03/2017 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f88827c9-0994-4d3f-80bf-1c9b6637ba18 Simple Linear Regression and Multivariate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|26/03/2017 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/deb2b3f5-d90d-47b8-b309-1ab88979f805 Multivariate Linear Regression (continued)] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|01/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/da0e35db-6995-412a-99ad-f409f0a6752d Multivariae Linear Regression (Part 1)] [https://web.microsoftstream.com/video/8defdff7-ae83-4753-a353-3d39194e63ac (Part 2)] Laboratory<br />
|-<br />
|02/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/c81f59c8-7023-4206-a771-8be062b7cb21 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|08/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/0255cfa0-98de-4465-a8bf-07c93e0974ee Issues with Linear Regression and Generalized Linear Regression] and [https://web.microsoftstream.com/video/e3392148-f1ee-426d-a271-3d8fcf11008a Feature Selection] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|09/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/03656a6b-46c7-483e-9263-0036144adb00 Feature Selection (continued)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|15/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/58093db6-f365-4184-8ce0-c12c03a1589f Generalized Linear Regression and Feature Selection (Part1)] [https://web.microsoftstream.com/video/52b0d7f5-a725-4406-aab3-3be5145d950f (Part 2)] Laboratory<br />
|-<br />
|16/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1565c508-4448-4678-a9e4-4ff411684227 Feature Selection (LASSO)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|22/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d04083a9-8961-4448-bcf2-0576d9dccf4c Classification by KNN (Part 1)] and [https://web.microsoftstream.com/video/c56ef675-486a-425c-819d-404868e07906 Logistic Regression (Part 2)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|23/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3a5f66b1-80d2-4ee5-ba14-7757ae662c97 Classification by Logistic Regression (continued)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|29/04/2020 || Wednesday || 14:15 - 17:15 || --- || --- || --- || --- No Lecture (Laurea) ---<br />
|-<br />
|30/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/a171bc2a-35e7-42c7-bdd0-d295ecfd7e26 Classification by Linear Discriminant Analysis] (Ch. 4 ISL)<br />
|-<br />
|06/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/cef18863-e3fd-481e-bcad-a18455796fd7 Classification via Logistic Regression, and LDA Laboratory (Part 1)] and [https://web.microsoftstream.com/video/670b7f72-5b6b-4168-9f1c-211a9ad25f48 (Part 2)]<br />
|-<br />
|07/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b2ed8ca0-c0c0-4c1a-836d-b2ffee20d85e Evaluation Methods for Classification]<br />
|-<br />
|13/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/2b881d7d-d11e-4432-8873-973bc36eeb61 Perceptron Learning] and [https://web.microsoftstream.com/video/00564932-919a-49a1-9fa5-eb7706640781 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|14/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b72fa8de-f98d-43cf-9609-5833625a4b5c Support Vector Machines and Kernel Trick] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|20/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/fab1f62e-cea0-4cc9-9366-0ccd6bcd161b Classification (SVM and classifiers evaluation) Laboratory (Part 1)] and [https://web.microsoftstream.com/video/130b806d-5390-4321-9d05-f63e079f30a1 (Part 2)]<br />
|-<br />
|21/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1125b85e-f4a1-49d1-991f-333fff893a1e Introduction to Unsupervised Learning] (Ch. 10 ISL)<br />
|-<br />
|27/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d8d0efb5-adfb-4376-afe3-26afb7ffd664 Clustering: Hierachical, k-means, and DBSCAN (Part 1)] and [https://web.microsoftstream.com/video/b7307896-bff7-4fd0-973f-d37fd7f91e13 (Part 2)] (Ch. 10 ISL)<br />
|-<br />
|28/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3f2975c2-1143-4870-8aed-a1a06382be14 Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|03/06/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/0fa04b48-f8c3-488b-bfab-92547d3a9c38 Clustering Laboratory (Part 1)] and [https://web.microsoftstream.com/video/24a40515-afdd-4cca-9b62-19e544c7e12e (Part 2)]<br />
|-<br />
|04/06/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f58132ba-afd3-47ce-89c8-ba16782d8f37 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
|-<br />
|27/11/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Classification by Linear Discriminant Analysis (Ch. 4 ISL)<br />
|-<br />
|03/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Exercises on Classification by Linear Discriminant Analysis<br />
|-<br />
|04/12/2017 || Tuesday || --- || --- || --- || No Lecture <br />
|-<br />
|10/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Clustering: Intro, k-means and the alike, GMM, and hierachical<br />
|-<br />
|11/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Davide Eynard || Clustering: Density-based, Spectral + Evaluation<br />
|-<br />
|14/12/2017 || Friday || 10:15 - 13:15 || TBD || Matteo Matteucci || Classification: from generative to discriminative approaches (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|17/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|18/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|}<br />
--><br />
Chapters are intended as complete except for<br />
* Ch.4 ESL: Section 4.5<br />
* Ch.12 ESL: Sections 12.1, 12.2, 12.3<br />
* Ch.9 ISL: Sections 9.1, 9.2, 9.3<br />
<br />
===Course Evaluation===<br />
<br />
The course evaluation is composed by two parts:<br />
<br />
* HW: Homework with exercises covering the whole program (up to 6 points)<br />
* OR: An oral discussion covering the whole program (up to 26 points)<br />
<br />
the final score will be the sum of HW (not compulsory) and OR scores. You will get the oral grade as a mark in the scale of 30 up to 32/30 which you have to multiply by 0.8125 and then you add to it the score of the project. For your convenience here it is [[Media:ML2021-Conversion.pdf|a conversion table]] with the final mark in case you do not turn in the project or you get the whole 6 marks in the project.<br />
<br />
====Homework #1 2021/2022====<br />
<br />
The first project asks you to develop a regression model on the [[Media:ML-2122-HW1.zip | Forest Fires Data Set]]. The goal of the model is to predict, given a set of features the burned area of forest fires. The project should focus on investigating the part of features selection for the regression task to understand the relationships between the different variables involved fully. <br />
An accurate and helpful description of the dataset is included in the forestfire.names file.<br />
<br />
The project should consist of an executable python notebook, sufficiently commented. Most of the cells should be adequately followed or preceded by an explanation of what you are doing, why, what the output is, how you interpret it, and so on.<br />
<br />
You can submit your notebook via email at stefano.samele@polimi.it. The deadline is 11/05/22 at midday CET.<br />
The notebook should already display all the cells' outputs. A copy and a re-execution will be performed to evaluate your work: we need to be sure your code is actually executable and displays consistent results.<br />
<br />
You can attend the project in a group of maximum two. Scores (0-1-2, with half points) will be assigned based on the ability to organize the investigation and the code, adopt relevant methodologies presented during laboratories, understand and interpret results, and comply with project requests.<br />
<br />
==Teaching Material (the textbook)== <br />
<br />
Lectures will be based on material taken from the book. <br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani<br />
<br />
If you are interested in a more deep treatment of the topics you can refer to the following book from the same authors<br />
<br />
* [http://www-stat.stanford.edu/~tibs/ElemStatLearn/index.html The Elements of Statistical Learning: Data Mining, Inference, and Prediction.] by Trevor Hastie, Robert Tibshirani, and Jerome Friedman.<br />
<br />
Some additional material that could be used to prepare the oral examination will be provided together with the past homeworks.<br />
<br />
===Teacher Slides ===<br />
<br />
In the following you can find the lecture slides used by the teacher and the teaching assistants during classes.<br />
<br />
* [[Media:ML-2020-A0-LinearAlgebraBasics.pdf | [2020/2021] Linear Algebra Basics]]: Basic elements of linear algebra, e.g., vectors, matrices, basis, span, etc.<br />
* [[Media:ML-2122-00-Intro.pdf | [2021/2022] Course introduction]]: introductory slides of the course with useful information about the grading, and the course logistics. Some examples from supervised and unsupervised learning. Regression, classification, clustering terminology and examples.<br />
* [[Media:ML-2122-01-StatisticalLearning.pdf | [2021/2022] Statistical Learning Introduction]]: Statistical Learning definition, rationale, and trade-offs (e.g., prediction vs. inference, parametric vs non parametric models, flexibility vs. interpretability, etc.)<br />
* [[Media:ML-2122-02-LinearRegression.pdf | [2021/2022] Linear Regression]]: Simple Linear Regression and Multiple Linear Regression. Generalized Linear models. Cross-validation techniques. Feature selection. Ridge Regression and Lasso.<br />
* [[Media:ML-2021-03-LinearClassification.pdf | [2020/2021] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods. Discriminative vs. generative methods. Support Vector Machines. <br />
* [[Media:ML-2021-04-Clustering.pdf | [2020/2021] Clustering]]: Introduction to unsupervised learning and clustering, hierarchical clustering, k-means, DBSCNA, indexes for clustering evaluation. <br />
* [[Media:ML-2021-05-PrincipalComponentAnalysis.pdf | [2020/2021] Principal Component Analysis]]: Principal Component Analysis, Geometric Interpretation, Singular Values Decomposition.<br />
<br />
===Laboratories===<br />
<br />
We will use Python (with Jupyter notebooks) throughout the course, thus we kindly ask you to install the "Anaconda" package to be ready for the labs. Here are the [https://www.anaconda.com/products/individual download links]. You can find a simple Jupyter notebook [[Media:ML2021-test.zip | HERE]] to test if the installation succeeded.<br />
<br />
To open the notebook<br />
* launch the "Anaconda Navigator" app<br />
* launch the "jupyter Notebook" app within the navigator, it should automatically open a webpage (it may take a while)<br />
* on the webpage, navigate on the folder where you downloaded the "lab01.00-TestEnvironment.ipynb" file, and press on the file to open it<br />
* then follow the instruction within the notebook<br />
<br />
If you didn't install anaconda but just jupyter, or if you can't find Anaconda Navigator <br />
* open a shell ("Anaconda Prompt" if you are using Windows)<br />
* move on to the folder where you downloaded "lab01.00-TestEnvironment.ipynb"<br />
* run the "jupyter notebook" command, it should automatically open a webpage<br />
* then on the webpage press on the "lab01.00-TestEnvironment.ipynb" file and follow the instructions within the notebook<br />
<br />
The following are the notebook used in the labs:<br />
*[[Media:ML2122-lab01.zip | [2021/2022] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session including the testing environment ([[Media:ML2122-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab02.zip | [2021/2022] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2122-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab03.zip | [2021/2022] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2122-lab03_solutions_part1.zip |complete version]])<br />
*[[Media:ML2122-lab04.zip | [2021/2022] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2122-lab04_solutions.zip |complete version]])<br />
<!--<br />
*[[Media:ML2021-lab01.zip | [2020/2021] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session ([[Media:ML2021-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab02.zip | [2020/2021] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2021-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab03.zip | [2020/2021] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2021-lab03_solutions_tmp.zip |complete version]])<br />
*[[Media:ML2021-lab04.zip | [2020/2021] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab04_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab05.zip | [2020/2021] Material for the fifth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab05_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab06.zip | [2020/2021] Material for the sixth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab06_solutions.zip |complete version]])<br />
--><br />
<!--<br />
* [[Media:ML-2016-03-AssessingModelAccuracy.pdf | [2016] Statistical Learning and Model Assessment]]: Model Assessment for Regression and Classification, Bias-Variance trade-off, Model complexity and overfitting, K-Nearest Neighbors Classifier vs. Bayes Classifier.<br />
* [[Media:ML-2016-05-LinearClassification.pdf | [2016] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods.<br />
* [[Media:ML-2016-06-SupportVectorMachines.pdf | [2016] Support Vector Machines]]: Discriminative vs. generative methids. Hyperplanes learning and Perceptron. Maximum Margin Classifiers. The Kernel trick and Support Vector Machines.<br />
For exercises and lab material please refer to [http://davide.eynard.it/pattern-analysis-and-machine-intelligence-2015-2016/ Davide Eynard website].<br />
--><br />
<br />
===Additional Resources===<br />
Papers and links useful to integrate the textbook<br />
<br />
* [http://www.ekof.bg.ac.rs/wp-content/uploads/2016/09/Ponavljanje-matematike-Wayne-Winston-Operations-Research-Applications-and-Algorithms-4-edition.pdf Basic Linear Algebra]: "Basic Linear Algebra" chapter from Wayne Winston book "Operations Research Applications and Algorithms (4th ed.)"<br />
* [http://scott.fortmann-roe.com/docs/BiasVariance.html Bias vs. Variance]: "Understanding the Bias-Variance Tradeoff" essay by Scott Fortmann-Roe<br />
* [http://www.onmyphd.com/?p=kkt.karush.kuhn.tucker Karush Kuhn Tucker Conditions]: a short note on their meaning with references to relevant wikipedia pages<br />
* [http://students.brown.edu/seeing-theory/ Seeing Theory]: a website where the basic concepts of probability and statistics are explained in a visual way.<br />
<br />
Python examples to better practice with numpy library<br />
* [https://github.com/Kyubyong/numpy_exercises Some numpy exercises], we did roughly 1, 2, 4, 6, 9, 10, 13<br />
* [https://github.com/rougier/numpy-100 Othen numpy exercises] from simple to complex<br />
* [https://www.w3resource.com/python-exercises/numpy/index-array.php More numpy exercises] from simple to complex<br />
<br />
===Year 2020/2021 Recordings (use at your own risk)===<br />
<br />
As I registered these due to pandemics, I am making them available. They DO NOT REPLACE THIS YEAR classroom lectures which are to be considered as the official material of this year, but they might be useful to double-check your notes.<br />
<br />
* 24/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
* 25/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] <br />
* 03/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off]<br />
* 04/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
* 10/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression]<br />
* 18/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression]<br />
* 25/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression]<br />
* 31/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment]<br />
* 01/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso]<br />
* 08/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression]<br />
* 14/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression]<br />
* 15/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis]<br />
* 29/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
* 06/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] <br />
* 12/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] <br />
* 13/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering]<br />
* 20/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering]<br />
* 27/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering]<br />
* 03/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation]<br />
* 04/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] <br />
<br />
Also, labs are available, however, the teaching assistant this year has changed.<br />
<br />
* 17/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
* 24/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
* 07/04/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
* 05/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
* 19/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
* 26/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
<br />
<!--<br />
===Past Exams and Sample Questions===<br />
For some samples of exams you can check the last year PAMI ones<br />
<br />
* [[Media:2016_02_03_PAMI.pdf |03/02/2016 PAMI Exam]]<br />
* [[Media:2016_02_19_PAMI.pdf |19/02/2016 PAMI Exam]]<br />
* [[Media:2016_07_06_PAMI.pdf |06/07/2016 PAMI Exam]]<br />
* [[Media:2016_09_09_PAMI.pdf |09/09/2016 PAMI Exam]]<br />
* [[Media:2016_09_28_PAMI.pdf |28/09/2016 PAMI Exam]]<br />
--><br />
===Online Resources===<br />
<br />
The following are links to online sources which might be useful to complement the material above<br />
* [https://towardsdatascience.com/linear-algebra-survival-kit-for-machine-learning-94901a62465e An Introduction to Linear Algebra] with numpy examples. It provides the very fundamental definitions, does not cover eigenvalues and eigenvectors.<br />
* [https://www.r-bloggers.com/in-depth-introduction-to-machine-learning-in-15-hours-of-expert-videos/ Statistical Learning MOOC] covering the entire ISL book offered by Trevor Hastie and Rob Tibshirani. Start anytime in self-paced mode.<br />
* [http://math.arizona.edu/~hzhang/math574m.html MATH 574M] University of Arizona Course on ''Statistical Machine Learning and Data Mining''; here you can find slides covering part of the course topics (the reference book for this course is again ''The Elements of Statistical Learning'')<br />
<br />
<!--<br />
== 2013-2014 Homework ==<br />
<br />
The 2013 Homework (alike the 2012 one) is organized as an octave series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
=== Part 1: Linear Classification Methods ===<br />
<br />
* [[Media:homework_pami_classification_2013_2014.pdf | Homework 2013-2014 on Classification]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 17/11 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
=== Part 2: Regression ===<br />
* [[Media:homework_pami_regression_2013_2014.pdf | Homework 2013-2014 Regression]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to malago@di.unimi.it (cc to matteo.matteucci@polimi.it) is Friday 20/12 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:diabete.mat | diabete.mat]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
For any question or doubt please sen us an email as soon as possible.<br />
<br />
'''Note 1:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
<strike>'''Note 2:''' rename the file Diabete.data into diabete.mat ... still fighting with the CSM :-)</strike><br />
<br />
'''Note 3:''' the code has been tested with octave under linux, we suggest to use it not to spend too much time with installing it under windows or using matlab. If you do not have linux installed, try using a live CD as the ubuntu 13.04 live distro ;-)<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at this post<br />
<br />
* [http://davide.eynard.it/2013/12/30/octave-clustering-demo-part-6-more-evaluation/ Homework 2013-2014 on clustering evaluation]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is the end of the course. You have to '''send it to davide.eynard_at_gmail.com Friday 24/01 23:59'''.<br />
<br />
'''Note 1:''' for any doubt or question send an email, as soon as possible, to Davide Eynard so to have a prompt reply and not get stuck during homework execution.<br />
<br />
'''Note 2:''' you have to turn in only the solution of "Ocatave clustering demo part 6", while the other parts can be used as reference to improve your understanding in basic clustering algorithms.<br />
<br />
=== Part 2: Classification ===<br />
<br />
* [[Media:homework_pami_classification_2013.pdf | Homework 2013 Classification]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 23/06 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
<br />
<br />
'''Errata Corrige''': there were a few bugs in the homework text. I have updated the pdf and they were:<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the Fisher projection it is more correct to use only the training data to learn the projection and then we can train and test on the corresponding subsets<br />
<br />
a = FisherProjection(X(training,:),Y(training,:));<br />
reducedX = X*a(:,1);<br />
[mu_0, mu_1, sigma, p_0, p_1] = linearDiscriminantAnalysis_train(reducedX(training), Y(training))<br />
<br />
I forgot to filter for just the training samples when performing Quadratic Discriminant Analysis<br />
<br />
quadX = expandToQuadraticSpace(X);<br />
%check this out!<br />
size(quadX)<br />
beta = linearRegression_train(quadX(training), Y(training));<br />
<br />
And in general you should always train on the training data and test on the testing data ;-).<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at these posts<br />
<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-4-k-medoids/ Homework 2013 on k-medoids]<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-5-hierarchical-clustering/ Homework 2013 on hierarchical clustering]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is '''before the you take the exam''' sending it to davide.eynard_at_gmail.com.<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3:] follow this tutorial and answer the questions from all 5 sub-tutorials.<br />
<br />
== 2012 Homework ==<br />
<br />
The Homework of 2012 organized like an octave/matlab series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
* [[Media:PAMI_homework_2012_1.pdf | Homework 2012 part 1]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to matteucci@elet.polimi.it and malago@elet.polimi.it is Tuesday 5/6 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
'''Note:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
* [[Media:PAMI_homework_2012_2.pdf | Homework 2012 part 2]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade; the deadline to submit the solution by email to matteucci@elet.polimi.it is the day before the exam you decide to attend''' (e.g., if you decide to take the exam on the 26/6 then you need to turn it in by 25/6).<br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Errata Corrige''': there were a few bugs a bug in the homework text. I have updated the pdf and they were:<br />
In the code for loading the data I forgot to remove the first column which you do not need<br />
data = dlmread('SAheart.data',',',1,1);<br />
X = data(:,1:9);<br />
Y = data(:,10);<br />
<br />
In the StratifiedSampling function the sorted verctors should be assigned<br />
% just an ahestetic sorting<br />
testing = sort(testing);<br />
training = sort(training);<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the expansion to quadratic space the starting index for the inner loop should i and not 1. Moreover in some cases it might be possible to have columns which are duplicated (e.g., with boolean attribute); in this case you should not need the robust version of linear regression.<br />
function extendedX = expandToQuadraticSpace(X)<br />
% adds new columns to extendedX; keeps X for other calculations<br />
extendedX = X;<br />
for i=1:size(X, 2)<br />
for j=i:size(X, 2)<br />
newColumn = X(:, i) .* X(:, j);<br />
extendedX = [extendedX newColumn];<br />
end<br />
end<br />
% remove duplicated columns<br />
duplicates = [];<br />
for i=1:size(extendedX, 2)<br />
for j=i+1:size(extendedX, 2)<br />
if(sum(extendedX(:,i)==extendedX(:,j)) == size(X,1))<br />
duplicates = [duplicates j];<br />
end<br />
end<br />
end<br />
extendedX(:,duplicates) = [];<br />
end<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3]: the third part of the homework is '''optional''', so you are not required to complete it. However, if you want to give it a try and use it to understand the topics covered by Davide Eynard in his lectures you are welcome. As usual, the questions in this homework are very close to the ones you will find in classworks, so we suggest to have a look at hose anyway! '''In case you decide to turn it in and have it contribute with a 10% to the grade, the deadline to submit the solution by email to matteucci@elet.polimi.it and davide.eynard@polimi.it is the day before you decide to take the exam''' (e.g., if you decide to take the exam on the 10/7 then you need to turn it in by 9/7)<br />
<br />
'''Note:''' homeworks are meant to let you see (and practice) a little bit with the topics presented during the course. They are evaluated because you spent some time on those and thus you deserve some credit for that ;-)<br />
<br />
== 2011 Homework ==<br />
<br />
Here you can find the homework for the year 2011 and the material you need to complete it. Please read the F.A.Q. below and for any unsolved doubt contact the teachers of the course.<br />
<br />
* [[Media:PAMI_homework_2011_v02.pdf | Homework 2011 v02]] a minor change in the signature of the logistic regression function<br />
* [[Media:PAMI_homework_2011_v01.pdf | Homework 2011 v01]] text with questions and exercises<br />
* [[Media:dataset.txt | Dataset]] for the clustering exercise in csv format<br />
<br />
'''Frequently Asked Questions'''<br />
<br />
* '''''How do I take the square root of a matrix?''''': check the diagonalization approach from [http://en.wikipedia.org/wiki/Square_root_of_a_matrix].<br />
<br />
* '''''How do I compute the chi square statistics?'''': in the slide there is a cut and paste error since e_ij=R_it*C_tj as described here [http://en.wikipedia.org/wiki/Pearson's_chi-square_test]<br />
<br />
* '''''When it is due? In which format?''''': The homework is due on the 29/06 and should be delivered by email. Send us (all the course teachers) the .m files in a zip archive attached to this email and a link to the pdf with the written part (not to flood our mailboxes). <br />
<br />
* '''''Can we do that in groups? How many people per group?''''': Yes, you can work on the homework in groups, but no more than 3 people per group are allowed. Put the names of all homework authors in the pdf and in all the .m files. If you discuss something with other people, w.r.t. the people in your group, point it out in the pdf file as well.<br />
<br />
* '''''Can we ask questions about the exercises or the code?''''': Yes you should! First of all, there might be unclear things in the exercise descriptions and those should be clarified as soon as possible for all (this is why the homework is versioned). But you could ask for help as well, our goal is to have you all solving all the questions and get a high grade ... but we will not do the homework on you behalf ;-)<br />
<br />
* '''''How the optional questions are graded?''''': They compensate for possible errors in the other questions; we suggest to work on them anyway to be sure you get the maximum grading.<br />
<br />
* '''''How the homework will be graded?''''': we are interested in understanding if you understood or not; thus we are not interested in the result, but we want to check how you get to the result. So please: 1) clarify all the assumptions and all the steps in your exercises 2) comment as much as possible your .m files!<br />
<br />
--></div>Matteohttps://chrome.deib.polimi.it/index.php?title=Machine_Learning_Bio&diff=3830Machine Learning Bio2022-05-03T16:39:56Z<p>Matteo: /* Detailed course schedule */</p>
<hr />
<div>__FORCETOC__<br />
<br />
The following are last-minute news you should be aware of ;-)<br />
* 02/05/2022: Changed deadline first homework -> 11/05/2022 at noon<br />
* 22/04/2022: The first homework is out!!!<br />
* 08/03/2022: Added material for the first lab<br />
* 06/03/2022: Slides from first lectures and last year's recordings updated <br />
* 23/02/2022: Lectures start today!<br />
<!--<br />
* 11/09/2021: Grade of the [[Media:ML2021-Grades_210911.pdf|Summer session + homeworks]] <br />
* 09/07/2021: Grade of the [[Media:ML2021-Grades_210624.pdf|24/06/2021 oral exams]] <br />
* 09/07/2021: Updated Homework + Oral [[Media:ML2021-Conversion.pdf|conversion table]]<br />
* 03/07/2021: Updated Homework available [[Media:ML2021-homework-new.zip|here!!!]]<br />
* 08/06/2021: Updated all videos and all slides from the course.<br />
* 02/06/2021: You can fin the 2020/2021 homework [[Media:ML2021-homework.zip|here!!!]]<br />
* 26/05/2021: The link to the form to request an instance of remote examination for June and July is [https://forms.office.com/r/FUrVt8eZNx here]!<br />
* 09/04/2021: From next week lectures will be back to presence (plus webex streaming)<br />
* 22/03/2021: Added completed material from the last lab plus some exercises ... <br />
* 17/03/2021: Added the material for the lab of today ... <br />
* 10/03/2021: 11/03/2021 lecture has been canceled<br />
* 06/03/2021: website update with linear algebra slides and (working) links to all lectures<br />
* 05/03/2021: Since today we are moved fully online so lectures will happen in my webex room (same holds for labs)<br />
* 24/02/2021: Lectures start today<br />
--><br />
<!--<br />
* 08/08/2020: Grading for all projects and first two calls [[Media:Grades_20200723.pdf|are here!!]] <br />
* 22/06/2020: Grading mechanism explained, check [[Media:ML2020_grading_system.pdf|here a handy recap]] <br />
* 14/06/2020: [[Media:ML2020_homework.zip |Here it come the 2020 homework!!!]]<br />
* 03/06/2020: All slides updated<br />
* 02/05/2020: Updated course schedule and added videos to the previous lectures<br />
* 04/04/2020: Updated schedule and added videos of previous lectures<br />
* 31/03/2020: Updated schedule and added material on linear algebra<br />
* 19/03/2020: Added lab material, both with empty notebooks and final result<br />
* 11/03/2020: Added today's lecture videos and planned next week schedule (To Be Completed)<br />
* 11/03/2020: The course starts today!<br />
* 03/03/2020: The course is going to start soon ...<br />
--><br />
<br />
==Course Aim & Organization==<br />
<br />
The objective of the Machine Learning course is to give an in-depth presentation of the techniques most used for pattern recognition, knowledge discovery, and data analysis/modeling. These techniques are presented both from a theoretical (i.e., statistics and information theory) perspective and a practical one (i.e., coding examples) through the descriptions of algorithms and their implementations in a general-purpose programming language (i.e., python).<br />
<br />
The course presents the classical supervised and unsupervised learning paradigms described and discussed presenting regression, classification, and clustering problems in Bioinformatics. The course is composed of a set of lectures on specific machine learning techniques (e.g., generalized linear regression, logistic regression, linear and quadratic discriminant analysis, support vector machines, k-nearest-neighborhood, clustering, etc.) preceded by the introduction of the Statistical Learning framework which acts as a common reference framework for the entire course.<br />
<br />
===Teachers===<br />
<br />
The course is composed of a blending of lectures and exercises by the course teacher and a teaching assistant.<br />
<br />
* [http://www.deib.polimi.it/ita/personale/dettagli/267262 Matteo Matteucci]: the course teacher <br />
* [https://www.deib.polimi.it/ita/personale/dettagli/1638984 Stefano Samele]: the teaching assistant <br />
<br />
===Course Program===<br />
<br />
The course mostly follows the following book which is also available for download in pdf<br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani<br />
<br />
The course lectures will present the theory and practice of the following:<br />
* Machine Learning and Pattern Classification: the general concepts of Machine Learning and Pattern Recognition are introduced within the framework of Statistical Decision Theory with reference to the bias-variance trade-off and the Bayes classifier;<br />
* Generalized Linear Regression: linear methods for regression will be presented and discussed introducing different techniques (e.g., Linear Regression, Ridge Regression, K-Nearest Neighbors Regression, Non-Linear Regression, etc.) and the most common methodologies for model validation and selection (e.g., AIC, BIC, cross-validation, stepwise feature selection, Lasso, etc.).<br />
* Linear and Non-Linear Classification: generative and discriminative techniques for classification will be described and discussed (e.g., Logistic Regression, Linear and Quadratic Discriminant Analysis, K-Nearest Neighbors, Perceptron Rule, and Support Vector Machines, etc.). Metrics for classifiers evaluation and comparison are presented in this part of the course (e.g., accuracy, precision, recall, ROC, AUC, F-measure, Matthew coefficient).<br />
* Unsupervised Learning: the most common approaches to unsupervised learning are described mostly focusing on clustering methods such as hierarchical clustering, k-means, k-medoids, Mixture of Gaussians, DBSCAN, etc<br />
<br />
These topics will be presented both from a theoretical perspective and a practical one via implementations in the general-purpose programming language python.<br />
<br />
===Detailed course schedule===<br />
<br />
A detailed schedule of the course can be found here; topics are just indicative while days and teachers are correct up to some last-minute change (I will notify you by email). Please note that not all days we have lectures!!<br />
<br />
Note: Lecture timetable interpretation<br />
* On Wednesday, in room 26.02, starts at 15:15 (cum tempore), ends at 18:15<br />
* On Thursday, in room 26.01, starts at 12:15 (cum tempore), ends at 14:15<br />
<br />
<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|23/02/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Machine Learning Intro<br />
|-<br />
|24/02/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Statistical Learning Theory (Ch. 1 ISL)<br />
|-<br />
|02/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Statistical Learning Theory - Bias/Variance Trade-off (Ch. 2 ISL)<br />
|-<br />
|03/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Introduction to Linear Algebra<br />
|-<br />
|09/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Python + Numpy + Bias/Variance<br />
|-<br />
|10/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Simple Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|16/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Multi Variate Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|17/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL) <br />
|-<br />
|23/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Multivariate Linear Regression Laboratory<br />
|-<br />
|24/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Generalized Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|30/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Feature Selection and Model Assessment (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|31/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Ridge Regression and Lasso (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|06/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Generalized Linear Regression and Feature Selection Laboratory<br />
|-<br />
|07/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: KNN and Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|13/04/2022 || Wednesday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|14/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|20/04/2022 || Wednesday || 15:15-18:15 || 26.02 ||Matteo Matteucci || Lecture || Classification: Linear Discriminanr Analysis (Ch. 4 ISL)<br />
|-<br />
|21/04/2022 || Thursday || 12:15 - 14:15 || 26.01 || Matteo Matteucci || Lecture || Evaluation methods for classification<br />
|-<br />
|27/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Logistic Regression and LDA Laboratory<br />
|-<br />
|28/04/2022 || Thursday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|04/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || The Perceptron (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|06/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL) <br />
|-<br />
|11/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Unsupervised Learning and Clustering (Ch. 10 ISL)<br />
|-<br />
|12/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Clustering (Ch. 10 ISL)<br />
|-<br />
|18/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || SVM and Classifiers Evaluation Laboratory<br />
|-<br />
|19/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|25/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Clustering Laboratory<br />
|-<br />
|26/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|01/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Clustering Evaluation<br />
|-<br />
|02/06/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|08/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Principal Component Analysis (Ch. 10 ISL)<br />
|}<br />
<br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|24/02/2021 || Wednesday || 15:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
|-<br />
|25/02/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] (Ch. 1 ISL)<br />
|-<br />
|03/03/2021 || Wednesday || 14:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off] (Ch. 2 ISL)<br />
|-<br />
|04/03/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
|-<br />
|10/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|11/03/2021 || Thursday || --- || --- || --- || ---|| --- No lecture ---<br />
|-<br />
|17/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
|-<br />
|18/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|24/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
|-<br />
|25/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|31/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|01/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|07/04/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
|-<br />
|08/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|14/04/2021 || Wednesday || '''15:15-18:15''' || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|15/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis] (Ch. 4 ISL)<br />
|-<br />
|22/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|23/04/2021 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|28/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|29/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
|-<br />
|05/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
|-<br />
|06/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|12/05/2021 || Wednesday || 14:15-18:15 || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|13/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering] (Ch. 10 ISL)<br />
|-<br />
|19/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
|-<br />
|20/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering] (Ch. 10 ISL)<br />
|-<br />
|26/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
|-<br />
|27/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering] (Ch. 10 ISL)<br />
|-<br />
|02/06/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|03/06/2021 || Thursday || 08:15-11:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|04/06/2021 || Friday || 14:15-17:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|11/03/2020 || Wednesday || 14:15 - 18:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3565a411-bed7-4b20-9dd6-00ee8b9ddd54 Course Introduction], [https://web.microsoftstream.com/video/4a702565-386d-4bed-a0c1-9d1daa015703 Introduction to Machine Learning], and [https://web.microsoftstream.com/video/cef9a912-ee47-4254-8f26-318a6a014424 Statistical Machine Learning] (Ch. 1 ISL)<br />
|-<br />
|12/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/389145d3-c3e5-48c2-bf82-d7877bf14b8c Statistical Decision Theory and Bias-Variance trade off] (Ch. 2 ISL)<br />
|-<br />
|18/03/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/bb2155d6-a6f2-4f82-af48-3ceb22951c4b Python + Numpy + Bias/Variance] Laboratory<br />
|-<br />
|19/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b0359dad-971c-412d-8508-fde45e1dc3fe Statistical Decision Theory and Bias-Variance trade off (continued)] (Ch. 2 ISL)<br />
|-<br />
|25/03/2017 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f88827c9-0994-4d3f-80bf-1c9b6637ba18 Simple Linear Regression and Multivariate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|26/03/2017 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/deb2b3f5-d90d-47b8-b309-1ab88979f805 Multivariate Linear Regression (continued)] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|01/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/da0e35db-6995-412a-99ad-f409f0a6752d Multivariae Linear Regression (Part 1)] [https://web.microsoftstream.com/video/8defdff7-ae83-4753-a353-3d39194e63ac (Part 2)] Laboratory<br />
|-<br />
|02/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/c81f59c8-7023-4206-a771-8be062b7cb21 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|08/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/0255cfa0-98de-4465-a8bf-07c93e0974ee Issues with Linear Regression and Generalized Linear Regression] and [https://web.microsoftstream.com/video/e3392148-f1ee-426d-a271-3d8fcf11008a Feature Selection] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|09/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/03656a6b-46c7-483e-9263-0036144adb00 Feature Selection (continued)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|15/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/58093db6-f365-4184-8ce0-c12c03a1589f Generalized Linear Regression and Feature Selection (Part1)] [https://web.microsoftstream.com/video/52b0d7f5-a725-4406-aab3-3be5145d950f (Part 2)] Laboratory<br />
|-<br />
|16/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1565c508-4448-4678-a9e4-4ff411684227 Feature Selection (LASSO)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|22/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d04083a9-8961-4448-bcf2-0576d9dccf4c Classification by KNN (Part 1)] and [https://web.microsoftstream.com/video/c56ef675-486a-425c-819d-404868e07906 Logistic Regression (Part 2)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|23/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3a5f66b1-80d2-4ee5-ba14-7757ae662c97 Classification by Logistic Regression (continued)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|29/04/2020 || Wednesday || 14:15 - 17:15 || --- || --- || --- || --- No Lecture (Laurea) ---<br />
|-<br />
|30/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/a171bc2a-35e7-42c7-bdd0-d295ecfd7e26 Classification by Linear Discriminant Analysis] (Ch. 4 ISL)<br />
|-<br />
|06/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/cef18863-e3fd-481e-bcad-a18455796fd7 Classification via Logistic Regression, and LDA Laboratory (Part 1)] and [https://web.microsoftstream.com/video/670b7f72-5b6b-4168-9f1c-211a9ad25f48 (Part 2)]<br />
|-<br />
|07/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b2ed8ca0-c0c0-4c1a-836d-b2ffee20d85e Evaluation Methods for Classification]<br />
|-<br />
|13/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/2b881d7d-d11e-4432-8873-973bc36eeb61 Perceptron Learning] and [https://web.microsoftstream.com/video/00564932-919a-49a1-9fa5-eb7706640781 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|14/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b72fa8de-f98d-43cf-9609-5833625a4b5c Support Vector Machines and Kernel Trick] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|20/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/fab1f62e-cea0-4cc9-9366-0ccd6bcd161b Classification (SVM and classifiers evaluation) Laboratory (Part 1)] and [https://web.microsoftstream.com/video/130b806d-5390-4321-9d05-f63e079f30a1 (Part 2)]<br />
|-<br />
|21/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1125b85e-f4a1-49d1-991f-333fff893a1e Introduction to Unsupervised Learning] (Ch. 10 ISL)<br />
|-<br />
|27/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d8d0efb5-adfb-4376-afe3-26afb7ffd664 Clustering: Hierachical, k-means, and DBSCAN (Part 1)] and [https://web.microsoftstream.com/video/b7307896-bff7-4fd0-973f-d37fd7f91e13 (Part 2)] (Ch. 10 ISL)<br />
|-<br />
|28/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3f2975c2-1143-4870-8aed-a1a06382be14 Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|03/06/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/0fa04b48-f8c3-488b-bfab-92547d3a9c38 Clustering Laboratory (Part 1)] and [https://web.microsoftstream.com/video/24a40515-afdd-4cca-9b62-19e544c7e12e (Part 2)]<br />
|-<br />
|04/06/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f58132ba-afd3-47ce-89c8-ba16782d8f37 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
|-<br />
|27/11/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Classification by Linear Discriminant Analysis (Ch. 4 ISL)<br />
|-<br />
|03/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Exercises on Classification by Linear Discriminant Analysis<br />
|-<br />
|04/12/2017 || Tuesday || --- || --- || --- || No Lecture <br />
|-<br />
|10/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Clustering: Intro, k-means and the alike, GMM, and hierachical<br />
|-<br />
|11/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Davide Eynard || Clustering: Density-based, Spectral + Evaluation<br />
|-<br />
|14/12/2017 || Friday || 10:15 - 13:15 || TBD || Matteo Matteucci || Classification: from generative to discriminative approaches (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|17/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|18/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|}<br />
--><br />
Chapters are intended as complete except for<br />
* Ch.4 ESL: Section 4.5<br />
* Ch.12 ESL: Sections 12.1, 12.2, 12.3<br />
* Ch.9 ISL: Sections 9.1, 9.2, 9.3<br />
<br />
===Course Evaluation===<br />
<br />
The course evaluation is composed by two parts:<br />
<br />
* HW: Homework with exercises covering the whole program (up to 6 points)<br />
* OR: An oral discussion covering the whole program (up to 26 points)<br />
<br />
the final score will be the sum of HW (not compulsory) and OR scores. You will get the oral grade as a mark in the scale of 30 up to 32/30 which you have to multiply by 0.8125 and then you add to it the score of the project. For your convenience here it is [[Media:ML2021-Conversion.pdf|a conversion table]] with the final mark in case you do not turn in the project or you get the whole 6 marks in the project.<br />
<br />
====Homework #1 2021/2022====<br />
<br />
The first project asks you to develop a regression model on the [[Media:ML-2122-HW1.zip | Forest Fires Data Set]]. The goal of the model is to predict, given a set of features the burned area of forest fires. The project should focus on investigating the part of features selection for the regression task to understand the relationships between the different variables involved fully. <br />
An accurate and helpful description of the dataset is included in the forestfire.names file.<br />
<br />
The project should consist of an executable python notebook, sufficiently commented. Most of the cells should be adequately followed or preceded by an explanation of what you are doing, why, what the output is, how you interpret it, and so on.<br />
<br />
You can submit your notebook via email at stefano.samele@polimi.it. The deadline is 11/05/22 at midday CET.<br />
The notebook should already display all the cells' outputs. A copy and a re-execution will be performed to evaluate your work: we need to be sure your code is actually executable and displays consistent results.<br />
<br />
You can attend the project in a group of maximum two. Scores (0-1-2, with half points) will be assigned based on the ability to organize the investigation and the code, adopt relevant methodologies presented during laboratories, understand and interpret results, and comply with project requests.<br />
<br />
==Teaching Material (the textbook)== <br />
<br />
Lectures will be based on material taken from the book. <br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani<br />
<br />
If you are interested in a more deep treatment of the topics you can refer to the following book from the same authors<br />
<br />
* [http://www-stat.stanford.edu/~tibs/ElemStatLearn/index.html The Elements of Statistical Learning: Data Mining, Inference, and Prediction.] by Trevor Hastie, Robert Tibshirani, and Jerome Friedman.<br />
<br />
Some additional material that could be used to prepare the oral examination will be provided together with the past homeworks.<br />
<br />
===Teacher Slides ===<br />
<br />
In the following you can find the lecture slides used by the teacher and the teaching assistants during classes.<br />
<br />
* [[Media:ML-2020-A0-LinearAlgebraBasics.pdf | [2020/2021] Linear Algebra Basics]]: Basic elements of linear algebra, e.g., vectors, matrices, basis, span, etc.<br />
* [[Media:ML-2122-00-Intro.pdf | [2021/2022] Course introduction]]: introductory slides of the course with useful information about the grading, and the course logistics. Some examples from supervised and unsupervised learning. Regression, classification, clustering terminology and examples.<br />
* [[Media:ML-2122-01-StatisticalLearning.pdf | [2021/2022] Statistical Learning Introduction]]: Statistical Learning definition, rationale, and trade-offs (e.g., prediction vs. inference, parametric vs non parametric models, flexibility vs. interpretability, etc.)<br />
* [[Media:ML-2122-02-LinearRegression.pdf | [2021/2022] Linear Regression]]: Simple Linear Regression and Multiple Linear Regression. Generalized Linear models. Cross-validation techniques. Feature selection. Ridge Regression and Lasso.<br />
* [[Media:ML-2021-03-LinearClassification.pdf | [2020/2021] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods. Discriminative vs. generative methods. Support Vector Machines. <br />
* [[Media:ML-2021-04-Clustering.pdf | [2020/2021] Clustering]]: Introduction to unsupervised learning and clustering, hierarchical clustering, k-means, DBSCNA, indexes for clustering evaluation. <br />
* [[Media:ML-2021-05-PrincipalComponentAnalysis.pdf | [2020/2021] Principal Component Analysis]]: Principal Component Analysis, Geometric Interpretation, Singular Values Decomposition.<br />
<br />
===Laboratories===<br />
<br />
We will use Python (with Jupyter notebooks) throughout the course, thus we kindly ask you to install the "Anaconda" package to be ready for the labs. Here are the [https://www.anaconda.com/products/individual download links]. You can find a simple Jupyter notebook [[Media:ML2021-test.zip | HERE]] to test if the installation succeeded.<br />
<br />
To open the notebook<br />
* launch the "Anaconda Navigator" app<br />
* launch the "jupyter Notebook" app within the navigator, it should automatically open a webpage (it may take a while)<br />
* on the webpage, navigate on the folder where you downloaded the "lab01.00-TestEnvironment.ipynb" file, and press on the file to open it<br />
* then follow the instruction within the notebook<br />
<br />
If you didn't install anaconda but just jupyter, or if you can't find Anaconda Navigator <br />
* open a shell ("Anaconda Prompt" if you are using Windows)<br />
* move on to the folder where you downloaded "lab01.00-TestEnvironment.ipynb"<br />
* run the "jupyter notebook" command, it should automatically open a webpage<br />
* then on the webpage press on the "lab01.00-TestEnvironment.ipynb" file and follow the instructions within the notebook<br />
<br />
The following are the notebook used in the labs:<br />
*[[Media:ML2122-lab01.zip | [2021/2022] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session including the testing environment ([[Media:ML2122-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab02.zip | [2021/2022] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2122-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab03.zip | [2021/2022] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2122-lab03_solutions_part1.zip |complete version]])<br />
*[[Media:ML2122-lab04.zip | [2021/2022] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2122-lab04_solutions.zip |complete version]])<br />
<!--<br />
*[[Media:ML2021-lab01.zip | [2020/2021] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session ([[Media:ML2021-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab02.zip | [2020/2021] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2021-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab03.zip | [2020/2021] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2021-lab03_solutions_tmp.zip |complete version]])<br />
*[[Media:ML2021-lab04.zip | [2020/2021] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab04_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab05.zip | [2020/2021] Material for the fifth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab05_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab06.zip | [2020/2021] Material for the sixth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab06_solutions.zip |complete version]])<br />
--><br />
<!--<br />
* [[Media:ML-2016-03-AssessingModelAccuracy.pdf | [2016] Statistical Learning and Model Assessment]]: Model Assessment for Regression and Classification, Bias-Variance trade-off, Model complexity and overfitting, K-Nearest Neighbors Classifier vs. Bayes Classifier.<br />
* [[Media:ML-2016-05-LinearClassification.pdf | [2016] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods.<br />
* [[Media:ML-2016-06-SupportVectorMachines.pdf | [2016] Support Vector Machines]]: Discriminative vs. generative methids. Hyperplanes learning and Perceptron. Maximum Margin Classifiers. The Kernel trick and Support Vector Machines.<br />
For exercises and lab material please refer to [http://davide.eynard.it/pattern-analysis-and-machine-intelligence-2015-2016/ Davide Eynard website].<br />
--><br />
<br />
===Additional Resources===<br />
Papers and links useful to integrate the textbook<br />
<br />
* [http://www.ekof.bg.ac.rs/wp-content/uploads/2016/09/Ponavljanje-matematike-Wayne-Winston-Operations-Research-Applications-and-Algorithms-4-edition.pdf Basic Linear Algebra]: "Basic Linear Algebra" chapter from Wayne Winston book "Operations Research Applications and Algorithms (4th ed.)"<br />
* [http://scott.fortmann-roe.com/docs/BiasVariance.html Bias vs. Variance]: "Understanding the Bias-Variance Tradeoff" essay by Scott Fortmann-Roe<br />
* [http://www.onmyphd.com/?p=kkt.karush.kuhn.tucker Karush Kuhn Tucker Conditions]: a short note on their meaning with references to relevant wikipedia pages<br />
* [http://students.brown.edu/seeing-theory/ Seeing Theory]: a website where the basic concepts of probability and statistics are explained in a visual way.<br />
<br />
Python examples to better practice with numpy library<br />
* [https://github.com/Kyubyong/numpy_exercises Some numpy exercises], we did roughly 1, 2, 4, 6, 9, 10, 13<br />
* [https://github.com/rougier/numpy-100 Othen numpy exercises] from simple to complex<br />
* [https://www.w3resource.com/python-exercises/numpy/index-array.php More numpy exercises] from simple to complex<br />
<br />
===Year 2020/2021 Recordings (use at your own risk)===<br />
<br />
As I registered these due to pandemics, I am making them available. They DO NOT REPLACE THIS YEAR classroom lectures which are to be considered as the official material of this year, but they might be useful to double-check your notes.<br />
<br />
* 24/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
* 25/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] <br />
* 03/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off]<br />
* 04/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
* 10/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression]<br />
* 18/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression]<br />
* 25/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression]<br />
* 31/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment]<br />
* 01/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso]<br />
* 08/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression]<br />
* 14/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression]<br />
* 15/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis]<br />
* 29/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
* 06/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] <br />
* 12/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] <br />
* 13/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering]<br />
* 20/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering]<br />
* 27/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering]<br />
* 03/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation]<br />
* 04/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] <br />
<br />
Also, labs are available, however, the teaching assistant this year has changed.<br />
<br />
* 17/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
* 24/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
* 07/04/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
* 05/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
* 19/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
* 26/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
<br />
<!--<br />
===Past Exams and Sample Questions===<br />
For some samples of exams you can check the last year PAMI ones<br />
<br />
* [[Media:2016_02_03_PAMI.pdf |03/02/2016 PAMI Exam]]<br />
* [[Media:2016_02_19_PAMI.pdf |19/02/2016 PAMI Exam]]<br />
* [[Media:2016_07_06_PAMI.pdf |06/07/2016 PAMI Exam]]<br />
* [[Media:2016_09_09_PAMI.pdf |09/09/2016 PAMI Exam]]<br />
* [[Media:2016_09_28_PAMI.pdf |28/09/2016 PAMI Exam]]<br />
--><br />
===Online Resources===<br />
<br />
The following are links to online sources which might be useful to complement the material above<br />
* [https://towardsdatascience.com/linear-algebra-survival-kit-for-machine-learning-94901a62465e An Introduction to Linear Algebra] with numpy examples. It provides the very fundamental definitions, does not cover eigenvalues and eigenvectors.<br />
* [https://www.r-bloggers.com/in-depth-introduction-to-machine-learning-in-15-hours-of-expert-videos/ Statistical Learning MOOC] covering the entire ISL book offered by Trevor Hastie and Rob Tibshirani. Start anytime in self-paced mode.<br />
* [http://math.arizona.edu/~hzhang/math574m.html MATH 574M] University of Arizona Course on ''Statistical Machine Learning and Data Mining''; here you can find slides covering part of the course topics (the reference book for this course is again ''The Elements of Statistical Learning'')<br />
<br />
<!--<br />
== 2013-2014 Homework ==<br />
<br />
The 2013 Homework (alike the 2012 one) is organized as an octave series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
=== Part 1: Linear Classification Methods ===<br />
<br />
* [[Media:homework_pami_classification_2013_2014.pdf | Homework 2013-2014 on Classification]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 17/11 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
=== Part 2: Regression ===<br />
* [[Media:homework_pami_regression_2013_2014.pdf | Homework 2013-2014 Regression]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to malago@di.unimi.it (cc to matteo.matteucci@polimi.it) is Friday 20/12 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:diabete.mat | diabete.mat]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
For any question or doubt please sen us an email as soon as possible.<br />
<br />
'''Note 1:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
<strike>'''Note 2:''' rename the file Diabete.data into diabete.mat ... still fighting with the CSM :-)</strike><br />
<br />
'''Note 3:''' the code has been tested with octave under linux, we suggest to use it not to spend too much time with installing it under windows or using matlab. If you do not have linux installed, try using a live CD as the ubuntu 13.04 live distro ;-)<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at this post<br />
<br />
* [http://davide.eynard.it/2013/12/30/octave-clustering-demo-part-6-more-evaluation/ Homework 2013-2014 on clustering evaluation]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is the end of the course. You have to '''send it to davide.eynard_at_gmail.com Friday 24/01 23:59'''.<br />
<br />
'''Note 1:''' for any doubt or question send an email, as soon as possible, to Davide Eynard so to have a prompt reply and not get stuck during homework execution.<br />
<br />
'''Note 2:''' you have to turn in only the solution of "Ocatave clustering demo part 6", while the other parts can be used as reference to improve your understanding in basic clustering algorithms.<br />
<br />
=== Part 2: Classification ===<br />
<br />
* [[Media:homework_pami_classification_2013.pdf | Homework 2013 Classification]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 23/06 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
<br />
<br />
'''Errata Corrige''': there were a few bugs in the homework text. I have updated the pdf and they were:<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the Fisher projection it is more correct to use only the training data to learn the projection and then we can train and test on the corresponding subsets<br />
<br />
a = FisherProjection(X(training,:),Y(training,:));<br />
reducedX = X*a(:,1);<br />
[mu_0, mu_1, sigma, p_0, p_1] = linearDiscriminantAnalysis_train(reducedX(training), Y(training))<br />
<br />
I forgot to filter for just the training samples when performing Quadratic Discriminant Analysis<br />
<br />
quadX = expandToQuadraticSpace(X);<br />
%check this out!<br />
size(quadX)<br />
beta = linearRegression_train(quadX(training), Y(training));<br />
<br />
And in general you should always train on the training data and test on the testing data ;-).<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at these posts<br />
<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-4-k-medoids/ Homework 2013 on k-medoids]<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-5-hierarchical-clustering/ Homework 2013 on hierarchical clustering]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is '''before the you take the exam''' sending it to davide.eynard_at_gmail.com.<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3:] follow this tutorial and answer the questions from all 5 sub-tutorials.<br />
<br />
== 2012 Homework ==<br />
<br />
The Homework of 2012 organized like an octave/matlab series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
* [[Media:PAMI_homework_2012_1.pdf | Homework 2012 part 1]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to matteucci@elet.polimi.it and malago@elet.polimi.it is Tuesday 5/6 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
'''Note:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
* [[Media:PAMI_homework_2012_2.pdf | Homework 2012 part 2]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade; the deadline to submit the solution by email to matteucci@elet.polimi.it is the day before the exam you decide to attend''' (e.g., if you decide to take the exam on the 26/6 then you need to turn it in by 25/6).<br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Errata Corrige''': there were a few bugs a bug in the homework text. I have updated the pdf and they were:<br />
In the code for loading the data I forgot to remove the first column which you do not need<br />
data = dlmread('SAheart.data',',',1,1);<br />
X = data(:,1:9);<br />
Y = data(:,10);<br />
<br />
In the StratifiedSampling function the sorted verctors should be assigned<br />
% just an ahestetic sorting<br />
testing = sort(testing);<br />
training = sort(training);<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the expansion to quadratic space the starting index for the inner loop should i and not 1. Moreover in some cases it might be possible to have columns which are duplicated (e.g., with boolean attribute); in this case you should not need the robust version of linear regression.<br />
function extendedX = expandToQuadraticSpace(X)<br />
% adds new columns to extendedX; keeps X for other calculations<br />
extendedX = X;<br />
for i=1:size(X, 2)<br />
for j=i:size(X, 2)<br />
newColumn = X(:, i) .* X(:, j);<br />
extendedX = [extendedX newColumn];<br />
end<br />
end<br />
% remove duplicated columns<br />
duplicates = [];<br />
for i=1:size(extendedX, 2)<br />
for j=i+1:size(extendedX, 2)<br />
if(sum(extendedX(:,i)==extendedX(:,j)) == size(X,1))<br />
duplicates = [duplicates j];<br />
end<br />
end<br />
end<br />
extendedX(:,duplicates) = [];<br />
end<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3]: the third part of the homework is '''optional''', so you are not required to complete it. However, if you want to give it a try and use it to understand the topics covered by Davide Eynard in his lectures you are welcome. As usual, the questions in this homework are very close to the ones you will find in classworks, so we suggest to have a look at hose anyway! '''In case you decide to turn it in and have it contribute with a 10% to the grade, the deadline to submit the solution by email to matteucci@elet.polimi.it and davide.eynard@polimi.it is the day before you decide to take the exam''' (e.g., if you decide to take the exam on the 10/7 then you need to turn it in by 9/7)<br />
<br />
'''Note:''' homeworks are meant to let you see (and practice) a little bit with the topics presented during the course. They are evaluated because you spent some time on those and thus you deserve some credit for that ;-)<br />
<br />
== 2011 Homework ==<br />
<br />
Here you can find the homework for the year 2011 and the material you need to complete it. Please read the F.A.Q. below and for any unsolved doubt contact the teachers of the course.<br />
<br />
* [[Media:PAMI_homework_2011_v02.pdf | Homework 2011 v02]] a minor change in the signature of the logistic regression function<br />
* [[Media:PAMI_homework_2011_v01.pdf | Homework 2011 v01]] text with questions and exercises<br />
* [[Media:dataset.txt | Dataset]] for the clustering exercise in csv format<br />
<br />
'''Frequently Asked Questions'''<br />
<br />
* '''''How do I take the square root of a matrix?''''': check the diagonalization approach from [http://en.wikipedia.org/wiki/Square_root_of_a_matrix].<br />
<br />
* '''''How do I compute the chi square statistics?'''': in the slide there is a cut and paste error since e_ij=R_it*C_tj as described here [http://en.wikipedia.org/wiki/Pearson's_chi-square_test]<br />
<br />
* '''''When it is due? In which format?''''': The homework is due on the 29/06 and should be delivered by email. Send us (all the course teachers) the .m files in a zip archive attached to this email and a link to the pdf with the written part (not to flood our mailboxes). <br />
<br />
* '''''Can we do that in groups? How many people per group?''''': Yes, you can work on the homework in groups, but no more than 3 people per group are allowed. Put the names of all homework authors in the pdf and in all the .m files. If you discuss something with other people, w.r.t. the people in your group, point it out in the pdf file as well.<br />
<br />
* '''''Can we ask questions about the exercises or the code?''''': Yes you should! First of all, there might be unclear things in the exercise descriptions and those should be clarified as soon as possible for all (this is why the homework is versioned). But you could ask for help as well, our goal is to have you all solving all the questions and get a high grade ... but we will not do the homework on you behalf ;-)<br />
<br />
* '''''How the optional questions are graded?''''': They compensate for possible errors in the other questions; we suggest to work on them anyway to be sure you get the maximum grading.<br />
<br />
* '''''How the homework will be graded?''''': we are interested in understanding if you understood or not; thus we are not interested in the result, but we want to check how you get to the result. So please: 1) clarify all the assumptions and all the steps in your exercises 2) comment as much as possible your .m files!<br />
<br />
--></div>Matteohttps://chrome.deib.polimi.it/index.php?title=Machine_Learning_Bio&diff=3829Machine Learning Bio2022-05-02T11:14:10Z<p>Matteo: </p>
<hr />
<div>__FORCETOC__<br />
<br />
The following are last-minute news you should be aware of ;-)<br />
* 02/05/2022: Changed deadline first homework -> 11/05/2022 at noon<br />
* 22/04/2022: The first homework is out!!!<br />
* 08/03/2022: Added material for the first lab<br />
* 06/03/2022: Slides from first lectures and last year's recordings updated <br />
* 23/02/2022: Lectures start today!<br />
<!--<br />
* 11/09/2021: Grade of the [[Media:ML2021-Grades_210911.pdf|Summer session + homeworks]] <br />
* 09/07/2021: Grade of the [[Media:ML2021-Grades_210624.pdf|24/06/2021 oral exams]] <br />
* 09/07/2021: Updated Homework + Oral [[Media:ML2021-Conversion.pdf|conversion table]]<br />
* 03/07/2021: Updated Homework available [[Media:ML2021-homework-new.zip|here!!!]]<br />
* 08/06/2021: Updated all videos and all slides from the course.<br />
* 02/06/2021: You can fin the 2020/2021 homework [[Media:ML2021-homework.zip|here!!!]]<br />
* 26/05/2021: The link to the form to request an instance of remote examination for June and July is [https://forms.office.com/r/FUrVt8eZNx here]!<br />
* 09/04/2021: From next week lectures will be back to presence (plus webex streaming)<br />
* 22/03/2021: Added completed material from the last lab plus some exercises ... <br />
* 17/03/2021: Added the material for the lab of today ... <br />
* 10/03/2021: 11/03/2021 lecture has been canceled<br />
* 06/03/2021: website update with linear algebra slides and (working) links to all lectures<br />
* 05/03/2021: Since today we are moved fully online so lectures will happen in my webex room (same holds for labs)<br />
* 24/02/2021: Lectures start today<br />
--><br />
<!--<br />
* 08/08/2020: Grading for all projects and first two calls [[Media:Grades_20200723.pdf|are here!!]] <br />
* 22/06/2020: Grading mechanism explained, check [[Media:ML2020_grading_system.pdf|here a handy recap]] <br />
* 14/06/2020: [[Media:ML2020_homework.zip |Here it come the 2020 homework!!!]]<br />
* 03/06/2020: All slides updated<br />
* 02/05/2020: Updated course schedule and added videos to the previous lectures<br />
* 04/04/2020: Updated schedule and added videos of previous lectures<br />
* 31/03/2020: Updated schedule and added material on linear algebra<br />
* 19/03/2020: Added lab material, both with empty notebooks and final result<br />
* 11/03/2020: Added today's lecture videos and planned next week schedule (To Be Completed)<br />
* 11/03/2020: The course starts today!<br />
* 03/03/2020: The course is going to start soon ...<br />
--><br />
<br />
==Course Aim & Organization==<br />
<br />
The objective of the Machine Learning course is to give an in-depth presentation of the techniques most used for pattern recognition, knowledge discovery, and data analysis/modeling. These techniques are presented both from a theoretical (i.e., statistics and information theory) perspective and a practical one (i.e., coding examples) through the descriptions of algorithms and their implementations in a general-purpose programming language (i.e., python).<br />
<br />
The course presents the classical supervised and unsupervised learning paradigms described and discussed presenting regression, classification, and clustering problems in Bioinformatics. The course is composed of a set of lectures on specific machine learning techniques (e.g., generalized linear regression, logistic regression, linear and quadratic discriminant analysis, support vector machines, k-nearest-neighborhood, clustering, etc.) preceded by the introduction of the Statistical Learning framework which acts as a common reference framework for the entire course.<br />
<br />
===Teachers===<br />
<br />
The course is composed of a blending of lectures and exercises by the course teacher and a teaching assistant.<br />
<br />
* [http://www.deib.polimi.it/ita/personale/dettagli/267262 Matteo Matteucci]: the course teacher <br />
* [https://www.deib.polimi.it/ita/personale/dettagli/1638984 Stefano Samele]: the teaching assistant <br />
<br />
===Course Program===<br />
<br />
The course mostly follows the following book which is also available for download in pdf<br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani<br />
<br />
The course lectures will present the theory and practice of the following:<br />
* Machine Learning and Pattern Classification: the general concepts of Machine Learning and Pattern Recognition are introduced within the framework of Statistical Decision Theory with reference to the bias-variance trade-off and the Bayes classifier;<br />
* Generalized Linear Regression: linear methods for regression will be presented and discussed introducing different techniques (e.g., Linear Regression, Ridge Regression, K-Nearest Neighbors Regression, Non-Linear Regression, etc.) and the most common methodologies for model validation and selection (e.g., AIC, BIC, cross-validation, stepwise feature selection, Lasso, etc.).<br />
* Linear and Non-Linear Classification: generative and discriminative techniques for classification will be described and discussed (e.g., Logistic Regression, Linear and Quadratic Discriminant Analysis, K-Nearest Neighbors, Perceptron Rule, and Support Vector Machines, etc.). Metrics for classifiers evaluation and comparison are presented in this part of the course (e.g., accuracy, precision, recall, ROC, AUC, F-measure, Matthew coefficient).<br />
* Unsupervised Learning: the most common approaches to unsupervised learning are described mostly focusing on clustering methods such as hierarchical clustering, k-means, k-medoids, Mixture of Gaussians, DBSCAN, etc<br />
<br />
These topics will be presented both from a theoretical perspective and a practical one via implementations in the general-purpose programming language python.<br />
<br />
===Detailed course schedule===<br />
<br />
A detailed schedule of the course can be found here; topics are just indicative while days and teachers are correct up to some last-minute change (I will notify you by email). Please note that not all days we have lectures!!<br />
<br />
Note: Lecture timetable interpretation<br />
* On Wednesday, in room 26.02, starts at 15:15 (cum tempore), ends at 18:15<br />
* On Thursday, in room 26.01, starts at 12:15 (cum tempore), ends at 14:15<br />
<br />
<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|23/02/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Machine Learning Intro<br />
|-<br />
|24/02/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Statistical Learning Theory (Ch. 1 ISL)<br />
|-<br />
|02/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Statistical Learning Theory - Bias/Variance Trade-off (Ch. 2 ISL)<br />
|-<br />
|03/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Introduction to Linear Algebra<br />
|-<br />
|09/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Python + Numpy + Bias/Variance<br />
|-<br />
|10/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Simple Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|16/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Multi Variate Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|17/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL) <br />
|-<br />
|23/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Multivariate Linear Regression Laboratory<br />
|-<br />
|24/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Generalized Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|30/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Feature Selection and Model Assessment (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|31/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Ridge Regression and Lasso (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|06/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Generalized Linear Regression and Feature Selection Laboratory<br />
|-<br />
|07/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: KNN and Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|13/04/2022 || Wednesday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|14/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|20/04/2022 || Wednesday || 15:15-18:15 || 26.02 ||Matteo Matteucci || Lecture || Classification: Linear Discriminanr Analysis (Ch. 4 ISL)<br />
|-<br />
|21/04/2022 || Thursday || 12:15 - 14:15 || 26.01 || Matteo Matteucci || Lecture || Evaluation methods for classification<br />
|-<br />
|27/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Logistic Regression and LDA Laboratory<br />
|-<br />
|28/04/2022 || Thursday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|04/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || The Perceptron (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|06/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL) <br />
|-<br />
|11/05/2022 || Wednesday || 15:15-18:15 || 26.02 ||Stefano Samele || Python Laboratory || SVM and Classifiers Evaluation Laboratory<br />
|-<br />
|12/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Unsupervised Learning and Clustering (Ch. 10 ISL)<br />
|-<br />
|18/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Clustering (Ch. 10 ISL)<br />
|-<br />
|19/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Clustering Evaluation<br />
|-<br />
|25/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Clustering Laboratory<br />
|-<br />
|26/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|01/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Principal Component Analysis (Ch. 10 ISL)<br />
|-<br />
|02/06/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|08/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || <Spare><br />
|}<br />
<br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|24/02/2021 || Wednesday || 15:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
|-<br />
|25/02/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] (Ch. 1 ISL)<br />
|-<br />
|03/03/2021 || Wednesday || 14:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off] (Ch. 2 ISL)<br />
|-<br />
|04/03/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
|-<br />
|10/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|11/03/2021 || Thursday || --- || --- || --- || ---|| --- No lecture ---<br />
|-<br />
|17/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
|-<br />
|18/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|24/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
|-<br />
|25/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|31/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|01/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|07/04/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
|-<br />
|08/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|14/04/2021 || Wednesday || '''15:15-18:15''' || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|15/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis] (Ch. 4 ISL)<br />
|-<br />
|22/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|23/04/2021 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|28/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|29/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
|-<br />
|05/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
|-<br />
|06/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|12/05/2021 || Wednesday || 14:15-18:15 || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|13/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering] (Ch. 10 ISL)<br />
|-<br />
|19/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
|-<br />
|20/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering] (Ch. 10 ISL)<br />
|-<br />
|26/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
|-<br />
|27/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering] (Ch. 10 ISL)<br />
|-<br />
|02/06/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|03/06/2021 || Thursday || 08:15-11:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|04/06/2021 || Friday || 14:15-17:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|11/03/2020 || Wednesday || 14:15 - 18:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3565a411-bed7-4b20-9dd6-00ee8b9ddd54 Course Introduction], [https://web.microsoftstream.com/video/4a702565-386d-4bed-a0c1-9d1daa015703 Introduction to Machine Learning], and [https://web.microsoftstream.com/video/cef9a912-ee47-4254-8f26-318a6a014424 Statistical Machine Learning] (Ch. 1 ISL)<br />
|-<br />
|12/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/389145d3-c3e5-48c2-bf82-d7877bf14b8c Statistical Decision Theory and Bias-Variance trade off] (Ch. 2 ISL)<br />
|-<br />
|18/03/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/bb2155d6-a6f2-4f82-af48-3ceb22951c4b Python + Numpy + Bias/Variance] Laboratory<br />
|-<br />
|19/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b0359dad-971c-412d-8508-fde45e1dc3fe Statistical Decision Theory and Bias-Variance trade off (continued)] (Ch. 2 ISL)<br />
|-<br />
|25/03/2017 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f88827c9-0994-4d3f-80bf-1c9b6637ba18 Simple Linear Regression and Multivariate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|26/03/2017 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/deb2b3f5-d90d-47b8-b309-1ab88979f805 Multivariate Linear Regression (continued)] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|01/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/da0e35db-6995-412a-99ad-f409f0a6752d Multivariae Linear Regression (Part 1)] [https://web.microsoftstream.com/video/8defdff7-ae83-4753-a353-3d39194e63ac (Part 2)] Laboratory<br />
|-<br />
|02/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/c81f59c8-7023-4206-a771-8be062b7cb21 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|08/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/0255cfa0-98de-4465-a8bf-07c93e0974ee Issues with Linear Regression and Generalized Linear Regression] and [https://web.microsoftstream.com/video/e3392148-f1ee-426d-a271-3d8fcf11008a Feature Selection] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|09/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/03656a6b-46c7-483e-9263-0036144adb00 Feature Selection (continued)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|15/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/58093db6-f365-4184-8ce0-c12c03a1589f Generalized Linear Regression and Feature Selection (Part1)] [https://web.microsoftstream.com/video/52b0d7f5-a725-4406-aab3-3be5145d950f (Part 2)] Laboratory<br />
|-<br />
|16/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1565c508-4448-4678-a9e4-4ff411684227 Feature Selection (LASSO)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|22/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d04083a9-8961-4448-bcf2-0576d9dccf4c Classification by KNN (Part 1)] and [https://web.microsoftstream.com/video/c56ef675-486a-425c-819d-404868e07906 Logistic Regression (Part 2)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|23/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3a5f66b1-80d2-4ee5-ba14-7757ae662c97 Classification by Logistic Regression (continued)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|29/04/2020 || Wednesday || 14:15 - 17:15 || --- || --- || --- || --- No Lecture (Laurea) ---<br />
|-<br />
|30/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/a171bc2a-35e7-42c7-bdd0-d295ecfd7e26 Classification by Linear Discriminant Analysis] (Ch. 4 ISL)<br />
|-<br />
|06/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/cef18863-e3fd-481e-bcad-a18455796fd7 Classification via Logistic Regression, and LDA Laboratory (Part 1)] and [https://web.microsoftstream.com/video/670b7f72-5b6b-4168-9f1c-211a9ad25f48 (Part 2)]<br />
|-<br />
|07/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b2ed8ca0-c0c0-4c1a-836d-b2ffee20d85e Evaluation Methods for Classification]<br />
|-<br />
|13/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/2b881d7d-d11e-4432-8873-973bc36eeb61 Perceptron Learning] and [https://web.microsoftstream.com/video/00564932-919a-49a1-9fa5-eb7706640781 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|14/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b72fa8de-f98d-43cf-9609-5833625a4b5c Support Vector Machines and Kernel Trick] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|20/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/fab1f62e-cea0-4cc9-9366-0ccd6bcd161b Classification (SVM and classifiers evaluation) Laboratory (Part 1)] and [https://web.microsoftstream.com/video/130b806d-5390-4321-9d05-f63e079f30a1 (Part 2)]<br />
|-<br />
|21/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1125b85e-f4a1-49d1-991f-333fff893a1e Introduction to Unsupervised Learning] (Ch. 10 ISL)<br />
|-<br />
|27/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d8d0efb5-adfb-4376-afe3-26afb7ffd664 Clustering: Hierachical, k-means, and DBSCAN (Part 1)] and [https://web.microsoftstream.com/video/b7307896-bff7-4fd0-973f-d37fd7f91e13 (Part 2)] (Ch. 10 ISL)<br />
|-<br />
|28/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3f2975c2-1143-4870-8aed-a1a06382be14 Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|03/06/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/0fa04b48-f8c3-488b-bfab-92547d3a9c38 Clustering Laboratory (Part 1)] and [https://web.microsoftstream.com/video/24a40515-afdd-4cca-9b62-19e544c7e12e (Part 2)]<br />
|-<br />
|04/06/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f58132ba-afd3-47ce-89c8-ba16782d8f37 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
|-<br />
|27/11/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Classification by Linear Discriminant Analysis (Ch. 4 ISL)<br />
|-<br />
|03/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Exercises on Classification by Linear Discriminant Analysis<br />
|-<br />
|04/12/2017 || Tuesday || --- || --- || --- || No Lecture <br />
|-<br />
|10/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Clustering: Intro, k-means and the alike, GMM, and hierachical<br />
|-<br />
|11/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Davide Eynard || Clustering: Density-based, Spectral + Evaluation<br />
|-<br />
|14/12/2017 || Friday || 10:15 - 13:15 || TBD || Matteo Matteucci || Classification: from generative to discriminative approaches (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|17/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|18/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|}<br />
--><br />
Chapters are intended as complete except for<br />
* Ch.4 ESL: Section 4.5<br />
* Ch.12 ESL: Sections 12.1, 12.2, 12.3<br />
* Ch.9 ISL: Sections 9.1, 9.2, 9.3<br />
<br />
===Course Evaluation===<br />
<br />
The course evaluation is composed by two parts:<br />
<br />
* HW: Homework with exercises covering the whole program (up to 6 points)<br />
* OR: An oral discussion covering the whole program (up to 26 points)<br />
<br />
the final score will be the sum of HW (not compulsory) and OR scores. You will get the oral grade as a mark in the scale of 30 up to 32/30 which you have to multiply by 0.8125 and then you add to it the score of the project. For your convenience here it is [[Media:ML2021-Conversion.pdf|a conversion table]] with the final mark in case you do not turn in the project or you get the whole 6 marks in the project.<br />
<br />
====Homework #1 2021/2022====<br />
<br />
The first project asks you to develop a regression model on the [[Media:ML-2122-HW1.zip | Forest Fires Data Set]]. The goal of the model is to predict, given a set of features the burned area of forest fires. The project should focus on investigating the part of features selection for the regression task to understand the relationships between the different variables involved fully. <br />
An accurate and helpful description of the dataset is included in the forestfire.names file.<br />
<br />
The project should consist of an executable python notebook, sufficiently commented. Most of the cells should be adequately followed or preceded by an explanation of what you are doing, why, what the output is, how you interpret it, and so on.<br />
<br />
You can submit your notebook via email at stefano.samele@polimi.it. The deadline is 11/05/22 at midday CET.<br />
The notebook should already display all the cells' outputs. A copy and a re-execution will be performed to evaluate your work: we need to be sure your code is actually executable and displays consistent results.<br />
<br />
You can attend the project in a group of maximum two. Scores (0-1-2, with half points) will be assigned based on the ability to organize the investigation and the code, adopt relevant methodologies presented during laboratories, understand and interpret results, and comply with project requests.<br />
<br />
==Teaching Material (the textbook)== <br />
<br />
Lectures will be based on material taken from the book. <br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani<br />
<br />
If you are interested in a more deep treatment of the topics you can refer to the following book from the same authors<br />
<br />
* [http://www-stat.stanford.edu/~tibs/ElemStatLearn/index.html The Elements of Statistical Learning: Data Mining, Inference, and Prediction.] by Trevor Hastie, Robert Tibshirani, and Jerome Friedman.<br />
<br />
Some additional material that could be used to prepare the oral examination will be provided together with the past homeworks.<br />
<br />
===Teacher Slides ===<br />
<br />
In the following you can find the lecture slides used by the teacher and the teaching assistants during classes.<br />
<br />
* [[Media:ML-2020-A0-LinearAlgebraBasics.pdf | [2020/2021] Linear Algebra Basics]]: Basic elements of linear algebra, e.g., vectors, matrices, basis, span, etc.<br />
* [[Media:ML-2122-00-Intro.pdf | [2021/2022] Course introduction]]: introductory slides of the course with useful information about the grading, and the course logistics. Some examples from supervised and unsupervised learning. Regression, classification, clustering terminology and examples.<br />
* [[Media:ML-2122-01-StatisticalLearning.pdf | [2021/2022] Statistical Learning Introduction]]: Statistical Learning definition, rationale, and trade-offs (e.g., prediction vs. inference, parametric vs non parametric models, flexibility vs. interpretability, etc.)<br />
* [[Media:ML-2122-02-LinearRegression.pdf | [2021/2022] Linear Regression]]: Simple Linear Regression and Multiple Linear Regression. Generalized Linear models. Cross-validation techniques. Feature selection. Ridge Regression and Lasso.<br />
* [[Media:ML-2021-03-LinearClassification.pdf | [2020/2021] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods. Discriminative vs. generative methods. Support Vector Machines. <br />
* [[Media:ML-2021-04-Clustering.pdf | [2020/2021] Clustering]]: Introduction to unsupervised learning and clustering, hierarchical clustering, k-means, DBSCNA, indexes for clustering evaluation. <br />
* [[Media:ML-2021-05-PrincipalComponentAnalysis.pdf | [2020/2021] Principal Component Analysis]]: Principal Component Analysis, Geometric Interpretation, Singular Values Decomposition.<br />
<br />
===Laboratories===<br />
<br />
We will use Python (with Jupyter notebooks) throughout the course, thus we kindly ask you to install the "Anaconda" package to be ready for the labs. Here are the [https://www.anaconda.com/products/individual download links]. You can find a simple Jupyter notebook [[Media:ML2021-test.zip | HERE]] to test if the installation succeeded.<br />
<br />
To open the notebook<br />
* launch the "Anaconda Navigator" app<br />
* launch the "jupyter Notebook" app within the navigator, it should automatically open a webpage (it may take a while)<br />
* on the webpage, navigate on the folder where you downloaded the "lab01.00-TestEnvironment.ipynb" file, and press on the file to open it<br />
* then follow the instruction within the notebook<br />
<br />
If you didn't install anaconda but just jupyter, or if you can't find Anaconda Navigator <br />
* open a shell ("Anaconda Prompt" if you are using Windows)<br />
* move on to the folder where you downloaded "lab01.00-TestEnvironment.ipynb"<br />
* run the "jupyter notebook" command, it should automatically open a webpage<br />
* then on the webpage press on the "lab01.00-TestEnvironment.ipynb" file and follow the instructions within the notebook<br />
<br />
The following are the notebook used in the labs:<br />
*[[Media:ML2122-lab01.zip | [2021/2022] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session including the testing environment ([[Media:ML2122-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab02.zip | [2021/2022] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2122-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab03.zip | [2021/2022] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2122-lab03_solutions_part1.zip |complete version]])<br />
*[[Media:ML2122-lab04.zip | [2021/2022] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2122-lab04_solutions.zip |complete version]])<br />
<!--<br />
*[[Media:ML2021-lab01.zip | [2020/2021] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session ([[Media:ML2021-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab02.zip | [2020/2021] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2021-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab03.zip | [2020/2021] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2021-lab03_solutions_tmp.zip |complete version]])<br />
*[[Media:ML2021-lab04.zip | [2020/2021] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab04_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab05.zip | [2020/2021] Material for the fifth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab05_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab06.zip | [2020/2021] Material for the sixth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab06_solutions.zip |complete version]])<br />
--><br />
<!--<br />
* [[Media:ML-2016-03-AssessingModelAccuracy.pdf | [2016] Statistical Learning and Model Assessment]]: Model Assessment for Regression and Classification, Bias-Variance trade-off, Model complexity and overfitting, K-Nearest Neighbors Classifier vs. Bayes Classifier.<br />
* [[Media:ML-2016-05-LinearClassification.pdf | [2016] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods.<br />
* [[Media:ML-2016-06-SupportVectorMachines.pdf | [2016] Support Vector Machines]]: Discriminative vs. generative methids. Hyperplanes learning and Perceptron. Maximum Margin Classifiers. The Kernel trick and Support Vector Machines.<br />
For exercises and lab material please refer to [http://davide.eynard.it/pattern-analysis-and-machine-intelligence-2015-2016/ Davide Eynard website].<br />
--><br />
<br />
===Additional Resources===<br />
Papers and links useful to integrate the textbook<br />
<br />
* [http://www.ekof.bg.ac.rs/wp-content/uploads/2016/09/Ponavljanje-matematike-Wayne-Winston-Operations-Research-Applications-and-Algorithms-4-edition.pdf Basic Linear Algebra]: "Basic Linear Algebra" chapter from Wayne Winston book "Operations Research Applications and Algorithms (4th ed.)"<br />
* [http://scott.fortmann-roe.com/docs/BiasVariance.html Bias vs. Variance]: "Understanding the Bias-Variance Tradeoff" essay by Scott Fortmann-Roe<br />
* [http://www.onmyphd.com/?p=kkt.karush.kuhn.tucker Karush Kuhn Tucker Conditions]: a short note on their meaning with references to relevant wikipedia pages<br />
* [http://students.brown.edu/seeing-theory/ Seeing Theory]: a website where the basic concepts of probability and statistics are explained in a visual way.<br />
<br />
Python examples to better practice with numpy library<br />
* [https://github.com/Kyubyong/numpy_exercises Some numpy exercises], we did roughly 1, 2, 4, 6, 9, 10, 13<br />
* [https://github.com/rougier/numpy-100 Othen numpy exercises] from simple to complex<br />
* [https://www.w3resource.com/python-exercises/numpy/index-array.php More numpy exercises] from simple to complex<br />
<br />
===Year 2020/2021 Recordings (use at your own risk)===<br />
<br />
As I registered these due to pandemics, I am making them available. They DO NOT REPLACE THIS YEAR classroom lectures which are to be considered as the official material of this year, but they might be useful to double-check your notes.<br />
<br />
* 24/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
* 25/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] <br />
* 03/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off]<br />
* 04/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
* 10/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression]<br />
* 18/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression]<br />
* 25/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression]<br />
* 31/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment]<br />
* 01/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso]<br />
* 08/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression]<br />
* 14/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression]<br />
* 15/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis]<br />
* 29/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
* 06/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] <br />
* 12/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] <br />
* 13/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering]<br />
* 20/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering]<br />
* 27/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering]<br />
* 03/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation]<br />
* 04/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] <br />
<br />
Also, labs are available, however, the teaching assistant this year has changed.<br />
<br />
* 17/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
* 24/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
* 07/04/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
* 05/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
* 19/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
* 26/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
<br />
<!--<br />
===Past Exams and Sample Questions===<br />
For some samples of exams you can check the last year PAMI ones<br />
<br />
* [[Media:2016_02_03_PAMI.pdf |03/02/2016 PAMI Exam]]<br />
* [[Media:2016_02_19_PAMI.pdf |19/02/2016 PAMI Exam]]<br />
* [[Media:2016_07_06_PAMI.pdf |06/07/2016 PAMI Exam]]<br />
* [[Media:2016_09_09_PAMI.pdf |09/09/2016 PAMI Exam]]<br />
* [[Media:2016_09_28_PAMI.pdf |28/09/2016 PAMI Exam]]<br />
--><br />
===Online Resources===<br />
<br />
The following are links to online sources which might be useful to complement the material above<br />
* [https://towardsdatascience.com/linear-algebra-survival-kit-for-machine-learning-94901a62465e An Introduction to Linear Algebra] with numpy examples. It provides the very fundamental definitions, does not cover eigenvalues and eigenvectors.<br />
* [https://www.r-bloggers.com/in-depth-introduction-to-machine-learning-in-15-hours-of-expert-videos/ Statistical Learning MOOC] covering the entire ISL book offered by Trevor Hastie and Rob Tibshirani. Start anytime in self-paced mode.<br />
* [http://math.arizona.edu/~hzhang/math574m.html MATH 574M] University of Arizona Course on ''Statistical Machine Learning and Data Mining''; here you can find slides covering part of the course topics (the reference book for this course is again ''The Elements of Statistical Learning'')<br />
<br />
<!--<br />
== 2013-2014 Homework ==<br />
<br />
The 2013 Homework (alike the 2012 one) is organized as an octave series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
=== Part 1: Linear Classification Methods ===<br />
<br />
* [[Media:homework_pami_classification_2013_2014.pdf | Homework 2013-2014 on Classification]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 17/11 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
=== Part 2: Regression ===<br />
* [[Media:homework_pami_regression_2013_2014.pdf | Homework 2013-2014 Regression]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to malago@di.unimi.it (cc to matteo.matteucci@polimi.it) is Friday 20/12 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:diabete.mat | diabete.mat]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
For any question or doubt please sen us an email as soon as possible.<br />
<br />
'''Note 1:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
<strike>'''Note 2:''' rename the file Diabete.data into diabete.mat ... still fighting with the CSM :-)</strike><br />
<br />
'''Note 3:''' the code has been tested with octave under linux, we suggest to use it not to spend too much time with installing it under windows or using matlab. If you do not have linux installed, try using a live CD as the ubuntu 13.04 live distro ;-)<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at this post<br />
<br />
* [http://davide.eynard.it/2013/12/30/octave-clustering-demo-part-6-more-evaluation/ Homework 2013-2014 on clustering evaluation]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is the end of the course. You have to '''send it to davide.eynard_at_gmail.com Friday 24/01 23:59'''.<br />
<br />
'''Note 1:''' for any doubt or question send an email, as soon as possible, to Davide Eynard so to have a prompt reply and not get stuck during homework execution.<br />
<br />
'''Note 2:''' you have to turn in only the solution of "Ocatave clustering demo part 6", while the other parts can be used as reference to improve your understanding in basic clustering algorithms.<br />
<br />
=== Part 2: Classification ===<br />
<br />
* [[Media:homework_pami_classification_2013.pdf | Homework 2013 Classification]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 23/06 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
<br />
<br />
'''Errata Corrige''': there were a few bugs in the homework text. I have updated the pdf and they were:<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the Fisher projection it is more correct to use only the training data to learn the projection and then we can train and test on the corresponding subsets<br />
<br />
a = FisherProjection(X(training,:),Y(training,:));<br />
reducedX = X*a(:,1);<br />
[mu_0, mu_1, sigma, p_0, p_1] = linearDiscriminantAnalysis_train(reducedX(training), Y(training))<br />
<br />
I forgot to filter for just the training samples when performing Quadratic Discriminant Analysis<br />
<br />
quadX = expandToQuadraticSpace(X);<br />
%check this out!<br />
size(quadX)<br />
beta = linearRegression_train(quadX(training), Y(training));<br />
<br />
And in general you should always train on the training data and test on the testing data ;-).<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at these posts<br />
<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-4-k-medoids/ Homework 2013 on k-medoids]<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-5-hierarchical-clustering/ Homework 2013 on hierarchical clustering]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is '''before the you take the exam''' sending it to davide.eynard_at_gmail.com.<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3:] follow this tutorial and answer the questions from all 5 sub-tutorials.<br />
<br />
== 2012 Homework ==<br />
<br />
The Homework of 2012 organized like an octave/matlab series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
* [[Media:PAMI_homework_2012_1.pdf | Homework 2012 part 1]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to matteucci@elet.polimi.it and malago@elet.polimi.it is Tuesday 5/6 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
'''Note:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
* [[Media:PAMI_homework_2012_2.pdf | Homework 2012 part 2]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade; the deadline to submit the solution by email to matteucci@elet.polimi.it is the day before the exam you decide to attend''' (e.g., if you decide to take the exam on the 26/6 then you need to turn it in by 25/6).<br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Errata Corrige''': there were a few bugs a bug in the homework text. I have updated the pdf and they were:<br />
In the code for loading the data I forgot to remove the first column which you do not need<br />
data = dlmread('SAheart.data',',',1,1);<br />
X = data(:,1:9);<br />
Y = data(:,10);<br />
<br />
In the StratifiedSampling function the sorted verctors should be assigned<br />
% just an ahestetic sorting<br />
testing = sort(testing);<br />
training = sort(training);<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the expansion to quadratic space the starting index for the inner loop should i and not 1. Moreover in some cases it might be possible to have columns which are duplicated (e.g., with boolean attribute); in this case you should not need the robust version of linear regression.<br />
function extendedX = expandToQuadraticSpace(X)<br />
% adds new columns to extendedX; keeps X for other calculations<br />
extendedX = X;<br />
for i=1:size(X, 2)<br />
for j=i:size(X, 2)<br />
newColumn = X(:, i) .* X(:, j);<br />
extendedX = [extendedX newColumn];<br />
end<br />
end<br />
% remove duplicated columns<br />
duplicates = [];<br />
for i=1:size(extendedX, 2)<br />
for j=i+1:size(extendedX, 2)<br />
if(sum(extendedX(:,i)==extendedX(:,j)) == size(X,1))<br />
duplicates = [duplicates j];<br />
end<br />
end<br />
end<br />
extendedX(:,duplicates) = [];<br />
end<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3]: the third part of the homework is '''optional''', so you are not required to complete it. However, if you want to give it a try and use it to understand the topics covered by Davide Eynard in his lectures you are welcome. As usual, the questions in this homework are very close to the ones you will find in classworks, so we suggest to have a look at hose anyway! '''In case you decide to turn it in and have it contribute with a 10% to the grade, the deadline to submit the solution by email to matteucci@elet.polimi.it and davide.eynard@polimi.it is the day before you decide to take the exam''' (e.g., if you decide to take the exam on the 10/7 then you need to turn it in by 9/7)<br />
<br />
'''Note:''' homeworks are meant to let you see (and practice) a little bit with the topics presented during the course. They are evaluated because you spent some time on those and thus you deserve some credit for that ;-)<br />
<br />
== 2011 Homework ==<br />
<br />
Here you can find the homework for the year 2011 and the material you need to complete it. Please read the F.A.Q. below and for any unsolved doubt contact the teachers of the course.<br />
<br />
* [[Media:PAMI_homework_2011_v02.pdf | Homework 2011 v02]] a minor change in the signature of the logistic regression function<br />
* [[Media:PAMI_homework_2011_v01.pdf | Homework 2011 v01]] text with questions and exercises<br />
* [[Media:dataset.txt | Dataset]] for the clustering exercise in csv format<br />
<br />
'''Frequently Asked Questions'''<br />
<br />
* '''''How do I take the square root of a matrix?''''': check the diagonalization approach from [http://en.wikipedia.org/wiki/Square_root_of_a_matrix].<br />
<br />
* '''''How do I compute the chi square statistics?'''': in the slide there is a cut and paste error since e_ij=R_it*C_tj as described here [http://en.wikipedia.org/wiki/Pearson's_chi-square_test]<br />
<br />
* '''''When it is due? In which format?''''': The homework is due on the 29/06 and should be delivered by email. Send us (all the course teachers) the .m files in a zip archive attached to this email and a link to the pdf with the written part (not to flood our mailboxes). <br />
<br />
* '''''Can we do that in groups? How many people per group?''''': Yes, you can work on the homework in groups, but no more than 3 people per group are allowed. Put the names of all homework authors in the pdf and in all the .m files. If you discuss something with other people, w.r.t. the people in your group, point it out in the pdf file as well.<br />
<br />
* '''''Can we ask questions about the exercises or the code?''''': Yes you should! First of all, there might be unclear things in the exercise descriptions and those should be clarified as soon as possible for all (this is why the homework is versioned). But you could ask for help as well, our goal is to have you all solving all the questions and get a high grade ... but we will not do the homework on you behalf ;-)<br />
<br />
* '''''How the optional questions are graded?''''': They compensate for possible errors in the other questions; we suggest to work on them anyway to be sure you get the maximum grading.<br />
<br />
* '''''How the homework will be graded?''''': we are interested in understanding if you understood or not; thus we are not interested in the result, but we want to check how you get to the result. So please: 1) clarify all the assumptions and all the steps in your exercises 2) comment as much as possible your .m files!<br />
<br />
--></div>Matteohttps://chrome.deib.polimi.it/index.php?title=Machine_Learning_Bio&diff=3828Machine Learning Bio2022-05-02T11:13:34Z<p>Matteo: /* Homework #1 2021/2022 */</p>
<hr />
<div>__FORCETOC__<br />
<br />
The following are last-minute news you should be aware of ;-)<br />
* 22/04/2022: The first homework is out!!!<br />
* 08/03/2022: Added material for the first lab<br />
* 06/03/2022: Slides from first lectures and last year's recordings updated <br />
* 23/02/2022: Lectures start today!<br />
<!--<br />
* 11/09/2021: Grade of the [[Media:ML2021-Grades_210911.pdf|Summer session + homeworks]] <br />
* 09/07/2021: Grade of the [[Media:ML2021-Grades_210624.pdf|24/06/2021 oral exams]] <br />
* 09/07/2021: Updated Homework + Oral [[Media:ML2021-Conversion.pdf|conversion table]]<br />
* 03/07/2021: Updated Homework available [[Media:ML2021-homework-new.zip|here!!!]]<br />
* 08/06/2021: Updated all videos and all slides from the course.<br />
* 02/06/2021: You can fin the 2020/2021 homework [[Media:ML2021-homework.zip|here!!!]]<br />
* 26/05/2021: The link to the form to request an instance of remote examination for June and July is [https://forms.office.com/r/FUrVt8eZNx here]!<br />
* 09/04/2021: From next week lectures will be back to presence (plus webex streaming)<br />
* 22/03/2021: Added completed material from the last lab plus some exercises ... <br />
* 17/03/2021: Added the material for the lab of today ... <br />
* 10/03/2021: 11/03/2021 lecture has been canceled<br />
* 06/03/2021: website update with linear algebra slides and (working) links to all lectures<br />
* 05/03/2021: Since today we are moved fully online so lectures will happen in my webex room (same holds for labs)<br />
* 24/02/2021: Lectures start today<br />
--><br />
<!--<br />
* 08/08/2020: Grading for all projects and first two calls [[Media:Grades_20200723.pdf|are here!!]] <br />
* 22/06/2020: Grading mechanism explained, check [[Media:ML2020_grading_system.pdf|here a handy recap]] <br />
* 14/06/2020: [[Media:ML2020_homework.zip |Here it come the 2020 homework!!!]]<br />
* 03/06/2020: All slides updated<br />
* 02/05/2020: Updated course schedule and added videos to the previous lectures<br />
* 04/04/2020: Updated schedule and added videos of previous lectures<br />
* 31/03/2020: Updated schedule and added material on linear algebra<br />
* 19/03/2020: Added lab material, both with empty notebooks and final result<br />
* 11/03/2020: Added today's lecture videos and planned next week schedule (To Be Completed)<br />
* 11/03/2020: The course starts today!<br />
* 03/03/2020: The course is going to start soon ...<br />
--><br />
<br />
==Course Aim & Organization==<br />
<br />
The objective of the Machine Learning course is to give an in-depth presentation of the techniques most used for pattern recognition, knowledge discovery, and data analysis/modeling. These techniques are presented both from a theoretical (i.e., statistics and information theory) perspective and a practical one (i.e., coding examples) through the descriptions of algorithms and their implementations in a general-purpose programming language (i.e., python).<br />
<br />
The course presents the classical supervised and unsupervised learning paradigms described and discussed presenting regression, classification, and clustering problems in Bioinformatics. The course is composed of a set of lectures on specific machine learning techniques (e.g., generalized linear regression, logistic regression, linear and quadratic discriminant analysis, support vector machines, k-nearest-neighborhood, clustering, etc.) preceded by the introduction of the Statistical Learning framework which acts as a common reference framework for the entire course.<br />
<br />
===Teachers===<br />
<br />
The course is composed of a blending of lectures and exercises by the course teacher and a teaching assistant.<br />
<br />
* [http://www.deib.polimi.it/ita/personale/dettagli/267262 Matteo Matteucci]: the course teacher <br />
* [https://www.deib.polimi.it/ita/personale/dettagli/1638984 Stefano Samele]: the teaching assistant <br />
<br />
===Course Program===<br />
<br />
The course mostly follows the following book which is also available for download in pdf<br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani<br />
<br />
The course lectures will present the theory and practice of the following:<br />
* Machine Learning and Pattern Classification: the general concepts of Machine Learning and Pattern Recognition are introduced within the framework of Statistical Decision Theory with reference to the bias-variance trade-off and the Bayes classifier;<br />
* Generalized Linear Regression: linear methods for regression will be presented and discussed introducing different techniques (e.g., Linear Regression, Ridge Regression, K-Nearest Neighbors Regression, Non-Linear Regression, etc.) and the most common methodologies for model validation and selection (e.g., AIC, BIC, cross-validation, stepwise feature selection, Lasso, etc.).<br />
* Linear and Non-Linear Classification: generative and discriminative techniques for classification will be described and discussed (e.g., Logistic Regression, Linear and Quadratic Discriminant Analysis, K-Nearest Neighbors, Perceptron Rule, and Support Vector Machines, etc.). Metrics for classifiers evaluation and comparison are presented in this part of the course (e.g., accuracy, precision, recall, ROC, AUC, F-measure, Matthew coefficient).<br />
* Unsupervised Learning: the most common approaches to unsupervised learning are described mostly focusing on clustering methods such as hierarchical clustering, k-means, k-medoids, Mixture of Gaussians, DBSCAN, etc<br />
<br />
These topics will be presented both from a theoretical perspective and a practical one via implementations in the general-purpose programming language python.<br />
<br />
===Detailed course schedule===<br />
<br />
A detailed schedule of the course can be found here; topics are just indicative while days and teachers are correct up to some last-minute change (I will notify you by email). Please note that not all days we have lectures!!<br />
<br />
Note: Lecture timetable interpretation<br />
* On Wednesday, in room 26.02, starts at 15:15 (cum tempore), ends at 18:15<br />
* On Thursday, in room 26.01, starts at 12:15 (cum tempore), ends at 14:15<br />
<br />
<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|23/02/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Machine Learning Intro<br />
|-<br />
|24/02/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Statistical Learning Theory (Ch. 1 ISL)<br />
|-<br />
|02/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Statistical Learning Theory - Bias/Variance Trade-off (Ch. 2 ISL)<br />
|-<br />
|03/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Introduction to Linear Algebra<br />
|-<br />
|09/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Python + Numpy + Bias/Variance<br />
|-<br />
|10/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Simple Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|16/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Multi Variate Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|17/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL) <br />
|-<br />
|23/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Multivariate Linear Regression Laboratory<br />
|-<br />
|24/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Generalized Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|30/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Feature Selection and Model Assessment (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|31/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Ridge Regression and Lasso (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|06/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Generalized Linear Regression and Feature Selection Laboratory<br />
|-<br />
|07/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: KNN and Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|13/04/2022 || Wednesday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|14/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|20/04/2022 || Wednesday || 15:15-18:15 || 26.02 ||Matteo Matteucci || Lecture || Classification: Linear Discriminanr Analysis (Ch. 4 ISL)<br />
|-<br />
|21/04/2022 || Thursday || 12:15 - 14:15 || 26.01 || Matteo Matteucci || Lecture || Evaluation methods for classification<br />
|-<br />
|27/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Logistic Regression and LDA Laboratory<br />
|-<br />
|28/04/2022 || Thursday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|04/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || The Perceptron (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|06/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL) <br />
|-<br />
|11/05/2022 || Wednesday || 15:15-18:15 || 26.02 ||Stefano Samele || Python Laboratory || SVM and Classifiers Evaluation Laboratory<br />
|-<br />
|12/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Unsupervised Learning and Clustering (Ch. 10 ISL)<br />
|-<br />
|18/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Clustering (Ch. 10 ISL)<br />
|-<br />
|19/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Clustering Evaluation<br />
|-<br />
|25/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Clustering Laboratory<br />
|-<br />
|26/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|01/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Principal Component Analysis (Ch. 10 ISL)<br />
|-<br />
|02/06/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|08/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || <Spare><br />
|}<br />
<br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|24/02/2021 || Wednesday || 15:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
|-<br />
|25/02/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] (Ch. 1 ISL)<br />
|-<br />
|03/03/2021 || Wednesday || 14:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off] (Ch. 2 ISL)<br />
|-<br />
|04/03/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
|-<br />
|10/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|11/03/2021 || Thursday || --- || --- || --- || ---|| --- No lecture ---<br />
|-<br />
|17/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
|-<br />
|18/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|24/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
|-<br />
|25/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|31/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|01/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|07/04/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
|-<br />
|08/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|14/04/2021 || Wednesday || '''15:15-18:15''' || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|15/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis] (Ch. 4 ISL)<br />
|-<br />
|22/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|23/04/2021 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|28/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|29/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
|-<br />
|05/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
|-<br />
|06/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|12/05/2021 || Wednesday || 14:15-18:15 || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|13/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering] (Ch. 10 ISL)<br />
|-<br />
|19/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
|-<br />
|20/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering] (Ch. 10 ISL)<br />
|-<br />
|26/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
|-<br />
|27/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering] (Ch. 10 ISL)<br />
|-<br />
|02/06/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|03/06/2021 || Thursday || 08:15-11:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|04/06/2021 || Friday || 14:15-17:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|11/03/2020 || Wednesday || 14:15 - 18:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3565a411-bed7-4b20-9dd6-00ee8b9ddd54 Course Introduction], [https://web.microsoftstream.com/video/4a702565-386d-4bed-a0c1-9d1daa015703 Introduction to Machine Learning], and [https://web.microsoftstream.com/video/cef9a912-ee47-4254-8f26-318a6a014424 Statistical Machine Learning] (Ch. 1 ISL)<br />
|-<br />
|12/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/389145d3-c3e5-48c2-bf82-d7877bf14b8c Statistical Decision Theory and Bias-Variance trade off] (Ch. 2 ISL)<br />
|-<br />
|18/03/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/bb2155d6-a6f2-4f82-af48-3ceb22951c4b Python + Numpy + Bias/Variance] Laboratory<br />
|-<br />
|19/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b0359dad-971c-412d-8508-fde45e1dc3fe Statistical Decision Theory and Bias-Variance trade off (continued)] (Ch. 2 ISL)<br />
|-<br />
|25/03/2017 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f88827c9-0994-4d3f-80bf-1c9b6637ba18 Simple Linear Regression and Multivariate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|26/03/2017 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/deb2b3f5-d90d-47b8-b309-1ab88979f805 Multivariate Linear Regression (continued)] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|01/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/da0e35db-6995-412a-99ad-f409f0a6752d Multivariae Linear Regression (Part 1)] [https://web.microsoftstream.com/video/8defdff7-ae83-4753-a353-3d39194e63ac (Part 2)] Laboratory<br />
|-<br />
|02/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/c81f59c8-7023-4206-a771-8be062b7cb21 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|08/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/0255cfa0-98de-4465-a8bf-07c93e0974ee Issues with Linear Regression and Generalized Linear Regression] and [https://web.microsoftstream.com/video/e3392148-f1ee-426d-a271-3d8fcf11008a Feature Selection] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|09/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/03656a6b-46c7-483e-9263-0036144adb00 Feature Selection (continued)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|15/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/58093db6-f365-4184-8ce0-c12c03a1589f Generalized Linear Regression and Feature Selection (Part1)] [https://web.microsoftstream.com/video/52b0d7f5-a725-4406-aab3-3be5145d950f (Part 2)] Laboratory<br />
|-<br />
|16/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1565c508-4448-4678-a9e4-4ff411684227 Feature Selection (LASSO)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|22/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d04083a9-8961-4448-bcf2-0576d9dccf4c Classification by KNN (Part 1)] and [https://web.microsoftstream.com/video/c56ef675-486a-425c-819d-404868e07906 Logistic Regression (Part 2)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|23/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3a5f66b1-80d2-4ee5-ba14-7757ae662c97 Classification by Logistic Regression (continued)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|29/04/2020 || Wednesday || 14:15 - 17:15 || --- || --- || --- || --- No Lecture (Laurea) ---<br />
|-<br />
|30/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/a171bc2a-35e7-42c7-bdd0-d295ecfd7e26 Classification by Linear Discriminant Analysis] (Ch. 4 ISL)<br />
|-<br />
|06/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/cef18863-e3fd-481e-bcad-a18455796fd7 Classification via Logistic Regression, and LDA Laboratory (Part 1)] and [https://web.microsoftstream.com/video/670b7f72-5b6b-4168-9f1c-211a9ad25f48 (Part 2)]<br />
|-<br />
|07/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b2ed8ca0-c0c0-4c1a-836d-b2ffee20d85e Evaluation Methods for Classification]<br />
|-<br />
|13/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/2b881d7d-d11e-4432-8873-973bc36eeb61 Perceptron Learning] and [https://web.microsoftstream.com/video/00564932-919a-49a1-9fa5-eb7706640781 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|14/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b72fa8de-f98d-43cf-9609-5833625a4b5c Support Vector Machines and Kernel Trick] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|20/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/fab1f62e-cea0-4cc9-9366-0ccd6bcd161b Classification (SVM and classifiers evaluation) Laboratory (Part 1)] and [https://web.microsoftstream.com/video/130b806d-5390-4321-9d05-f63e079f30a1 (Part 2)]<br />
|-<br />
|21/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1125b85e-f4a1-49d1-991f-333fff893a1e Introduction to Unsupervised Learning] (Ch. 10 ISL)<br />
|-<br />
|27/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d8d0efb5-adfb-4376-afe3-26afb7ffd664 Clustering: Hierachical, k-means, and DBSCAN (Part 1)] and [https://web.microsoftstream.com/video/b7307896-bff7-4fd0-973f-d37fd7f91e13 (Part 2)] (Ch. 10 ISL)<br />
|-<br />
|28/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3f2975c2-1143-4870-8aed-a1a06382be14 Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|03/06/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/0fa04b48-f8c3-488b-bfab-92547d3a9c38 Clustering Laboratory (Part 1)] and [https://web.microsoftstream.com/video/24a40515-afdd-4cca-9b62-19e544c7e12e (Part 2)]<br />
|-<br />
|04/06/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f58132ba-afd3-47ce-89c8-ba16782d8f37 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
|-<br />
|27/11/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Classification by Linear Discriminant Analysis (Ch. 4 ISL)<br />
|-<br />
|03/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Exercises on Classification by Linear Discriminant Analysis<br />
|-<br />
|04/12/2017 || Tuesday || --- || --- || --- || No Lecture <br />
|-<br />
|10/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Davide Eynard || Clustering: Intro, k-means and the alike, GMM, and hierachical<br />
|-<br />
|11/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Davide Eynard || Clustering: Density-based, Spectral + Evaluation<br />
|-<br />
|14/12/2017 || Friday || 10:15 - 13:15 || TBD || Matteo Matteucci || Classification: from generative to discriminative approaches (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|17/12/2017 || Monday || 08:15 - 10:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|18/12/2017 || Tuesday || 09:15 - 12:15 || V.S7-A || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|}<br />
--><br />
Chapters are intended as complete except for<br />
* Ch.4 ESL: Section 4.5<br />
* Ch.12 ESL: Sections 12.1, 12.2, 12.3<br />
* Ch.9 ISL: Sections 9.1, 9.2, 9.3<br />
<br />
===Course Evaluation===<br />
<br />
The course evaluation is composed by two parts:<br />
<br />
* HW: Homework with exercises covering the whole program (up to 6 points)<br />
* OR: An oral discussion covering the whole program (up to 26 points)<br />
<br />
the final score will be the sum of HW (not compulsory) and OR scores. You will get the oral grade as a mark in the scale of 30 up to 32/30 which you have to multiply by 0.8125 and then you add to it the score of the project. For your convenience here it is [[Media:ML2021-Conversion.pdf|a conversion table]] with the final mark in case you do not turn in the project or you get the whole 6 marks in the project.<br />
<br />
====Homework #1 2021/2022====<br />
<br />
The first project asks you to develop a regression model on the [[Media:ML-2122-HW1.zip | Forest Fires Data Set]]. The goal of the model is to predict, given a set of features the burned area of forest fires. The project should focus on investigating the part of features selection for the regression task to understand the relationships between the different variables involved fully. <br />
An accurate and helpful description of the dataset is included in the forestfire.names file.<br />
<br />
The project should consist of an executable python notebook, sufficiently commented. Most of the cells should be adequately followed or preceded by an explanation of what you are doing, why, what the output is, how you interpret it, and so on.<br />
<br />
You can submit your notebook via email at stefano.samele@polimi.it. The deadline is 11/05/22 at midday CET.<br />
The notebook should already display all the cells' outputs. A copy and a re-execution will be performed to evaluate your work: we need to be sure your code is actually executable and displays consistent results.<br />
<br />
You can attend the project in a group of maximum two. Scores (0-1-2, with half points) will be assigned based on the ability to organize the investigation and the code, adopt relevant methodologies presented during laboratories, understand and interpret results, and comply with project requests.<br />
<br />
==Teaching Material (the textbook)== <br />
<br />
Lectures will be based on material taken from the book. <br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani<br />
<br />
If you are interested in a more deep treatment of the topics you can refer to the following book from the same authors<br />
<br />
* [http://www-stat.stanford.edu/~tibs/ElemStatLearn/index.html The Elements of Statistical Learning: Data Mining, Inference, and Prediction.] by Trevor Hastie, Robert Tibshirani, and Jerome Friedman.<br />
<br />
Some additional material that could be used to prepare the oral examination will be provided together with the past homeworks.<br />
<br />
===Teacher Slides ===<br />
<br />
In the following you can find the lecture slides used by the teacher and the teaching assistants during classes.<br />
<br />
* [[Media:ML-2020-A0-LinearAlgebraBasics.pdf | [2020/2021] Linear Algebra Basics]]: Basic elements of linear algebra, e.g., vectors, matrices, basis, span, etc.<br />
* [[Media:ML-2122-00-Intro.pdf | [2021/2022] Course introduction]]: introductory slides of the course with useful information about the grading, and the course logistics. Some examples from supervised and unsupervised learning. Regression, classification, clustering terminology and examples.<br />
* [[Media:ML-2122-01-StatisticalLearning.pdf | [2021/2022] Statistical Learning Introduction]]: Statistical Learning definition, rationale, and trade-offs (e.g., prediction vs. inference, parametric vs non parametric models, flexibility vs. interpretability, etc.)<br />
* [[Media:ML-2122-02-LinearRegression.pdf | [2021/2022] Linear Regression]]: Simple Linear Regression and Multiple Linear Regression. Generalized Linear models. Cross-validation techniques. Feature selection. Ridge Regression and Lasso.<br />
* [[Media:ML-2021-03-LinearClassification.pdf | [2020/2021] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods. Discriminative vs. generative methods. Support Vector Machines. <br />
* [[Media:ML-2021-04-Clustering.pdf | [2020/2021] Clustering]]: Introduction to unsupervised learning and clustering, hierarchical clustering, k-means, DBSCNA, indexes for clustering evaluation. <br />
* [[Media:ML-2021-05-PrincipalComponentAnalysis.pdf | [2020/2021] Principal Component Analysis]]: Principal Component Analysis, Geometric Interpretation, Singular Values Decomposition.<br />
<br />
===Laboratories===<br />
<br />
We will use Python (with Jupyter notebooks) throughout the course, thus we kindly ask you to install the "Anaconda" package to be ready for the labs. Here are the [https://www.anaconda.com/products/individual download links]. You can find a simple Jupyter notebook [[Media:ML2021-test.zip | HERE]] to test if the installation succeeded.<br />
<br />
To open the notebook<br />
* launch the "Anaconda Navigator" app<br />
* launch the "jupyter Notebook" app within the navigator, it should automatically open a webpage (it may take a while)<br />
* on the webpage, navigate on the folder where you downloaded the "lab01.00-TestEnvironment.ipynb" file, and press on the file to open it<br />
* then follow the instruction within the notebook<br />
<br />
If you didn't install anaconda but just jupyter, or if you can't find Anaconda Navigator <br />
* open a shell ("Anaconda Prompt" if you are using Windows)<br />
* move on to the folder where you downloaded "lab01.00-TestEnvironment.ipynb"<br />
* run the "jupyter notebook" command, it should automatically open a webpage<br />
* then on the webpage press on the "lab01.00-TestEnvironment.ipynb" file and follow the instructions within the notebook<br />
<br />
The following are the notebook used in the labs:<br />
*[[Media:ML2122-lab01.zip | [2021/2022] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session including the testing environment ([[Media:ML2122-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab02.zip | [2021/2022] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2122-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2122-lab03.zip | [2021/2022] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2122-lab03_solutions_part1.zip |complete version]])<br />
*[[Media:ML2122-lab04.zip | [2021/2022] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2122-lab04_solutions.zip |complete version]])<br />
<!--<br />
*[[Media:ML2021-lab01.zip | [2020/2021] Material for the first lab session]]: some useful jupiter notebooks which will be used during the first lab session ([[Media:ML2021-lab01_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab02.zip | [2020/2021] Material for the second lab session]]: some useful jupiter notebooks which will be used during the second lab session ([[Media:ML2021-lab02_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab03.zip | [2020/2021] Material for the third lab session]]: some useful jupiter notebooks which will be used during the third lab session ([[Media:ML2021-lab03_solutions_tmp.zip |complete version]])<br />
*[[Media:ML2021-lab04.zip | [2020/2021] Material for the fourth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab04_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab05.zip | [2020/2021] Material for the fifth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab05_solutions.zip |complete version]])<br />
*[[Media:ML2021-lab06.zip | [2020/2021] Material for the sixth lab session]]: some useful jupiter notebooks which will be used during the fourth lab session ([[Media:ML2021-lab06_solutions.zip |complete version]])<br />
--><br />
<!--<br />
* [[Media:ML-2016-03-AssessingModelAccuracy.pdf | [2016] Statistical Learning and Model Assessment]]: Model Assessment for Regression and Classification, Bias-Variance trade-off, Model complexity and overfitting, K-Nearest Neighbors Classifier vs. Bayes Classifier.<br />
* [[Media:ML-2016-05-LinearClassification.pdf | [2016] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods.<br />
* [[Media:ML-2016-06-SupportVectorMachines.pdf | [2016] Support Vector Machines]]: Discriminative vs. generative methids. Hyperplanes learning and Perceptron. Maximum Margin Classifiers. The Kernel trick and Support Vector Machines.<br />
For exercises and lab material please refer to [http://davide.eynard.it/pattern-analysis-and-machine-intelligence-2015-2016/ Davide Eynard website].<br />
--><br />
<br />
===Additional Resources===<br />
Papers and links useful to integrate the textbook<br />
<br />
* [http://www.ekof.bg.ac.rs/wp-content/uploads/2016/09/Ponavljanje-matematike-Wayne-Winston-Operations-Research-Applications-and-Algorithms-4-edition.pdf Basic Linear Algebra]: "Basic Linear Algebra" chapter from Wayne Winston book "Operations Research Applications and Algorithms (4th ed.)"<br />
* [http://scott.fortmann-roe.com/docs/BiasVariance.html Bias vs. Variance]: "Understanding the Bias-Variance Tradeoff" essay by Scott Fortmann-Roe<br />
* [http://www.onmyphd.com/?p=kkt.karush.kuhn.tucker Karush Kuhn Tucker Conditions]: a short note on their meaning with references to relevant wikipedia pages<br />
* [http://students.brown.edu/seeing-theory/ Seeing Theory]: a website where the basic concepts of probability and statistics are explained in a visual way.<br />
<br />
Python examples to better practice with numpy library<br />
* [https://github.com/Kyubyong/numpy_exercises Some numpy exercises], we did roughly 1, 2, 4, 6, 9, 10, 13<br />
* [https://github.com/rougier/numpy-100 Othen numpy exercises] from simple to complex<br />
* [https://www.w3resource.com/python-exercises/numpy/index-array.php More numpy exercises] from simple to complex<br />
<br />
===Year 2020/2021 Recordings (use at your own risk)===<br />
<br />
As I registered these due to pandemics, I am making them available. They DO NOT REPLACE THIS YEAR classroom lectures which are to be considered as the official material of this year, but they might be useful to double-check your notes.<br />
<br />
* 24/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
* 25/02/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] <br />
* 03/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off]<br />
* 04/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
* 10/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression]<br />
* 18/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression]<br />
* 25/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression]<br />
* 31/03/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment]<br />
* 01/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso]<br />
* 08/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression]<br />
* 14/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression]<br />
* 15/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis]<br />
* 29/04/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
* 06/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] <br />
* 12/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] <br />
* 13/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering]<br />
* 20/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering]<br />
* 27/05/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering]<br />
* 03/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation]<br />
* 04/06/2021 - Matteo Matteucci [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] <br />
<br />
Also, labs are available, however, the teaching assistant this year has changed.<br />
<br />
* 17/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
* 24/03/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
* 07/04/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
* 05/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
* 19/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
* 26/05/2021 - Marco Cannici [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
<br />
<!--<br />
===Past Exams and Sample Questions===<br />
For some samples of exams you can check the last year PAMI ones<br />
<br />
* [[Media:2016_02_03_PAMI.pdf |03/02/2016 PAMI Exam]]<br />
* [[Media:2016_02_19_PAMI.pdf |19/02/2016 PAMI Exam]]<br />
* [[Media:2016_07_06_PAMI.pdf |06/07/2016 PAMI Exam]]<br />
* [[Media:2016_09_09_PAMI.pdf |09/09/2016 PAMI Exam]]<br />
* [[Media:2016_09_28_PAMI.pdf |28/09/2016 PAMI Exam]]<br />
--><br />
===Online Resources===<br />
<br />
The following are links to online sources which might be useful to complement the material above<br />
* [https://towardsdatascience.com/linear-algebra-survival-kit-for-machine-learning-94901a62465e An Introduction to Linear Algebra] with numpy examples. It provides the very fundamental definitions, does not cover eigenvalues and eigenvectors.<br />
* [https://www.r-bloggers.com/in-depth-introduction-to-machine-learning-in-15-hours-of-expert-videos/ Statistical Learning MOOC] covering the entire ISL book offered by Trevor Hastie and Rob Tibshirani. Start anytime in self-paced mode.<br />
* [http://math.arizona.edu/~hzhang/math574m.html MATH 574M] University of Arizona Course on ''Statistical Machine Learning and Data Mining''; here you can find slides covering part of the course topics (the reference book for this course is again ''The Elements of Statistical Learning'')<br />
<br />
<!--<br />
== 2013-2014 Homework ==<br />
<br />
The 2013 Homework (alike the 2012 one) is organized as an octave series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
=== Part 1: Linear Classification Methods ===<br />
<br />
* [[Media:homework_pami_classification_2013_2014.pdf | Homework 2013-2014 on Classification]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 17/11 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
=== Part 2: Regression ===<br />
* [[Media:homework_pami_regression_2013_2014.pdf | Homework 2013-2014 Regression]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to malago@di.unimi.it (cc to matteo.matteucci@polimi.it) is Friday 20/12 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:diabete.mat | diabete.mat]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
For any question or doubt please sen us an email as soon as possible.<br />
<br />
'''Note 1:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
<strike>'''Note 2:''' rename the file Diabete.data into diabete.mat ... still fighting with the CSM :-)</strike><br />
<br />
'''Note 3:''' the code has been tested with octave under linux, we suggest to use it not to spend too much time with installing it under windows or using matlab. If you do not have linux installed, try using a live CD as the ubuntu 13.04 live distro ;-)<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at this post<br />
<br />
* [http://davide.eynard.it/2013/12/30/octave-clustering-demo-part-6-more-evaluation/ Homework 2013-2014 on clustering evaluation]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is the end of the course. You have to '''send it to davide.eynard_at_gmail.com Friday 24/01 23:59'''.<br />
<br />
'''Note 1:''' for any doubt or question send an email, as soon as possible, to Davide Eynard so to have a prompt reply and not get stuck during homework execution.<br />
<br />
'''Note 2:''' you have to turn in only the solution of "Ocatave clustering demo part 6", while the other parts can be used as reference to improve your understanding in basic clustering algorithms.<br />
<br />
=== Part 2: Classification ===<br />
<br />
* [[Media:homework_pami_classification_2013.pdf | Homework 2013 Classification]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by Sunday 23/06 23:59''' <br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome) <br />
<br />
'''Note 2:''' please name your pdf as pami_SURNAME_STUDENTID_classification.pdf; if you submit a homework for different people, please pick one of the names for the file but PUT ALL THE NAMES IN THE COVER PAGE!!<br />
<br />
<br />
<br />
'''Errata Corrige''': there were a few bugs in the homework text. I have updated the pdf and they were:<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the Fisher projection it is more correct to use only the training data to learn the projection and then we can train and test on the corresponding subsets<br />
<br />
a = FisherProjection(X(training,:),Y(training,:));<br />
reducedX = X*a(:,1);<br />
[mu_0, mu_1, sigma, p_0, p_1] = linearDiscriminantAnalysis_train(reducedX(training), Y(training))<br />
<br />
I forgot to filter for just the training samples when performing Quadratic Discriminant Analysis<br />
<br />
quadX = expandToQuadraticSpace(X);<br />
%check this out!<br />
size(quadX)<br />
beta = linearRegression_train(quadX(training), Y(training));<br />
<br />
And in general you should always train on the training data and test on the testing data ;-).<br />
<br />
=== Part 3: Clustering ===<br />
<br />
The code and the text of the third part of the homework are available online at these posts<br />
<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-4-k-medoids/ Homework 2013 on k-medoids]<br />
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-5-hierarchical-clustering/ Homework 2013 on hierarchical clustering]<br />
<br />
As usual, '''this part of the homework will contribute to the 10% of the grade'''; the deadline to submit the solution is '''before the you take the exam''' sending it to davide.eynard_at_gmail.com.<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3:] follow this tutorial and answer the questions from all 5 sub-tutorials.<br />
<br />
== 2012 Homework ==<br />
<br />
The Homework of 2012 organized like an octave/matlab series of tutorials. You are requested to go through the tutorials and practice with the algorithms that have been presented in class. To prove us you have done it and that you have understood the code you will be requested to solve few exercises and provide us a pdf report by email<br />
<br />
* [[Media:PAMI_homework_2012_1.pdf | Homework 2012 part 1]]: this is the text of the first part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade and the deadline to submit the solution by email to matteucci@elet.polimi.it and malago@elet.polimi.it is Tuesday 5/6 23:59'''<br />
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework<br />
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework<br />
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version<br />
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version<br />
<br />
'''Note:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(<br />
<br />
* [[Media:PAMI_homework_2012_2.pdf | Homework 2012 part 2]]: this is the text of the second part of the homework; it has been intentionally edited not to allow cut and paste. '''This part of the homework will contribute to the 10% of the grade; the deadline to submit the solution by email to matteucci@elet.polimi.it is the day before the exam you decide to attend''' (e.g., if you decide to take the exam on the 26/6 then you need to turn it in by 25/6).<br />
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework<br />
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework<br />
<br />
'''Errata Corrige''': there were a few bugs a bug in the homework text. I have updated the pdf and they were:<br />
In the code for loading the data I forgot to remove the first column which you do not need<br />
data = dlmread('SAheart.data',',',1,1);<br />
X = data(:,1:9);<br />
Y = data(:,10);<br />
<br />
In the StratifiedSampling function the sorted verctors should be assigned<br />
% just an ahestetic sorting<br />
testing = sort(testing);<br />
training = sort(training);<br />
<br />
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows<br />
% maximization of a'*B*a / a'*w*a via SVD<br />
[Vw, Dw, Vw] = svd(W);<br />
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W<br />
Wminushalf = inv(Whalf);<br />
Mstar = M*Wminushalf;<br />
% Add this variable for computing Mstar mean<br />
meanMstar = mean(Mstar);<br />
for i=1:size(M,1)<br />
% Remove the mean saved before the loop<br />
Mstar(i,:) = Mstar(i,:)-meanMstar;<br />
end<br />
Bstar = Mstar'*Mstar;<br />
[Vstar, Db, Vstar] = svd(Bstar);<br />
<br />
In the expansion to quadratic space the starting index for the inner loop should i and not 1. Moreover in some cases it might be possible to have columns which are duplicated (e.g., with boolean attribute); in this case you should not need the robust version of linear regression.<br />
function extendedX = expandToQuadraticSpace(X)<br />
% adds new columns to extendedX; keeps X for other calculations<br />
extendedX = X;<br />
for i=1:size(X, 2)<br />
for j=i:size(X, 2)<br />
newColumn = X(:, i) .* X(:, j);<br />
extendedX = [extendedX newColumn];<br />
end<br />
end<br />
% remove duplicated columns<br />
duplicates = [];<br />
for i=1:size(extendedX, 2)<br />
for j=i+1:size(extendedX, 2)<br />
if(sum(extendedX(:,i)==extendedX(:,j)) == size(X,1))<br />
duplicates = [duplicates j];<br />
end<br />
end<br />
end<br />
extendedX(:,duplicates) = [];<br />
end<br />
<br />
* [http://davide.eynard.it/2012/06/05/octave-clustering-demo-part-0-introduction-and-setup/ Homework 2012 part 3]: the third part of the homework is '''optional''', so you are not required to complete it. However, if you want to give it a try and use it to understand the topics covered by Davide Eynard in his lectures you are welcome. As usual, the questions in this homework are very close to the ones you will find in classworks, so we suggest to have a look at hose anyway! '''In case you decide to turn it in and have it contribute with a 10% to the grade, the deadline to submit the solution by email to matteucci@elet.polimi.it and davide.eynard@polimi.it is the day before you decide to take the exam''' (e.g., if you decide to take the exam on the 10/7 then you need to turn it in by 9/7)<br />
<br />
'''Note:''' homeworks are meant to let you see (and practice) a little bit with the topics presented during the course. They are evaluated because you spent some time on those and thus you deserve some credit for that ;-)<br />
<br />
== 2011 Homework ==<br />
<br />
Here you can find the homework for the year 2011 and the material you need to complete it. Please read the F.A.Q. below and for any unsolved doubt contact the teachers of the course.<br />
<br />
* [[Media:PAMI_homework_2011_v02.pdf | Homework 2011 v02]] a minor change in the signature of the logistic regression function<br />
* [[Media:PAMI_homework_2011_v01.pdf | Homework 2011 v01]] text with questions and exercises<br />
* [[Media:dataset.txt | Dataset]] for the clustering exercise in csv format<br />
<br />
'''Frequently Asked Questions'''<br />
<br />
* '''''How do I take the square root of a matrix?''''': check the diagonalization approach from [http://en.wikipedia.org/wiki/Square_root_of_a_matrix].<br />
<br />
* '''''How do I compute the chi square statistics?'''': in the slide there is a cut and paste error since e_ij=R_it*C_tj as described here [http://en.wikipedia.org/wiki/Pearson's_chi-square_test]<br />
<br />
* '''''When it is due? In which format?''''': The homework is due on the 29/06 and should be delivered by email. Send us (all the course teachers) the .m files in a zip archive attached to this email and a link to the pdf with the written part (not to flood our mailboxes). <br />
<br />
* '''''Can we do that in groups? How many people per group?''''': Yes, you can work on the homework in groups, but no more than 3 people per group are allowed. Put the names of all homework authors in the pdf and in all the .m files. If you discuss something with other people, w.r.t. the people in your group, point it out in the pdf file as well.<br />
<br />
* '''''Can we ask questions about the exercises or the code?''''': Yes you should! First of all, there might be unclear things in the exercise descriptions and those should be clarified as soon as possible for all (this is why the homework is versioned). But you could ask for help as well, our goal is to have you all solving all the questions and get a high grade ... but we will not do the homework on you behalf ;-)<br />
<br />
* '''''How the optional questions are graded?''''': They compensate for possible errors in the other questions; we suggest to work on them anyway to be sure you get the maximum grading.<br />
<br />
* '''''How the homework will be graded?''''': we are interested in understanding if you understood or not; thus we are not interested in the result, but we want to check how you get to the result. So please: 1) clarify all the assumptions and all the steps in your exercises 2) comment as much as possible your .m files!<br />
<br />
--></div>Matteohttps://chrome.deib.polimi.it/index.php?title=Machine_Learning_Bio&diff=3827Machine Learning Bio2022-05-02T11:12:52Z<p>Matteo: /* Laboratories */</p>
<hr />
<div>__FORCETOC__<br />
<br />
The following are last-minute news you should be aware of ;-)<br />
* 22/04/2022: The first homework is out!!!<br />
* 08/03/2022: Added material for the first lab<br />
* 06/03/2022: Slides from first lectures and last year's recordings updated <br />
* 23/02/2022: Lectures start today!<br />
<!--<br />
* 11/09/2021: Grade of the [[Media:ML2021-Grades_210911.pdf|Summer session + homeworks]] <br />
* 09/07/2021: Grade of the [[Media:ML2021-Grades_210624.pdf|24/06/2021 oral exams]] <br />
* 09/07/2021: Updated Homework + Oral [[Media:ML2021-Conversion.pdf|conversion table]]<br />
* 03/07/2021: Updated Homework available [[Media:ML2021-homework-new.zip|here!!!]]<br />
* 08/06/2021: Updated all videos and all slides from the course.<br />
* 02/06/2021: You can fin the 2020/2021 homework [[Media:ML2021-homework.zip|here!!!]]<br />
* 26/05/2021: The link to the form to request an instance of remote examination for June and July is [https://forms.office.com/r/FUrVt8eZNx here]!<br />
* 09/04/2021: From next week lectures will be back to presence (plus webex streaming)<br />
* 22/03/2021: Added completed material from the last lab plus some exercises ... <br />
* 17/03/2021: Added the material for the lab of today ... <br />
* 10/03/2021: 11/03/2021 lecture has been canceled<br />
* 06/03/2021: website update with linear algebra slides and (working) links to all lectures<br />
* 05/03/2021: Since today we are moved fully online so lectures will happen in my webex room (same holds for labs)<br />
* 24/02/2021: Lectures start today<br />
--><br />
<!--<br />
* 08/08/2020: Grading for all projects and first two calls [[Media:Grades_20200723.pdf|are here!!]] <br />
* 22/06/2020: Grading mechanism explained, check [[Media:ML2020_grading_system.pdf|here a handy recap]] <br />
* 14/06/2020: [[Media:ML2020_homework.zip |Here it come the 2020 homework!!!]]<br />
* 03/06/2020: All slides updated<br />
* 02/05/2020: Updated course schedule and added videos to the previous lectures<br />
* 04/04/2020: Updated schedule and added videos of previous lectures<br />
* 31/03/2020: Updated schedule and added material on linear algebra<br />
* 19/03/2020: Added lab material, both with empty notebooks and final result<br />
* 11/03/2020: Added today's lecture videos and planned next week schedule (To Be Completed)<br />
* 11/03/2020: The course starts today!<br />
* 03/03/2020: The course is going to start soon ...<br />
--><br />
<br />
==Course Aim & Organization==<br />
<br />
The objective of the Machine Learning course is to give an in-depth presentation of the techniques most used for pattern recognition, knowledge discovery, and data analysis/modeling. These techniques are presented both from a theoretical (i.e., statistics and information theory) perspective and a practical one (i.e., coding examples) through the descriptions of algorithms and their implementations in a general-purpose programming language (i.e., python).<br />
<br />
The course presents the classical supervised and unsupervised learning paradigms described and discussed presenting regression, classification, and clustering problems in Bioinformatics. The course is composed of a set of lectures on specific machine learning techniques (e.g., generalized linear regression, logistic regression, linear and quadratic discriminant analysis, support vector machines, k-nearest-neighborhood, clustering, etc.) preceded by the introduction of the Statistical Learning framework which acts as a common reference framework for the entire course.<br />
<br />
===Teachers===<br />
<br />
The course is composed of a blending of lectures and exercises by the course teacher and a teaching assistant.<br />
<br />
* [http://www.deib.polimi.it/ita/personale/dettagli/267262 Matteo Matteucci]: the course teacher <br />
* [https://www.deib.polimi.it/ita/personale/dettagli/1638984 Stefano Samele]: the teaching assistant <br />
<br />
===Course Program===<br />
<br />
The course mostly follows the following book which is also available for download in pdf<br />
<br />
* [http://www-bcf.usc.edu/~gareth/ISL/ An Introduction to Statistical Learning with Applications in R] by Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani<br />
<br />
The course lectures will present the theory and practice of the following:<br />
* Machine Learning and Pattern Classification: the general concepts of Machine Learning and Pattern Recognition are introduced within the framework of Statistical Decision Theory with reference to the bias-variance trade-off and the Bayes classifier;<br />
* Generalized Linear Regression: linear methods for regression will be presented and discussed introducing different techniques (e.g., Linear Regression, Ridge Regression, K-Nearest Neighbors Regression, Non-Linear Regression, etc.) and the most common methodologies for model validation and selection (e.g., AIC, BIC, cross-validation, stepwise feature selection, Lasso, etc.).<br />
* Linear and Non-Linear Classification: generative and discriminative techniques for classification will be described and discussed (e.g., Logistic Regression, Linear and Quadratic Discriminant Analysis, K-Nearest Neighbors, Perceptron Rule, and Support Vector Machines, etc.). Metrics for classifiers evaluation and comparison are presented in this part of the course (e.g., accuracy, precision, recall, ROC, AUC, F-measure, Matthew coefficient).<br />
* Unsupervised Learning: the most common approaches to unsupervised learning are described mostly focusing on clustering methods such as hierarchical clustering, k-means, k-medoids, Mixture of Gaussians, DBSCAN, etc<br />
<br />
These topics will be presented both from a theoretical perspective and a practical one via implementations in the general-purpose programming language python.<br />
<br />
===Detailed course schedule===<br />
<br />
A detailed schedule of the course can be found here; topics are just indicative while days and teachers are correct up to some last-minute change (I will notify you by email). Please note that not all days we have lectures!!<br />
<br />
Note: Lecture timetable interpretation<br />
* On Wednesday, in room 26.02, starts at 15:15 (cum tempore), ends at 18:15<br />
* On Thursday, in room 26.01, starts at 12:15 (cum tempore), ends at 14:15<br />
<br />
<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|23/02/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Machine Learning Intro<br />
|-<br />
|24/02/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Statistical Learning Theory (Ch. 1 ISL)<br />
|-<br />
|02/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Statistical Learning Theory - Bias/Variance Trade-off (Ch. 2 ISL)<br />
|-<br />
|03/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Introduction to Linear Algebra<br />
|-<br />
|09/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Python + Numpy + Bias/Variance<br />
|-<br />
|10/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Simple Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|16/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Multi Variate Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|17/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL) <br />
|-<br />
|23/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Multivariate Linear Regression Laboratory<br />
|-<br />
|24/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Generalized Linear Regression (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|30/03/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Feature Selection and Model Assessment (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|31/03/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Ridge Regression and Lasso (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|06/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Generalized Linear Regression and Feature Selection Laboratory<br />
|-<br />
|07/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: KNN and Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|13/04/2022 || Wednesday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|14/04/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Classification: Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|20/04/2022 || Wednesday || 15:15-18:15 || 26.02 ||Matteo Matteucci || Lecture || Classification: Linear Discriminanr Analysis (Ch. 4 ISL)<br />
|-<br />
|21/04/2022 || Thursday || 12:15 - 14:15 || 26.01 || Matteo Matteucci || Lecture || Evaluation methods for classification<br />
|-<br />
|27/04/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Logistic Regression and LDA Laboratory<br />
|-<br />
|28/04/2022 || Thursday || --- || --- || --- || --- || --- No Lecture --- <br />
|-<br />
|04/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || The Perceptron (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|06/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL) <br />
|-<br />
|11/05/2022 || Wednesday || 15:15-18:15 || 26.02 ||Stefano Samele || Python Laboratory || SVM and Classifiers Evaluation Laboratory<br />
|-<br />
|12/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Unsupervised Learning and Clustering (Ch. 10 ISL)<br />
|-<br />
|18/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Clustering (Ch. 10 ISL)<br />
|-<br />
|19/05/2022 || Thursday || 12:15-14:15 || 26.01 || Matteo Matteucci || Lecture || Clustering Evaluation<br />
|-<br />
|25/05/2022 || Wednesday || 15:15-18:15 || 26.02 || Stefano Samele || Python Laboratory || Clustering Laboratory<br />
|-<br />
|26/05/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|01/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || Principal Component Analysis (Ch. 10 ISL)<br />
|-<br />
|02/06/2022 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|08/06/2022 || Wednesday || 15:15-18:15 || 26.02 || Matteo Matteucci || Lecture || <Spare><br />
|}<br />
<br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|24/02/2021 || Wednesday || 15:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d25d6ca96674b84a7a94e991387b458 Course Intro] + [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=68982651c3704bb0a2e5c25ff1cfe70c Machine Learning Intro]<br />
|-<br />
|25/02/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4c08d5e9abe442b9b872403b2ac43eaf Statistical Learning Theory] (Ch. 1 ISL)<br />
|-<br />
|03/03/2021 || Wednesday || 14:15-18:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=7aa687ab4a874b86a3cda60a6f76e8fc Statistical Learning Theory - Bias/Variance Trade-off] (Ch. 2 ISL)<br />
|-<br />
|04/03/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=52a29db7ac824b27a78ee33c73b71f83 Introduction to Linear Algebra]<br />
|-<br />
|10/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=0f8a69033d324e1d8601e02f4e3e7df1 Simple Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|11/03/2021 || Thursday || --- || --- || --- || ---|| --- No lecture ---<br />
|-<br />
|17/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=83b0b99a801d2079368067d0af5fac6b Python + Numpy + Bias/Variance]<br />
|-<br />
|18/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=653ddf65302e4312bc7c532bfae4f720 Multi Variate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|24/03/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=6a5da10f8b6fe5e8dab98d1f4726ced6 Multivariate Linear Regression Laboratory]<br />
|-<br />
|25/03/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=9788f3a243f8496fb30f8bac9abf7ef4 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|31/03/2021 || Wednesday || 14:15-18:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=4d48804210294afabb1e1a3aa0f8913f Feature Selection and Model Assessment] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|01/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=592c0fd5e42a4b039ff228561aacedd1 Ridge Regression and Lasso] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|07/04/2021 || Wednesday || 14:15-18:15 || Cannici webex room || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=bd67b7220eb4bd6997ccd034b229b9a8 Generalized Linear Regression and Feature Selection Laboratory]<br />
|-<br />
|08/04/2021 || Thursday || 08:15-10:15 || Matteucci webex room || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=34633f7cadfb49c6ba8b4b1dc4467646 Classification: KNN and Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|14/04/2021 || Wednesday || '''15:15-18:15''' || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=872ac30ecccb40eb9f62ec52e181d027 Classification: Logistic Regression] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|15/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d2ddca82f5ab4de98bda786e6eb2e9b9 Classification: Linear Discriminanr Analysis] (Ch. 4 ISL)<br />
|-<br />
|22/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|23/04/2021 || Thursday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|28/04/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|29/04/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=76439012d78a425eab1ab550601c4700 Evaluation methods for classification]<br />
|-<br />
|05/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=93b1acdb8065b22c92d00f9539563a83 Logistic Regression and LDA Laboratory (Part 1)][https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=f691eb71b3ce81c735a440871f2a635b (Part 2)]<br />
|-<br />
|06/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ca8305b65ee247e28d8cae0dc6c8582f The Perceptron] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|12/05/2021 || Wednesday || 14:15-18:15 || B.6.1 ||Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=fec02aafdb55405ca03dc756e2b95a47 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|13/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cf975d329332417582e0383d2f3bbc67 Unsupervised Learning and Clustering] (Ch. 10 ISL)<br />
|-<br />
|19/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=ad0c6db58013cc99272e921facb51b57 SVM and Classifiers Evaluation Laboratory]<br />
|-<br />
|20/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=d0a9deddbd2d4cf8a30c74159ba453cb Clustering] (Ch. 10 ISL)<br />
|-<br />
|26/05/2021 || Wednesday || 14:15-18:15 || B.6.1 || Marco Cannici || Python Laboratory || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=cd817e862eb56acf02c09be413f915a1 Clustering Laboratory]<br />
|-<br />
|27/05/2021 || Thursday || 08:15-10:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=dfbeb4acf10b418a8fdc18cbd79ac742 Clustering] (Ch. 10 ISL)<br />
|-<br />
|02/06/2021 || Wednesday || --- || --- || --- || --- || --- No Lecture ---<br />
|-<br />
|03/06/2021 || Thursday || 08:15-11:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=26d10f88d441aa3f499d99f0e9c1b82d Clustering Evaluation] (Ch. 10 ISL)<br />
|-<br />
|04/06/2021 || Friday || 14:15-17:15 || B.6.1 || Matteo Matteucci || Lecture || [https://politecnicomilano.webex.com/politecnicomilano/ldr.php?RCID=31466d593b12e2239a65f45841ab71d4 Principal Component Analysis] (Ch. 10 ISL)<br />
|}<br />
--><br />
<!--<br />
{| border="1" align="center" style="text-align:center;"<br />
|-<br />
|Date || Day || Time || Room || Teacher || Type || Topic<br />
|-<br />
|11/03/2020 || Wednesday || 14:15 - 18:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3565a411-bed7-4b20-9dd6-00ee8b9ddd54 Course Introduction], [https://web.microsoftstream.com/video/4a702565-386d-4bed-a0c1-9d1daa015703 Introduction to Machine Learning], and [https://web.microsoftstream.com/video/cef9a912-ee47-4254-8f26-318a6a014424 Statistical Machine Learning] (Ch. 1 ISL)<br />
|-<br />
|12/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/389145d3-c3e5-48c2-bf82-d7877bf14b8c Statistical Decision Theory and Bias-Variance trade off] (Ch. 2 ISL)<br />
|-<br />
|18/03/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/bb2155d6-a6f2-4f82-af48-3ceb22951c4b Python + Numpy + Bias/Variance] Laboratory<br />
|-<br />
|19/03/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b0359dad-971c-412d-8508-fde45e1dc3fe Statistical Decision Theory and Bias-Variance trade off (continued)] (Ch. 2 ISL)<br />
|-<br />
|25/03/2017 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/f88827c9-0994-4d3f-80bf-1c9b6637ba18 Simple Linear Regression and Multivariate Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|26/03/2017 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/deb2b3f5-d90d-47b8-b309-1ab88979f805 Multivariate Linear Regression (continued)] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|01/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/da0e35db-6995-412a-99ad-f409f0a6752d Multivariae Linear Regression (Part 1)] [https://web.microsoftstream.com/video/8defdff7-ae83-4753-a353-3d39194e63ac (Part 2)] Laboratory<br />
|-<br />
|02/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/c81f59c8-7023-4206-a771-8be062b7cb21 Generalized Linear Regression] (Ch. 2 ISL + Ch. 3 ISL)<br />
|-<br />
|08/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/0255cfa0-98de-4465-a8bf-07c93e0974ee Issues with Linear Regression and Generalized Linear Regression] and [https://web.microsoftstream.com/video/e3392148-f1ee-426d-a271-3d8fcf11008a Feature Selection] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|09/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/03656a6b-46c7-483e-9263-0036144adb00 Feature Selection (continued)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|15/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/58093db6-f365-4184-8ce0-c12c03a1589f Generalized Linear Regression and Feature Selection (Part1)] [https://web.microsoftstream.com/video/52b0d7f5-a725-4406-aab3-3be5145d950f (Part 2)] Laboratory<br />
|-<br />
|16/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/1565c508-4448-4678-a9e4-4ff411684227 Feature Selection (LASSO)] (Ch. 3 + Ch. 6 ISL)<br />
|-<br />
|22/04/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/d04083a9-8961-4448-bcf2-0576d9dccf4c Classification by KNN (Part 1)] and [https://web.microsoftstream.com/video/c56ef675-486a-425c-819d-404868e07906 Logistic Regression (Part 2)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|23/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/3a5f66b1-80d2-4ee5-ba14-7757ae662c97 Classification by Logistic Regression (continued)] (Ch. 4 ISL + Ch. 4 ESL)<br />
|-<br />
|29/04/2020 || Wednesday || 14:15 - 17:15 || --- || --- || --- || --- No Lecture (Laurea) ---<br />
|-<br />
|30/04/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/a171bc2a-35e7-42c7-bdd0-d295ecfd7e26 Classification by Linear Discriminant Analysis] (Ch. 4 ISL)<br />
|-<br />
|06/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/cef18863-e3fd-481e-bcad-a18455796fd7 Classification via Logistic Regression, and LDA Laboratory (Part 1)] and [https://web.microsoftstream.com/video/670b7f72-5b6b-4168-9f1c-211a9ad25f48 (Part 2)]<br />
|-<br />
|07/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b2ed8ca0-c0c0-4c1a-836d-b2ffee20d85e Evaluation Methods for Classification]<br />
|-<br />
|13/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/2b881d7d-d11e-4432-8873-973bc36eeb61 Perceptron Learning] and [https://web.microsoftstream.com/video/00564932-919a-49a1-9fa5-eb7706640781 Support Vector Machines] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|14/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https://web.microsoftstream.com/video/b72fa8de-f98d-43cf-9609-5833625a4b5c Support Vector Machines and Kernel Trick] (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)<br />
|-<br />
|20/05/2020 || Wednesday || 14:15 - 17:15 || Teams Virtual Class || Practice || Marco Cannici || [https://web.microsoftstream.com/video/fab1f62e-cea0-4cc9-9366-0ccd6bcd161b Classification (SVM and classifiers evaluation) Laboratory (Part 1)] and [https://web.microsoftstream.com/video/130b806d-5390-4321-9d05-f63e079f30a1 (Part 2)]<br />
|-<br />
|21/05/2020 || Thursday || 08:15 - 10:15 || Teams Virtual Class || Theory || Matteo Matteucci || [https: