Difference between revisions of "Pattern Analysis and Machine Intelligence"

From Chrome
Jump to: navigation, search
 
(238 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
The following are last minute news you should be aware of ;-)
 
The following are last minute news you should be aware of ;-)
  02/06/2012: homework exstension! The deadline is '''Tuesday 05/06/2012 23:59 CET'''!!
+
09/10/2016: Scores from the 28/09/2016 written exam are [[Media:Grades_160928_PAMI.pdf|published here]]!!
 +
20/09/2016: Scores from the 09/09/2016 written exam are [[Media:Grades_160909_PAMI.pdf|published here]]!!
 +
31/07/2016: Scores from the 06/07/2016 written exam are [[Media:Grades_160706_PAMI.pdf|published here]]!!
 +
13/03/2016: Scores from the 19/02/2016 written exam are [[Media:Grades_160219_PAMI.pdf|published here]]!!
 +
16/02/2016: Scores from the 03/02/2016 written exam are [[Media:Grades_160203_PAMI.pdf|published here]]!!
 +
18/01/2015: PAMI Homework has been published!
 +
15/12/2015: Schedule revised until January (Note: on Friday 18/12/2015 there will be exercising with Eynard)
 +
09/12/2015: PAMI Exams for the Winter Calls will be on: 03/02/2016 and 19/02/2016
 +
25/10/2015: Updated slides on Statistical Decision Theory and Model Assessment
 +
11/10/2015: Added link to Teaching Assistant website for his material
 +
09/10/2015: New edition of PAMI website is out, stay tuned!
 +
<!--
 +
15/07/2015: The [[Media:Grades_150706_PAMI.pdf |grades from the 06/07/2015 call]] are out.
 +
15/02/2015: The [[Media:Grades_150209_PAMI.pdf |grades from the 09/02/2015 call]] are out.
 +
09/01/2015: The 2015 homework is out!!
 +
14/11/2014: Updated the linear regression slides, and the detailed schedule
 +
09/11/2014: Change in the detailed schedule, Matteucci will be teaching instead of Eynard
 +
07/11/2014: Update of the full schedule for the course + the slides about regression + labs 1 to 3 material
 +
26/10/2014: Tomorrow 27/10/2014 PAMI will start at 15:15 due to a change in the schedule with IRDM
 +
