Fitting data with models.
This course is about finding mathematical models to fit empirical data coming from
measures (e.g. from engineering applications, econometric time series, statistical surveys, and so on.).
To fix ideas, think of a series of input-output pairs (xi, yi).
The first steps will be to understand what a mathematical model actually is
(in the simplest case, just a real-valued function mapping input to output: y = f(x)), to distinguish between
static models versus dynamical ones,
to justify the main goal of fitting (typically prediction of future observations: ypredicted = f(xfuture)),
and to justify the need for a reasonable model class:
indeed, in no way one can start the fitting endeavour from "no knowledge at all", or s/he will immediately
find him/herself disoriented by the immense complexity of the set of "all the possible models" (whatever this may mean),
get lost in the swamp of non-uniqueness, and almost surely obtain a completely useless model.
No: the experimenter must start from a "theory", i.e. from a restricted
and sufficiently simple set of models, coming from past experience, scientific laws, or just common sense.
Interval predictor models.
This is a recent development, in particular due to Marco Campi,
Giuseppe Calafiore (Politecnico di Torino), and Simone Garatti (Politecnico di Milano).
The ultimate goal of this method, alike the least squares method,
is to predict the behavior of future data. In this case, though, the estimate
will not come in the form of a function, fitted to the past data, that is supposed
to map a future independent variable x to a
prediction of the future dependent variable y; instead, the method will yield a function
that maps a future x to an entire interval which, with certified probability, will
contain the future y.
In particular, the computation of such an "interval predictor" relies on the solution of
a convex optimization problem, and the probabilistic guarantee comes from a clever application
of a deep result in geometry, Helly's theorem.
Both Least Squares and the method of Interval Predictor Model are forms of what in statistics is called
regression: we will see how both of them (and other regression methods) can be
interpreted geometrically as the minimization of a distance.
All these subjects will be illustrated with practical examples. Exercise classes will provide an introduction to standard system identification software (in Matlab/Octave, Python or R, depending on the context). Possibly, the course will be integrated with seminars on real applications, given by members of our research group. Finally, if there is enough time, we will investigate in more depth the algebraic aspects of the least squares method with a fast-paced introduction to the so-called Moore-Penrose pseudoinverse, and/or with the introduction to the Levenberg-Marquardt algorithm, a standard method for solving nonconvex least squares problems.
The prerequisite of the course is a working knowledge of calculus, linear algebra, and probability theory; prior exposition to a course in signals and systems will be very useful. Some results which are not usually taught in basic courses will be reviewed when needed.
The course will be taught in English. The lecture schedule is as follows:
| Day | Time | Place |
|---|---|---|
| Tuesday | 17:00 - 19:00 | Room M1 (via Valotti 9) |
| Wednesday | 16:00 - 19:00 | Room B2.4 (via Branze 43) |
Office hours will be scheduled during the first week. Anyway, if you attend the course and you want to discuss the material seen in class or ask questions, we can arrange other meetings as well.
I suspect that the first lectures will suffer from a transient
due to the requirement frontal lecturing + remote lecturing and the
planned change in technology (from Google Meet to MS Teams).
Please subscribe to the Moodle community for the latest news:
DDSM 2021/22
| Date | Time | Place |
|---|---|---|
| ? | ? | ? |
The exam will be written (no books or notes allowed) and oral, at fixed sessions. The written test will be in English, and the oral examination will be in English or Italian, at your choice.
To those who could not subscribe to the course: please send me an email before the written test to confirm your participation.
| File | Comments |
|---|---|
| short_ddsm.pdf | Here you will soon find a "compact" and agile set of lecture notes for the course; they will be inserted and grown as the course goes on, week after week. In the meanwhile, you may refer to chapters 1 and 3 of the lecture notes below. |
| sida.pdf | These are the lecture notes of the old course, System Identification and Data Analysis. They cover only some subjects of this course (and other subjects that will not be taught), but for now Chapters 1, 3 and the Appendices will serve as a good start. If you spot errors or if you have other suggestions, please send me an email. |
| Insane correlations | "There is a 95% correlation between this and that, hence we have strong statistical evidence that..." Have a look at this page before you even dream of completing the sentence! |
| (youtube video) | Review of Linear Algebra 1 (ca. 50 minutes): MIT 18.085 Computational Science and Engineering I, Fall 2008 Recitation 1, by prof. Gilbert Strang. MIT OpenCourseWare, © The Massachusetts Institute of Technology. |
| (youtube video) | Review of Linear Algebra 2 (ca. 60 minutes): MIT 18.085 Computational Science and Engineering Lecture 1, by prof. Gilbert Strang.
MIT OpenCourseWare, © The Massachusetts Institute of Technology. (This and the previous link point to lectures from two different editions of the same course, delivered by one of the best teachers in the world. Needless to say, you would gain a lot by watching other lectures of that course, although they are not necessarily related to our course.) |
| lscode.zip | Matlab/Octave code: exercises on least squares. |
| constrained.zip | Matlab/Octave code: example of constrained least squares. |
| model_order.zip | Matlab/Octave code: examples on model order selection (polynomial interpolation) with FPE and regularization. |
| ar_predictor.m | Matlab/Octave code: optimal predictor of an AR(2) process and comparison with sub-optimal predictors.. |
| idcode.zip | Matlab/Octave code for ARX identification and instrumental variables. |
| yule.pdf | George Udny Yule, On a Method of Investigating Periodicities in Disturbed Series, with Special Reference to Wolfer's Sunspot Numbers, Philosophical Transactions of the Royal Society of London, 1927. |
| sunspots.zip | Matlab/Octave and R code: AR(2) fit of Wolf's sunspot numbers, as in Yule's paper. |
| nllscode.zip | Matlab/Octave code: Levenberg-Marquardt method and examples. |
In general, the material provided above will be sufficient for the course's purposes. Nevertheless, the good-willing student (informally known as you) is of course welcome to refer to other sources as well. A standard textbook that covers in full generality classical and modern aspects of system identification is
Regarding the Interval Predictor Models method, which is a recent development, the interested student can also refer to the following original research paper (they cover the respective subjects in far more depth than we will do in class):