This course (part I and II) is a general introduction to machine learning focusing on the fundamental modern topics in this field and providing the theoretical bases and concepts behind key algorithms. The course aims to provide a deep understanding of the nature of the problems addressed in machine learning and of the computational strategies behind the most popular approaches in this field. The topics we cover include design and analysis of machine learning experiments, supervised learning, unsupervised learning, active learning, reinforcement learning, Bayesian decision theory, parametric methods, multivariate methods, multilayer perceptrons, local models, hidden Markov models, kernel machines, graphical models. Short programming assignments include hands-on experiments with various learning algorithms.