10/10/2014: The new course edition is about to start!!! Stay tuned it will be significantly different from the past (check the '''new'' words in the text)!!!!
 +
23/09/2014: Scores from the 15/09/2014 written exam including the Homeworks are [[Media:Grades_140915_PAMI.pdf|published here]]!!
 +
24/07/2014: Scores from the 30/06/2014 written exam including the Homeworks are [[Media:Grades_140630_PAMI.pdf|published here]]!!
 +
21/03/2014: Scores from the 20/02/2014 written exam including the Homeworks are [[Media:Grades_140220_PAMI.pdf|published here]]!!
 +
18/02/2014: Scores from the 06/02/2014 written exam including the Homeworks are [[Media:Grades_140206_PAMI_HW.pdf|published here]]!!
 +
17/02/2014: Scores from the 06/02/2014 written exam are [[Media:Grades_140206_PAMI.pdf|published here]] ... in hours you will get homeworks as well!!
 +
04/01/2014: The third homework for the 2013-2014 course edition has been published!
 +
01/01/2014: Happy new year!!!
 +
29/11/2013: The second homework for the 2013-2014 course edition has been published!
 +
21/11/2013: Tomorrow, 22/11/2013, the lecture will be in room 4.1
 +
09/11/2013: New change of classroom ... all lectures will be in V.08
 +
            Update to the detailed schedule (swap between 06/12 and 13/12 teachers)
 +
28/10/2013: The first homework for the 2013-2014 course edition has been published!
 +
25/10/2013: new change in the classrooms! Monday in V.08 and Friday in V2.12
 +
14/10/2013: small change in the detailed schedule of the lectures
 +
11/10/2013: change of classroom due to limited space from V08 to VS9
 +
08/10/2013: final grades for the [[Media:Grades_130920_PAMI.pdf|20/09/2013 exam]]
 +
07/10/2013: a new edition of the course starts today!
 +
21/08/2013: final grades for the [[Media:Grades_130726_PAMI.pdf|26/07/2013 exam]] (one grade is incomplete for technical reasons, it will be fixed soon)
 +
            final grades for the [[Media:Grades_Homeworks_130726_PAMI.pdf|homeworks at the date of 26/07/2013]]
 +
24/07/2013: final grades for the [[Media:Grades_130711_PAMI.pdf|11/07/2013 exam]]
 +
22/07/2013: at the following link you can find the grades for the [[Media:Grades_20130722_PAMI.pdf|homeworks and the 11/07/2013 exam]]
 +
21/06/2013: fixed third homework publication ...
 +
21/06/2013: the third homework is out! You have to turn it in before you take the exam (the first time).
 +
17/06/2013: bug fix in the homework part 2, the online pdf is now updated
 +
13/06/2013: update to the schedule with pointers to the relevant chapters
 +
09/05/2013: second homework is out -> deadline to turn it in Sunday 23/06/2013
 +
03/06/2013: no lecture on 11/06 it will be on 13/06/2013 from 15:15 to 18:15 in room V07
 +
            update to the detailed schedule with previous change
 +
            added file for Part 1 of Homework 1
 +
28/05/2013: fixed file prostate.data for the homework
 +
26/05/2013: first homework is out -> deadline to turn it in Sunday 09/06/2013
 +
21/05/2013: detailed schedule updated
 +
13/04/2013: change to the schedule to recover missed lecture
 +
05/03/2013: a new edition of the course starts today!
 +
05/03/2013: grades from the 29/01/2013 exam are available at [[Media:Grades_130129_PAMI.pdf|this link]]
 +
 
 +
05/10/2012: Grades for the 19/09/2012 exam are available at [[Media:Grades_120919_PAMI.pdf|this link]]
 +
21/07/2012: Updated grades for the 10/07/2012 and 26/06/2012 exams are available at [[Media:Grades_120710_PAMI.pdf|this link]]
 +
18/07/2012: Grades for the 10/07/2012 exam are available at [[Media:Grades_120710_PAMI.pdf|this link]]
 +
08/07/2012: Grades for the 26/06/2012 exam are available at [[Media:Grades_120626_PAMI.pdf|this link]]
 +
17/06/2012: Homework bugfix, check out below!
 +
12/06/2012: second and third (this one is optional) are out!
 +
11/06/2012: updated lecture schedule with details on 18/06 and 19/06 lectures
 +
  02/06/2012: homework extension! The deadline is '''Tuesday 05/06/2012 23:59 CET'''!!
 
  26/05/2012: the first part of the homework is out! You have to turn it in by Sunday 3/6/2012!
 
  26/05/2012: the first part of the homework is out! You have to turn it in by Sunday 3/6/2012!
 
  03/04/2012: published some material on "probability basics"
 
  03/04/2012: published some material on "probability basics"
 
  12/03/2012: a new edition of the course starts today!
 
  12/03/2012: a new edition of the course starts today!
 
+
-->
  
 
==Course Aim & Organization==
 
==Course Aim & Organization==
  
The objective of this course is to give an advanced presentation of the techniques most used in artificial intelligence and machine learning for pattern recognition, knowledge discovery, and data analysis/modeling.
+
The objective of this course is to give an advanced presentation, i.e., a statistical perspective, of the techniques most used in artificial intelligence and machine learning for pattern recognition, knowledge discovery, and data analysis/modeling.
  
 
===Teachers===
 
===Teachers===
  
The course is composed by a blending of lectures and exercises by the course teacher and some teaching assistants.
+
The course is composed by a blending of lectures and exercises by the course teacher and a teaching assistant.
  
 
* [http://www.dei.polimi.it/people/matteucci Matteo Matteucci]: the course teacher
 
* [http://www.dei.polimi.it/people/matteucci Matteo Matteucci]: the course teacher
* [http://www.dei.polimi.it/people/malago Luigi Malago']: the teaching assistant on regression
+
* [http://davide.eynard.it/ Davide Eynard]: the teaching assistant
* [http://davide.eynard.it/ Davide Eynard]: the teaching assistant on clustering
+
  
 
===Course Program===
 
===Course Program===
  
Techniques from machine and statistical learning are presented from a theoretical (i.e., statistics and information theory) and practical perspective through the descriptions of algorithms, the theory behind them, their implementation issues, and few examples from real applications. The course follows, at least partially, the outline of ''The Elements of Statistical Learning'' book (by Trevor Hastie, Robert Tibshirani, and Jerome Friedman):
+
Techniques from machine and statistical learning are presented from a theoretical (i.e., statistics and information theory) and practical perspective through the descriptions of algorithms, the theory behind them, their implementation issues, and few examples from real applications. The course follows, at least partially, the following '''new''' book which is available for download in pdf
  
* '''''Machine Learning and Pattern Classification''''': in this part of the course the general concepts of Machine Learning and Patter Recognition are introduced with a brief review of statistics and information theory;  
+
* [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
* '''''Unsupervised Learning Techniques''''': the most common approaches to unsupervised learning are described mostly focusing on clustering techniques, rule induction, Bayesian networks and density estimators using mixure models;
+
 
* '''''Supervised Learning Techniques''''': in this part of the course the most common techniques for Supervised Learning are described: decision trees, decision rules, Bayesian classifiers, hidden markov models, lazy learners, etc.
+
The course is composed by a set of ex-cattedra lectures on specific techniques (e.g., linear regression, linear discriminant analysis, clustering, etc.). Supervised and unsupervised learning are discussed in the framework of classification and clustering problems. The course outline is:
* '''''Feature Selection and Reduction''''': techniques for data rediction and feature selection will be presented with theory and applications
+
 
* '''''Model Validation and Selection''''': model validation and selection are orthogonal issues to previous technique; during the course the fundamentals are described and discussed (e.g., AIC, BIC, cross-validation, etc. ).
+
* '''''Machine Learning and Pattern Classification''''': the general concepts of Machine Learning and Patter Recognition are introduced with a brief review of statistical decision theory;
 +
* '''''Linear Classification Techniques''''': linear methods for classification will be presented as the starting point (e.g., Linera Regression on the indicator matrix, Linear and Quadratic Discriminant Analysis, Logistic Regression, Percptron rule and Optimal Separating Hyperplanes, a.k.a., Support Vector Machines)
 +
* '''''Linear Regression Techniques''''': linear methods for regression will be disccussed and compared (e.g., Linear Regression, Ridge Regression, Lasso, LARS).
 +
* '''''Unsupervised Learning Techniques''''': the most common approaches to unsupervised learning are described mostly focusing on clustering techniques such as hierarchical clustering, k-means, k-medoids, Mixture of Gaussians, DBSCAN, Jarvis-Patrick, etc.;
 +
* '''''Model Validation and Selection''''': model validation and selection are orthogonal issues to all previous techniques; during the course their fundamentals are described and discussed (e.g., AIC, BIC, cross-validation, etc. ).
  
 
===Detailed course schedule===
 
===Detailed course schedule===
  
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 Tuesdays and Wednesdays are in!!
+
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!!
 +
 
 +
Note: Lecture timetable interpretation
 +
* On Mondays, in V.08, starts at 13:30 (quarto d'ora accademico), ends at 15:15
 +
* On Fridays, in V.08, starts at 10:30 (quarto d'ora accademico), ends at 12:15 or 13:15 (check!)
  
 
{| border="1" align="center" style="text-align:center;"
 
{| border="1" align="center" style="text-align:center;"
Line 38: Line 108:
 
|Date || Day || Time || Room || Teacher || Topic
 
|Date || Day || Time || Room || Teacher || Topic
 
|-
 
|-
|12/03/2012 || Monday || 13:15 - 15:15 || 3.8 || Matteo Matteucci || Course Introduction (Ch. 1)
+
|05/10/2015 || Monday || 13:15 - 15:15 || V08 || Matteo Matteucci || Course Introduction (Ch. 1 ISL)
 
|-
 
|-
|13/03/2012 || Tuesday || 13:15 - 15:15 || 4.1 || Matteo Matteucci || Two examples from classification (Ch. 2)  
+
|09/10/2015 || Friday || 10:15 - 13:15 || V.S8-B || Matteo Matteucci || Statistical Decision Theory and Bias-Variance trade off. (Ch. 2 ISL)
 
|-
 
|-
|19/03/2012 || Monday || 13:15 - 15:15 || 3.8 || Luigi Malago || Linear regression methods (Ch 2.1, 2.2, 2.3 and 2.3.1, 2.4, 2.6 and 2.6.1, 2.7 and 2.7.1, 2.8 and 2.8.1, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.9,  see paper "Least Angle Regression" linked below, pages 1-16)
+
|12/10/2015 || Monday || 13:15 - 15:15 || V.S8-B || Davide Eynard || Introduction to R (Ch. 2 ISL)
 
|-
 
|-
|20/03/2012 || Tuesday || 13:15 - 15:15 || 4.1 || Matteo Matteucci || Discriminating functions, decision boundary and Linear Regression (Ch.4.1, Ch. 4.2)
+
|16/10/2015 || Friday || 10:15 - 13:15 || V.S8-B || Matteo Matteucci || Statistical Decision Theory and Model Assessment. (Ch. 2 ISL)
 
|-
 
|-
|26/03/2012 || Monday || 13:15 - 15:15 || 3.8 || Luigi Malago || Linear regression methods (see 19/03/2012)
+
|19/10/2015 || Monday || - || - || - || No PAMI Classes Today
 
|-
 
|-
|27/03/2012 || Tuesday || 13:15 - 15:15 || 4.1 || Matteo Matteucci || Linear Discriminant Analysis (Ch. 4.3)
+
|23/10/2015 || Friday || 10:15 - 13:15 || V.S8-B || Matteo Matteucci || Statistical Decision Theory and Model Assessment. (Ch. 2 ISL)
 
|-
 
|-
|02/04/2012 || Monday || 13:15 - 15:15 || 3.8 || Luigi Malago || Linear regression methods (see 19/03/2012)
+
|26/10/2015 || Monday || 13:15 - 15:15 || V.S8-B || Davide Eynard || Statistical Decision Theory Exercises (Ch. 2 ISL)
 
|-
 
|-
|03/04/2012 || Tuesday || 13:15 - 15:15 || 4.1 || Matteo Matteucci || Logistic regression (Ch.4.4)
+
|30/11/2015 || Friday || 10:15 - 12:15 || V.S8-B || Matteo Matteucci || Linear Regression (Ch. 2 ISL + Ch. 3 ISL)
 
|-
 
|-
|16/04/2012 || Monday || 13:15 - 15:15 || 3.8 || Matteo Matteucci || Logistic regression (Ch.4.4)
+
|02/11/2015 || Monday || 13:15 - 15:15 || V.S8-B || Davide Eynard || Exercises on Simple Linear Regression (Ch. 3 ISL)
 
|-
 
|-
|17/04/2012 || Tuesday || 13:15 - 15:15 || 4.1 || Matteo Matteucci || Perceptron learning
+
|06/11/2015 || Friday || 10:15 - 13:15 || V.S8-B || Matteo Matteucci || Linear Regression (Ch. 2 ISL + Ch. 3 ISL)
 
|-
 
|-
|23/04/2012 || Monday || 13:15 - 15:15 || 3.8 || Luigi Malago || Linear regression methods (see 19/03/2012)
+
|09/11/2015 || Monday || 13:15 - 15:15 || V.S8-B || Davide Eynard || Exercises on Linear Regression and Feature Selection
 
|-
 
|-
|24/04/2012 || Tuesday || 13:15 - 15:15 || 4.1 || Matteo Matteucci || Maximum margin classification (Ch. 4.5.2)
+
|13/11/2015 || Friday || 10:15 - 13:15 || V.S8-B || Matteo Matteucci || Linear Regression and Feature Selection (Ch. 3 + Ch. 6 ISL)
 
|-
 
|-
|07/05/2012 || Monday || 13:15 - 15:15 || 3.8 || Davide Eynard || Clustering I: Introduction and K-Means
+
|16/11/2015 || Monday || 13:15 - 15:15 || V.S8-B || Davide Eynard || Intro Clustering
 
|-
 
|-
|08/05/2012 || Tuesday || 13:15 - 15:15 || 4.1 || Matteo Matteucci || Kernel Smoothing Methods and Kerned Density Estimation (Ch.6.1, Ch.6.6, Ch.6.9)
+
|20/11/2015 || Friday || 10:15 - 12:15 || V.S8-B || Davide Eynard || Clustering with exercises
 
|-
 
|-
|14/05/2012 || Monday || 13:15 - 15:15 || 3.8 || Davide Eynard || Clustering II: K-Means Alternatives, Hierarchical, SOM
+
|23/11/2015 || Monday || 13:15 - 15:15 || V.S8-B || Davide Eynard || Clustering Advanced
 
|-
 
|-
|15/05/2012 || Tuesday || 13:15 - 15:15 || 4.1 || Matteo Matteucci || Gaussian Mixture Models (Ch.6.8) and the EM Algorithm (Ch.8.5)
+
|27/11/2015 || Friday || 10:15 - 13:15 || V.S8-B || Matteo Matteucci || Feature Selection and Shrinkage in Linear Regression (Ch. 6 ISL)
 
|-
 
|-
|21/05/2012 || Monday || 13:15 - 15:15 || 3.8 || Davide Eynard || Clustering III: Mixture of Gaussians, DBSCAN, Jarvis-Patrick
+
|30/11/2015 || Monday || 13:15 - 15:15 || V.S8-B || Davide Eynard || Exercises on Clustering
 
|-
 
|-
|22/05/2012 || Tuesday || 13:15 - 15:15 || 4.1 || Matteo Matteucci || Decision Trees ([[Media:PAMI_DTnR.pdf |handout]] + Ch. 9.2)
+
|04/12/2015 || Friday || 10:15 - 13:15 || V.S8-B || Matteo Matteucci || Classification by Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)
 
|-
 
|-
|28/05/2012 || Monday || 13:15 - 15:15 || 3.8 || Davide Eynard || Clustering IV: Evaluation Measures
+
|07/12/2015 || Monday || - || - || - || No PAMI Classes Today
 
|-
 
|-
|29/05/2012 || Tuesday || 13:15 - 15:15 || 4.1 || Matteo Matteucci ||
+
|11/12/2014 || Friday || 10:15 - 13:15 || V.S8-B || Matteo Matteucci || Classification by Linear Discriminant Analysis (Ch. 4 ISL)
 
|-
 
|-
|04/06/2012 || Monday || 13:15 - 15:15 || 3.8 || Matteo Matteucci || Perceptron Learning and Support Vector Machines (Ch 4.5)
+
|14/12/2014 || Monday || 13:15 - 15:15 || V.S8-B || Davide Eynard || Exercises on Classification
 
|-
 
|-
|05/06/2012 || Tuesday || 13:15 - 15:15 || 4.1 || Matteo Matteucci || Support Vector Machines (Ch. 12.1, Ch. 12.2, Ch. 12.3.0, Ch. 12.3.1 + SVM paper)
+
|18/12/2015 || Friday || 10:15 - 12:15 || V.S8-B || Davide Eynard || Exercises on Classification
 
|-
 
|-
|11/06/2012 || Monday || 13:15 - 15:15 || 3.6 || Matteo Matteucci || Support Vector Machines (Ch. 12.1, Ch. 12.2, Ch. 12.3.0, Ch. 12.3.1 + SVM paper)
+
|21/12/2015 || Monday || - || - || - || No PAMI Classes Today
 
|-
 
|-
|12/06/2012 || Tuesday || 13:15 - 15:15 || 4.1 || Matteo Matteucci || Decision Trees
+
|11/01/2014 || Monday || 13:15 - 15:15 || V.S8-B || Matteo Matteucci || Classification: from generative to discriminative approaches (Ch. 4 ISL + Ch. 4 ESL)
 
|-
 
|-
|18/06/2012 || Monday || 13:15 - 15:15 || 3.8 || Matteo Matteucci || ...
+
|15/12/2015 || Friday || 10:15 - 12:15 || V.S8-B || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)
 
|-
 
|-
|19/06/2012 || Tuesday || 13:15 - 15:15 || 4.1 || Luigi Malago' || LARS
 
 
|}
 
|}
 +
 +
Chapters are intended as complete except for
 +
* Ch.4 ESL: Section 4.5
 +
* Ch.12 ESL: Sections 12.1, 12.2, 12.3
 +
* Ch.9 ISL: Sections 9.1, 9.2, 9.3
 +
 +
<!---
 +
|13/10/2014 || Monday || 15:15 - 18:15 || V08 || Matteo Matteucci || Course Introduction (Ch. 1 ISL)
 +
|17/10/2014 || Friday || 10:30 - 13:15 || V08 || Matteo Matteucci || Statistical Decision Theory and Bias-Variance trade off. (Ch. 2 ISL)
 +
|20/10/2014 || Monday || 13:15 - 15:15 || V08 || Matteo Matteucci || Statistical Decision Theory and Model Assessment. (Ch. 2 ISL)
 +
|24/10/2014 || Friday || 10:30 - 12:15 || V08 || Davide Eynard || Introduction to R (Ch. 2 ISL)
 +
|27/10/2014 || Monday || 15:15 - 17:15 || V08 || Davide Eynard || Statistical Decision Theory Exercises (Ch. 2 ISL)
 +
|31/10/2014 || Friday || 10:30 - 13:15 || V08 || Matteo Matteucci || Simple Linear Regression (Ch. 2 ISL)
 +
|03/11/2014 || Monday || 13:30 - 15:15 || V08 || Davide Eynard || Exercises on Simple Linear Regression (Ch. 3 ISL)
 +
|07/11/2014 || Friday || 10:30 - 13:15 || V08 || Matteo Matteucci || Linear Regression (Ch. 3 ISL)
 +
|10/11/2014 || Monday || 13:30 - 15:15 || V08 || Matteo Matteucci || Linear Regression and Feature Selection (Ch. 3 + Ch. 6 ISL)
 +
|14/11/2014 || Friday || 10:30 - 13:15 || V08 || Matteo Matteucci || Feature Selection and Shrinkage in Linear Regression (Ch. 6 ISL)
 +
|17/11/2014 || Monday || 13:30 - 15:15 || V08 || Davide Eynard || Exercises on Linear Regression and Feature Selection
 +
|21/11/2014 || Friday || 10:30 - 12:15 || V08 || Matteo Matteucci || Classification by Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)
 +
|24/11/2014 || Monday ||  -  || - || - || No classes this week
 +
|28/11/2014 || Friday ||  -  || - || - || No classes this week
 +
|01/12/2014 || Monday || 13:30 - 15:15 || V08 || Davide Eynard || Exercises on Classification
 +
|05/12/2014 || Friday || 10:30 - 13:15 || V08 || Matteo Matteucci || Classification by Linear Discriminant Analysis (Ch. 4 ISL)
 +
|12/12/2014 || Friday || 10:30 - 13:15 || V08 || Matteo Matteucci || Classification: from generative to discriminative approaches (Ch. 4 ISL + Ch. 4 ESL)
 +
|15/12/2014 || Monday || 13:10 - 15:00 || V08 || Davide Eynard || Exercises on Classification
 +
| -  || - || - || - || - || Holidays
 +
|09/01/2015 || Friday || 10:30 - 13:15 || V08 || Matteo Matteucci || Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)
 +
|12/01/2015 || Monday || 13:10 - 15:00 || V08 || Davide Eynard || Intro Clustering
 +
|16/01/2015 || Friday || 10:30 - 12:15 || V08 || Davide Eynard || Clustering with exercises
 +
|19/01/2015 || Monday || 13:10 - 15:00 || V08 || Davide Eynard || Clustering Advanced
 +
|23/01/2015 || Friday || 10:30 - 12:15 || V08 || Davide Eynard || Exercises on Clustering
 +
 +
|21/10/2013 || Monday || 13:15 - 15:00 || VS9 || Matteo Matteucci || Linear Regression on the Indicator Matrix (Ch. 4.3)
 +
|25/10/2013 || Friday || 10:30 - 13:15 || VS9 || Matteo Matteucci || Linear Discriminant Analysis (Ch. 4.3)
 +
|28/10/2013 || Monday || 13:15 - 15:00 || V08 || Matteo Matteucci || Regularized Linear Discriminant Analysis, LDA in the (K-1) subspace (Ch. 4.3)
 +
|04/11/2013 || Monday || 13:15 - 15:15 || V08 || Matteo Matteucci || Fisher Projection - Logistic Regression (Ch. 4.4)
 +
|08/11/2013 || Friday || 10:30 - 13:15 || V08 || Matteo Matteucci || Logistic Regression (Ch. 4.4)
 +
|11/11/2013 || Monday || 13:15 - 15:00 || V08 || Luigi Malagò    ||  Linear Regression Methods (Ch. 2, Ch. 3, (*))
 +
|15/11/2013 || Friday || 10:30 - 13:15 || V08 || Luigi Malagò    ||  Linear Regression Methods (Ch. 2, Ch. 3, (*))
 +
|18/11/2013 || Monday || 13:15 - 15:00 || V08 || Luigi Malagò    ||  Linear Regression Methods (Ch. 2, Ch. 3, (*))
 +
|22/11/2013 || Friday || 10:30 - 13:15 || 4.1 || Luigi Malagò    ||  Linear Regression Methods (Ch. 2, Ch. 3, (*))
 +
|25/11/2013 || Monday || 13:15 - 15:00 || V08 || Davide Eynard    ||  Clustering I: Introduction and K-Means
 +
|29/11/2013 || Friday || 10:30 - 13:15 || V08 || Davide Eynard    ||  Clustering II: K-Means Alternatives, Hierarchical, SOM
 +
|02/12/2013 || Monday || 13:15 - 15:00 || V08 || Davide Eynard    ||  Clustering III: Mixture of Gaussians, DBSCAN, Jarvis-Patrick
 +
|06/12/2013 || Friday || 10:30 - 13:15 || V08 || Matteo Matteucci || Perceptron Learning and Maximum Margin Classifiers (Ch.4.5.2)
 +
|13/12/2013 || Friday || 10:30 - 13:15 || V08 || Davide Eynard    ||  Clustering IV: Spectral Clustering and Evaluation Measures
 +
|16/12/2013 || Monday || 13:15 - 15:00 || V08 || Matteo Matteucci || Support Vector Marchines (Ch.12.1, 12.2, 12.3)
 +
|20/12/2013 || Friday || 10:30 - 13:15 || V08 || Matteo Matteucci || Kernel Smoothing (Ch.6.1) and Kernel Density Estimation (Ch.6.6, Ch.6.9)
 +
 +
Kernel Smoothing Methods and Kerned Density Estimation (Ch.6.1,
 +
Gaussian Mixture Models (Ch.6.8) and the EM Algorithm (Ch.8.5)
 +
Decision Trees ([[Media:PAMI_DTnR.pdf |handout]] + Ch. 9.2)
 +
Perceptron Learning and Support Vector Machines (Ch 4.5)
 +
Maximum margin classification (Ch. 4.5.2)
 +
Support Vector Machines (Ch. 12.1, Ch. 12.2, Ch. 12.3.0, Ch. 12.3.1 + SVM paper)
 +
Model Selection (Ch. 7.1, 7.2, 7.3, 7.4, 7.5, 7.6, 7.7, 7.10,)
 +
Linear regression methods (Ch 2.1, 2.2, 2.3 and 2.3.1, 2.4, 2.6 and 2.6.1, 2.7 and 2.7.1, 2.8 and 2.8.1, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.9,  see paper "Least Angle Regression" linked below, pages 1-16)
 +
 +
(*) With respect to following version of the book [http://statweb.stanford.edu/~tibs/ElemStatLearn/printings/ESLII_print10.pdf PDF file of book (10th printing with corrections, Jan 2013)]
 +
*Chapter 2 is a good introductory chapter.
 +
**in particular refer to 2.3.1 for an introduction to least squares
 +
**section 2.4 for an introduction to statistical decision theory
 +
**section 2.5 for an example and 2.9 for a discussion about bias and variance decomposition of prediction error
 +
**section 2.8 for introduction to restricted (penalized) estimators
 +
*Chapter 3 is the most important chapter for linear regression
 +
**3.1
 +
**3.2 (you can skip confidence internals for \beta, but study the Z-scores)
 +
**3.2.2 the proof is not requires, the statement of the theorem is important
 +
**3.2.3 you can skip the regression by successive orthogonalizations, however dont skip the first part of the section
 +
**3.2.4 skip this section
 +
**3.3 very important
 +
**3.4 very important (i will not ask the formulas for the degrees of freedom of ridge and lasso)
 +
**3.5 you can skip this
 +
**3.6 take a look
 +
**3.7 you can skip this
 +
**3.8 take a look, you can skip 3.8.3 to 3.8.6
 +
**3.9 take a look
 +
*As to the paper [http://www.stanford.edu/~hastie/Papers/LARS/LeastAngle_2002.pdf Least Angle Regression] take a look at section 1 to 3
 +
-->
  
 
===Course Evaluation===
 
===Course Evaluation===
  
The course evaluation is composed by two parts:
+
The '''new''' course evaluation is composed by two parts:
  
* A homework with exercises covering the whole program that counts for 30% of the course grade
+
* HW: Homework with exercises covering the whole program
* A oral examination covering the whole progran that count for 70% of the course grade
+
* WE: A written examination covering the whole program
  
The homework is just one per year, it will be published at the end of the course and you will have 15 days to turn it in. It is not mandatory, however if you do not turn it in you loose 30% of the course grade. There is the option of substitute the homework with a practical project, but this has to be discussed and agreed with the course professor.
+
the final score will take the '''MAXIMUM''' between '''WE''' and the combination '''0.7*WE + 0.3*HW'''. In practice
 +
 
 +
* the homework can only increase your score
 +
* the homework can only impact for the 30% of the score
 +
* the homework is not mandatory
 +
 
 +
===Homeworks===
 +
 
 +
====Homework 2015/2016====
 +
 
 +
We have published the [http://davide.eynard.it/2016/01/11/statistical-learning-with-r-2016-edition/ Homework 2015/2016]. Please keep in mind:
 +
* the homework is not meant to get more grade, it is intended for you to understand better, i.e., from a practical perspective too, the topics of the course
 +
* the deadline to turn the homework in is the first time you take the PAMI exam, we will grade it when grading your classwork
 +
* you can make the homework in groups up to 2/3 people, the deadline to turn it in is the date the first person in the groups takes the exam (and it will be graded for all members in the group at that call)
 +
* provided you attended the lab lectures, and you have the R environment set up, the homework should require not more than 1 day per part
 +
 
 +
====Homework 2014/2015====
 +
 
 +
We have published the [http://davide.eynard.it/2015/01/05/statistical-learning-with-r-introduction-and-setup/ Homework 2014/2015]. Please keep in mind:
 +
* the homework is not meant to get more grade, it is intended for you to understand better, i.e., from a practical perspective too, the topics of the course
 +
* the deadline to turn the homework in is the first time you take the PAMI exam, we will grade it when grading your classwork
 +
* you can make the homework in groups up to 2/3 people, the deadline to turn it in is the date the first person in the groups takes the exam (and it will be graded for all members in the group at that call)
 +
* provided you attended the lab lectures, and you have the R environment set up, the homework should require not more than 1 day per part
  
 
==Teaching Material (the textbook)==  
 
==Teaching Material (the textbook)==  
  
Lectures will be based on material taken from the aforementioned slides and from the following book.
+
Lectures will be based on material taken from the book.
 +
 
 +
* [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
 +
 
 +
If you are interested in a more deep treatment of the topics you can refer to the following book from the same authors
  
* [http://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.
+
* [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.
  
 
Some additional material that could be used to prepare the oral examination will be provided together with the past homeworks.
 
Some additional material that could be used to prepare the oral examination will be provided together with the past homeworks.
Line 110: Line 284:
 
===Teacher Slides===
 
===Teacher Slides===
  
In the following you can find the lecture slides used by the teacher and the teaching assistants during classes:
+
In the following you can find the lecture slides used by the teacher and the teaching assistants during classes.
  
 +
Lectures:
 +
* [[Media:PAMI2015-01-Intro.pdf | [2015] 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.
 +
* [[Media:PAMI2015-02-StatisticalLearning.pdf | [2015] Statistical Learning Introduction]]: Statistical Learning definition, rationale, and trade-offs (e.g., prediction vs. inference, parametric vs non parametric models, flexibility vs. interpretability, etc.)
 +
* [[Media:PAMI2015-03-AssessingModelAccuracy.pdf | [2015] 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.
 +
* [[Media:PAMI2014-04-LinearRegression.pdf | [2014-2015] Linear Regression]]: Simple Linear Regression and Multiple Linear Regression. Feature selection. Ridge Regression and Lasso.
 +
* [[Media:PAMI2014-05-LinearClassification.pdf | [2014-2015] Linear Classification]]: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods.
 +
* [[Media:PAMI2014-06-SupportVectorMachines.pdf | [2014-2015] Support Vector Machines]]: Discriminative vs. generative methids. Hyperplanes learning and Perceptron. Maximum Margin Classifiers. The Kernel trick and Support Vector Machines.
 +
 +
For exercises and lab material please refer to [http://davide.eynard.it/pattern-analysis-and-machine-intelligence-2015-2016/ Davide Eynard website].
 +
 +
<!--
 +
http://davide.eynard.it/pattern-analysis-and-machine-intelligence-2015-2016/
 +
* Lab 1: Introduction to R
 +
**[[Media:BasicsofR.txt | Basics of R]]: the list of commands ran in Lab 01. Note that the list is heavily based on the Lab in Section 2.3 of the book (you can find the original [http://www-bcf.usc.edu/~gareth/ISL/code.html here]), but I preferred to integrate it with some additional hints from my personal experience and other sources such as [http://www.pitt.edu/~njc23/ this one])
 +
**[http://www.statlearning.com/ Statistical Learning]: the website of the Introduction to Statistical Learning book. In the [http://www-bcf.usc.edu/~gareth/ISL/data.html Data Sets and Figures] page you will also find links to download the Auto.data and Auto.cvs datasets we used during the Lab.
 +
**[http://cran.r-project.org/ The Comprehensive R Archive Network]: the place where you can download R and its packages (note that the book often refers to ISLR and MASS packages, it is good for you to install them soon)
 +
* [[Media:Lab02.pdf | Lab2]]: Questions and exercises on Statistical Learning
 +
* [[Media:Lab03.pdf | Lab3]]: First exercises on linear regression
 +
-->
 +
<!--
 
* [[Media:PAMI_Intro.pdf | Course introduction]]: introductory slides of the course with useful information about the grading, and the course logistics. Some examples from supervised learning and two algorithms for classification (taken from ''The Elements of Statistical Learning'' book).
 
* [[Media:PAMI_Intro.pdf | Course introduction]]: introductory slides of the course with useful information about the grading, and the course logistics. Some examples from supervised learning and two algorithms for classification (taken from ''The Elements of Statistical Learning'' book).
 
* [[Media:ProbabilityBasics.pdf | Probability Basics]]: Slides on probability basics used to introduce Statistical Decision Theory.
 
* [[Media:ProbabilityBasics.pdf | Probability Basics]]: Slides on probability basics used to introduce Statistical Decision Theory.
 +
* [[Media:PAMI_ModelSelection.pdf | Model Selection]]:  slides presenting images, tables and examples about model selection (taken from ''The Elements of Statistical Learning'' book).
 
* [[Media:PAMI_LinearClassification.pdf | Linear Classification Examples]]: slides presenting images, tables and examples about (generalized) linear methods for classification (taken from ''The Elements of Statistical Learning'' book).
 
* [[Media:PAMI_LinearClassification.pdf | Linear Classification Examples]]: slides presenting images, tables and examples about (generalized) linear methods for classification (taken from ''The Elements of Statistical Learning'' book).
 
* [[Media:PAMI_KernelSmoothing.pdf | Kernel Smoothing Examples]]: slides presenting images, tables and examples about Kernel Smoothing, Kernel Density Estimation and Gaussian Mixture Models (taken from ''The Elements of Statistical Learning'' book).
 
* [[Media:PAMI_KernelSmoothing.pdf | Kernel Smoothing Examples]]: slides presenting images, tables and examples about Kernel Smoothing, Kernel Density Estimation and Gaussian Mixture Models (taken from ''The Elements of Statistical Learning'' book).
 
* [[Media:PAMI_DTnR.pdf | Decision Trees and Classification Rules]]: these slides have been used to present decision trees and decision rules complementing the material in Ch. 9.2 of the ''The Elements of Statistical Learning'' book.
 
* [[Media:PAMI_DTnR.pdf | Decision Trees and Classification Rules]]: these slides have been used to present decision trees and decision rules complementing the material in Ch. 9.2 of the ''The Elements of Statistical Learning'' book.
 
* [[Media:PAMI_SVM.pdf | Support Vector Machines]]: these slides have been used to present Support Vector Machines (taken from ''The Elements of Statistical Learning'' book).
 
* [[Media:PAMI_SVM.pdf | Support Vector Machines]]: these slides have been used to present Support Vector Machines (taken from ''The Elements of Statistical Learning'' book).
 +
-->
  
===Additional Papers===
+
===Additional Resources===
Papers used to integrate the textbook
+
Papers and links useful to integrate the textbook
  
 +
* [http://scott.fortmann-roe.com/docs/BiasVariance.html Bias vs. Variance]: "Understanding the Bias-Variance Tradeoff" essay by Scott Fortmann-Roe
 +
* ...
 +
<!--
 
* Bradley Efron, Trevor Hastie, Iain Johnstone and Robert Tibshirani, [http://www.stanford.edu/~hastie/Papers/LARS/LeastAngle_2002.pdf Least Angle Regression] Annals of Statistics (with discussion) (2004) 32(2), 407-499.
 
* Bradley Efron, Trevor Hastie, Iain Johnstone and Robert Tibshirani, [http://www.stanford.edu/~hastie/Papers/LARS/LeastAngle_2002.pdf Least Angle Regression] Annals of Statistics (with discussion) (2004) 32(2), 407-499.
 
* Burges, Christopher J. C., 1998. [http://www.svms.org/tutorials/Burges1998.pdf A tutorial on support vector machines for pattern recognition]. Data Mining and Knowledge Discovery, 2(2), 121–167.
 
* Burges, Christopher J. C., 1998. [http://www.svms.org/tutorials/Burges1998.pdf A tutorial on support vector machines for pattern recognition]. Data Mining and Knowledge Discovery, 2(2), 121–167.
 
* ...  
 
* ...  
 +
-->
  
 +
<!--
 
===Clustering Slides===
 
===Clustering Slides===
 
These are the slides used to present clustering algorithms during lectures
 
These are the slides used to present clustering algorithms during lectures
Line 136: Line 337:
  
 
* Lesson 4: Evaluation measures ([http://davide.eynard.it/teaching/2012_PAMI/slides-lecture-e4.pdf slides], [http://davide.eynard.it/teaching/2012_PAMI/handout-lecture-e4.pdf handouts]) and Spectral Clustering ([http://davide.eynard.it/teaching/2012_PAMI/Spectral%20Clustering.pdf])
 
* Lesson 4: Evaluation measures ([http://davide.eynard.it/teaching/2012_PAMI/slides-lecture-e4.pdf slides], [http://davide.eynard.it/teaching/2012_PAMI/handout-lecture-e4.pdf handouts]) and Spectral Clustering ([http://davide.eynard.it/teaching/2012_PAMI/Spectral%20Clustering.pdf])
 +
 +
-->
  
 
===Past Exams and Sample Questions===
 
===Past Exams and Sample Questions===
These are the text of past exams to give and idea on what to expect during the class exam:
+
Since 2014/2015 the course was changed and the exams format as well. For this edition of the course you should expect '''2 theoretical questions + 2 practical exercises''' (on average). Some examples from the past year can be found here:
  
* [[Media:2012_02_03.pdf |03/02/2012 Exam]]
+
* [[Media:2015_02_09_PAMI.pdf |09/02/2015 Exam]]
* [[Media:2011_09_19.pdf |19/09/2011 Exam]]
+
* [[Media:2015_02_23_PAMI.pdf |23/02/2015 Exam]]
* [[Media:2011_09_08.pdf |08/09/2011 Exam]]
+
* [[Media:2015_06_07_PAMI.pdf |07/06/2015 Exam]]
* [[Media:2011_07_15.pdf |15/07/2011 Exam]]
+
* [[Media:2015_09_14_PAMI.pdf |14/09/2015 Exam]]
* [[Media:2011_06_29.pdf |29/06/2011 Exam]]
+
* [[Media:2015_09_30_PAMI.pdf |30/09/2015 Exam]]
* ...
+
 
 +
These are the text of past exams to give and idea on what to expect a theoretical questions:
 +
 
 +
* [[Media:2013_09_20_PAMI.pdf |20/09/2013 Exam]]
 +
* [[Media:2013_09_10_PAMI.pdf |10/09/2013 Exam]]
 +
* [[Media:2013_07_26_PAMI.pdf |26/07/2013 Exam]]
 +
* [[Media:2013_07_11_PAMI.pdf |11/07/2013 Exam]]
 +
* [[Media:2013_01_29_PAMI.pdf |29/01/2013 Exam]]
 +
* [[Media:2012_09_19_PAMI.pdf |19/09/2012 Exam]]
 +
* [[Media:2012_09_04_PAMI.pdf |04/09/2012 Exam]]
 +
* [[Media:2012_07_10_PAMI.pdf |10/07/2012 Exam]]
 +
* [[Media:2012_06_26_PAMI.pdf |26/06/2012 Exam]]
 +
* [[Media:2012_02_03_PAMI.pdf |03/02/2012 Exam]]
 +
* [[Media:2011_09_19_PAMI.pdf |19/09/2011 Exam]]
 +
* [[Media:2011_09_08_PAMI.pdf |08/09/2011 Exam]]
 +
* [[Media:2011_07_15_PAMI.pdf |15/07/2011 Exam]]
 +
* [[Media:2011_06_29_PAMI.pdf |29/06/2011 Exam]]
 +
 
 +
===Online Resources===
 +
 
 +
The following are links to online sources which might be useful to complement the material above
 +
 
 +
* [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'')
 +
 
 +
<!--
 +
== 2013-2014 Homework ==
 +
 
 +
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
 +
 
 +
=== Part 1: Linear Classification Methods ===
 +
 
 +
* [[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'''
 +
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework
 +
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework
 +
 
 +
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome)
 +
 
 +
