Source: http://www.math.ens.fr/cours-apprentissage/TP/TPIntro.pdf