'''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!!
 +
 
 +
=== Part 2: Regression ===
 +
* [[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'''
 +
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework
 +
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework
 +
** [[Media:diabete.mat | diabete.mat]]: the dataset used for the homework
 +
** [[Media:textread.m | textread.m]]: (optional) function which might be useful depending on your octave version
 +
** [[Media:strread.m | strread.m]]: (optional) function which might be useful depending on your octave version
 +
 
 +
For any question or doubt please sen us an email as soon as possible.
 +
 
 +
'''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 :-(
 +
 
 +
<strike>'''Note 2:''' rename the file Diabete.data into diabete.mat ... still fighting with the CSM :-)</strike>
 +
 
 +
'''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 ;-)
 +
 
 +
=== Part 3: Clustering ===
 +
 
 +
The code and the text of the third part of the homework are available online at this post
 +
 
 +
* [http://davide.eynard.it/2013/12/30/octave-clustering-demo-part-6-more-evaluation/ Homework 2013-2014 on clustering evaluation]
 +
 
 +
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'''.
 +
 
 +
'''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.
 +
 
 +
'''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.
 +
 
 +
=== Part 2: Classification ===
 +
 
 +
* [[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'''
 +
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework
 +
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework
 +
 
 +
'''Note 1:''' Submit the solution by loading it on www.dropitto.me/matteucci (pwd is dropittome)
 +
 
 +
'''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!!
 +
 
 +
 
 +
 
 +
'''Errata Corrige''': there were a few bugs in the homework text. I have updated the pdf and they were:
 +
 
 +
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows
 +
% maximization of a'*B*a / a'*w*a via SVD
 +
[Vw, Dw, Vw] = svd(W);
 +
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W
 +
Wminushalf = inv(Whalf);
 +
Mstar = M*Wminushalf;
 +
    % Add this variable for computing Mstar mean
 +
    meanMstar = mean(Mstar);
 +
for i=1:size(M,1)
 +
    % Remove the mean saved before the loop
 +
    Mstar(i,:) = Mstar(i,:)-meanMstar;
 +
end
 +
Bstar = Mstar'*Mstar;
 +
[Vstar, Db, Vstar] = svd(Bstar);
 +
 
 +
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
 +
 
 +
a = FisherProjection(X(training,:),Y(training,:));
 +
reducedX = X*a(:,1);
 +
[mu_0, mu_1, sigma, p_0, p_1] = linearDiscriminantAnalysis_train(reducedX(training), Y(training))
 +
 
 +
I forgot to filter for just the training samples when performing Quadratic Discriminant Analysis
 +
 
 +
quadX = expandToQuadraticSpace(X);
 +
%check this out!
 +
size(quadX)
 +
beta = linearRegression_train(quadX(training), Y(training));
 +
 
 +
And in general you should always train on the training data and test on the testing data ;-).
 +
 
 +
=== Part 3: Clustering ===
 +
 
 +
The code and the text of the third part of the homework are available online at these posts
 +
 
 +
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-4-k-medoids/ Homework 2013 on k-medoids]
 +
* [http://davide.eynard.it/2013/06/18/octave-clustering-demo-part-5-hierarchical-clustering/ Homework 2013 on hierarchical clustering]
 +
 
 +
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.
 +
 
 +
* [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.
  
 
== 2012 Homework ==
 
== 2012 Homework ==
 +
  
 
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
 
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
  
* [[Media:PAMI_homework_2012_1.pdf | Homework 2012 part 1]]: this is the text of the homework; it has been intentionally edited not to allow cut and paste. '''The deadline to submit the solution by email to matteucci@elet.polimi.it and malago@elet.polimi.it is Tuesday 5/6 23:59'''
+
* [[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'''
 
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework
 
** [[Media:prostate.data | prostate.data]]: the dataset used for the homework
 
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework
 
** [[Media:prostate.info | prostate.info]]: the dataset used for the homework
Line 158: Line 482:
  
 
'''Note:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(
 
'''Note:''' for some strange reason the CSM of the website has decided to rename the files with capitals, please save them in lower case :-(
 +
 +
* [[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).
 +
** [[Media:SAheart.data | SAheart.data]]: the dataset used for the homework
 +
** [[Media:SAheart.info | SAheart.info]]: the dataset used for the homework
 +
 +
'''Errata Corrige''': there were a few bugs a bug in the homework text. I have updated the pdf and they were:
 +
In the code for loading the data I forgot to remove the first column which you do not need
 +
data = dlmread('SAheart.data',',',1,1);
 +
X = data(:,1:9);
 +
Y = data(:,10);
 +
 +
In the StratifiedSampling function the sorted verctors should be assigned
 +
% just an ahestetic sorting
 +
testing = sort(testing);
 +
training = sort(training);
 +
 +
In the computation of feature projection, the code for the maximization of a'B*a via SVD should be changed as it follows
 +
% maximization of a'*B*a / a'*w*a via SVD
 +
[Vw, Dw, Vw] = svd(W);
 +
Whalf = Vw * sqrt(Dw) * Vw'; % Whalf'*Whalf == W
 +
Wminushalf = inv(Whalf);
 +
Mstar = M*Wminushalf;
 +
    % Add this variable for computing Mstar mean
 +
    meanMstar = mean(Mstar);
 +
for i=1:size(M,1)
 +
    % Remove the mean saved before the loop
 +
    Mstar(i,:) = Mstar(i,:)-meanMstar;
 +
end
 +
Bstar = Mstar'*Mstar;
 +
[Vstar, Db, Vstar] = svd(Bstar);
 +
 +
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.
 +
function extendedX = expandToQuadraticSpace(X)
 +
    % adds new columns to extendedX; keeps X for other calculations
 +
    extendedX = X;
 +
    for i=1:size(X, 2)
 +
        for j=i:size(X, 2)
 +
            newColumn = X(:, i) .* X(:, j);
 +
            extendedX = [extendedX newColumn];
 +
        end
 +
    end
 +
    % remove duplicated columns
 +
    duplicates = [];
 +
    for i=1:size(extendedX, 2)
 +
        for j=i+1:size(extendedX, 2)
 +
            if(sum(extendedX(:,i)==extendedX(:,j)) == size(X,1))
 +
                duplicates = [duplicates j];
 +
            end
 +
        end
 +
    end
 +
    extendedX(:,duplicates) = [];
 +
end
 +
 +
* [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)
 +
 +
'''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 ;-)
  
 
== 2011 Homework ==
 
== 2011 Homework ==
Line 182: Line 562:
  
 
* '''''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!
 
* '''''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!
 +
 +
-->

Latest revision as of 03:01, 9 October 2016


The following are last minute news you should be aware of ;-)

09/10/2016: Scores from the 28/09/2016 written exam are published here!!
20/09/2016: Scores from the 09/09/2016 written exam are published here!!
31/07/2016: Scores from the 06/07/2016 written exam are published here!!
13/03/2016: Scores from the 19/02/2016 written exam are published here!!
16/02/2016: Scores from the 03/02/2016 written exam are published here!!
18/01/2015: PAMI Homework has been published!
15/12/2015: Schedule revised until January (Note: on Friday 18/12/2015 there will be exercising with Eynard)
09/12/2015: PAMI Exams for the Winter Calls will be on: 03/02/2016 and 19/02/2016
25/10/2015: Updated slides on Statistical Decision Theory and Model Assessment
11/10/2015: Added link to Teaching Assistant website for his material
09/10/2015: New edition of PAMI website is out, stay tuned!

Course Aim & Organization

The objective of this course is to give an advanced presentation, i.e., a statistical perspective, of the techniques most used in artificial intelligence and machine learning for pattern recognition, knowledge discovery, and data analysis/modeling.

Teachers

The course is composed by a blending of lectures and exercises by the course teacher and a teaching assistant.

Course Program

Techniques from machine and statistical learning are presented from a theoretical (i.e., statistics and information theory) and practical perspective through the descriptions of algorithms, the theory behind them, their implementation issues, and few examples from real applications. The course follows, at least partially, the following new book which is available for download in pdf

The course is composed by a set of ex-cattedra lectures on specific techniques (e.g., linear regression, linear discriminant analysis, clustering, etc.). Supervised and unsupervised learning are discussed in the framework of classification and clustering problems. The course outline is:

  • Machine Learning and Pattern Classification: the general concepts of Machine Learning and Patter Recognition are introduced with a brief review of statistical decision theory;
  • Linear Classification Techniques: linear methods for classification will be presented as the starting point (e.g., Linera Regression on the indicator matrix, Linear and Quadratic Discriminant Analysis, Logistic Regression, Percptron rule and Optimal Separating Hyperplanes, a.k.a., Support Vector Machines)
  • Linear Regression Techniques: linear methods for regression will be disccussed and compared (e.g., Linear Regression, Ridge Regression, Lasso, LARS).
  • Unsupervised Learning Techniques: the most common approaches to unsupervised learning are described mostly focusing on clustering techniques such as hierarchical clustering, k-means, k-medoids, Mixture of Gaussians, DBSCAN, Jarvis-Patrick, etc.;
  • Model Validation and Selection: model validation and selection are orthogonal issues to all previous techniques; during the course their fundamentals are described and discussed (e.g., AIC, BIC, cross-validation, etc. ).

Detailed course schedule

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!!

Note: Lecture timetable interpretation
* On Mondays, in V.08, starts at 13:30 (quarto d'ora accademico), ends at 15:15
* On Fridays, in V.08, starts at 10:30 (quarto d'ora accademico), ends at 12:15 or 13:15 (check!)
Date Day Time Room Teacher Topic
05/10/2015 Monday 13:15 - 15:15 V08 Matteo Matteucci Course Introduction (Ch. 1 ISL)
09/10/2015 Friday 10:15 - 13:15 V.S8-B Matteo Matteucci Statistical Decision Theory and Bias-Variance trade off. (Ch. 2 ISL)
12/10/2015 Monday 13:15 - 15:15 V.S8-B Davide Eynard Introduction to R (Ch. 2 ISL)
16/10/2015 Friday 10:15 - 13:15 V.S8-B Matteo Matteucci Statistical Decision Theory and Model Assessment. (Ch. 2 ISL)
19/10/2015 Monday - - - No PAMI Classes Today
23/10/2015 Friday 10:15 - 13:15 V.S8-B Matteo Matteucci Statistical Decision Theory and Model Assessment. (Ch. 2 ISL)
26/10/2015 Monday 13:15 - 15:15 V.S8-B Davide Eynard Statistical Decision Theory Exercises (Ch. 2 ISL)
30/11/2015 Friday 10:15 - 12:15 V.S8-B Matteo Matteucci Linear Regression (Ch. 2 ISL + Ch. 3 ISL)
02/11/2015 Monday 13:15 - 15:15 V.S8-B Davide Eynard Exercises on Simple Linear Regression (Ch. 3 ISL)
06/11/2015 Friday 10:15 - 13:15 V.S8-B Matteo Matteucci Linear Regression (Ch. 2 ISL + Ch. 3 ISL)
09/11/2015 Monday 13:15 - 15:15 V.S8-B Davide Eynard Exercises on Linear Regression and Feature Selection
13/11/2015 Friday 10:15 - 13:15 V.S8-B Matteo Matteucci Linear Regression and Feature Selection (Ch. 3 + Ch. 6 ISL)
16/11/2015 Monday 13:15 - 15:15 V.S8-B Davide Eynard Intro Clustering
20/11/2015 Friday 10:15 - 12:15 V.S8-B Davide Eynard Clustering with exercises
23/11/2015 Monday 13:15 - 15:15 V.S8-B Davide Eynard Clustering Advanced
27/11/2015 Friday 10:15 - 13:15 V.S8-B Matteo Matteucci Feature Selection and Shrinkage in Linear Regression (Ch. 6 ISL)
30/11/2015 Monday 13:15 - 15:15 V.S8-B Davide Eynard Exercises on Clustering
04/12/2015 Friday 10:15 - 13:15 V.S8-B Matteo Matteucci Classification by Logistic Regression (Ch. 4 ISL + Ch. 4 ESL)
07/12/2015 Monday - - - No PAMI Classes Today
11/12/2014 Friday 10:15 - 13:15 V.S8-B Matteo Matteucci Classification by Linear Discriminant Analysis (Ch. 4 ISL)
14/12/2014 Monday 13:15 - 15:15 V.S8-B Davide Eynard Exercises on Classification
18/12/2015 Friday 10:15 - 12:15 V.S8-B Davide Eynard Exercises on Classification
21/12/2015 Monday - - - No PAMI Classes Today
11/01/2014 Monday 13:15 - 15:15 V.S8-B Matteo Matteucci Classification: from generative to discriminative approaches (Ch. 4 ISL + Ch. 4 ESL)
15/12/2015 Friday 10:15 - 12:15 V.S8-B Matteo Matteucci Support Vector Machines (Ch. 4 ESL, Ch. 9 ISL, Ch. 12 ESL)

Chapters are intended as complete except for

  • Ch.4 ESL: Section 4.5
  • Ch.12 ESL: Sections 12.1, 12.2, 12.3
  • Ch.9 ISL: Sections 9.1, 9.2, 9.3


Course Evaluation

The new course evaluation is composed by two parts:

  • HW: Homework with exercises covering the whole program
  • WE: A written examination covering the whole program

the final score will take the MAXIMUM between WE and the combination 0.7*WE + 0.3*HW. In practice

  • the homework can only increase your score
  • the homework can only impact for the 30% of the score
  • the homework is not mandatory

Homeworks

Homework 2015/2016

We have published the Homework 2015/2016. Please keep in mind:

  • the homework is not meant to get more grade, it is intended for you to understand better, i.e., from a practical perspective too, the topics of the course
  • the deadline to turn the homework in is the first time you take the PAMI exam, we will grade it when grading your classwork
  • you can make the homework in groups up to 2/3 people, the deadline to turn it in is the date the first person in the groups takes the exam (and it will be graded for all members in the group at that call)
  • provided you attended the lab lectures, and you have the R environment set up, the homework should require not more than 1 day per part

Homework 2014/2015

We have published the Homework 2014/2015. Please keep in mind:

  • the homework is not meant to get more grade, it is intended for you to understand better, i.e., from a practical perspective too, the topics of the course
  • the deadline to turn the homework in is the first time you take the PAMI exam, we will grade it when grading your classwork
  • you can make the homework in groups up to 2/3 people, the deadline to turn it in is the date the first person in the groups takes the exam (and it will be graded for all members in the group at that call)
  • provided you attended the lab lectures, and you have the R environment set up, the homework should require not more than 1 day per part

Teaching Material (the textbook)

Lectures will be based on material taken from the book.

If you are interested in a more deep treatment of the topics you can refer to the following book from the same authors

Some additional material that could be used to prepare the oral examination will be provided together with the past homeworks.

Teacher Slides

In the following you can find the lecture slides used by the teacher and the teaching assistants during classes.

Lectures:

  • [2015] 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.
  • [2015] Statistical Learning Introduction: Statistical Learning definition, rationale, and trade-offs (e.g., prediction vs. inference, parametric vs non parametric models, flexibility vs. interpretability, etc.)
  • [2015] 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.
  • [2014-2015] Linear Regression: Simple Linear Regression and Multiple Linear Regression. Feature selection. Ridge Regression and Lasso.
  • [2014-2015] Linear Classification: From Linear Regression to Logistic Regression. Linear Discriminant Analysis and Quadratic Discriminant Analysis. Comparison between linear classification methods.
  • [2014-2015] Support Vector Machines: Discriminative vs. generative methids. Hyperplanes learning and Perceptron. Maximum Margin Classifiers. The Kernel trick and Support Vector Machines.

For exercises and lab material please refer to Davide Eynard website.


Additional Resources

Papers and links useful to integrate the textbook

  • Bias vs. Variance: "Understanding the Bias-Variance Tradeoff" essay by Scott Fortmann-Roe
  • ...


Past Exams and Sample Questions

Since 2014/2015 the course was changed and the exams format as well. For this edition of the course you should expect 2 theoretical questions + 2 practical exercises (on average). Some examples from the past year can be found here:

These are the text of past exams to give and idea on what to expect a theoretical questions:

Online Resources

The following are links to online sources which might be useful to complement the material above

  • 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)