Introduction to Machine Learning#

About Artificial Intelligence#

The original ambition of AI#

“AI is the science and engineering of making intelligent machines.” (John McCarthy)

“Every aspect of learning or any other feature of intelligence can in principle be so precisely described that a machine can be made to simulate it.” (Dartmouth Workshop, 1956)

“AI is the science of making machines do things that would require intelligence if done by men.” (Marvin Minsky)

A technical definition of AI#

“AI refers to systems that display intelligent behavior by analysing their environment and taking actions - with some degree of autonomy - to achieve specific goals.” (EC, 2018)

AI systems can be either:

  • Purely software-based (e.g. voice assistants, search engines, face recognition systems).

  • Embedded in hardware devices (e.g. robots, autonomous cars, drones).

Main areas of AI research#

  • Problem solving (e.g. search algorithms, constraint solving).

  • Reasoning and decision making (e.g. logic, knowledge representation).

  • Machine Learning.

  • Real-world interactions (e.g. computer vision, natural language understanding, robotics).

AI as a moving target#

As soon as AI successfully solves a problem, the problem is no longer considered a part of AI.

The tumultuous history of AI#

The AI timeline

A highly interdisciplinary field#

AI fields

AI as a social science#

AI has many social and societal implications:

  • Job market transformation.

  • Human/machine interactions.

  • Trust and acceptability.

  • Legal aspects and regulation.

  • Fairness.

  • Ethical use.

  • Privacy and usage of personal data.

AI comes in different flavours#

  • Substitutive intelligence: replacement of men by machines.

  • Augmented intelligence: human-centered AI for performance augmentation & autonomy enhancement.

  • Hybrid intelligence: human-machine collaboration on complex tasks.

A broader definition of AI#

“AI is an interdisciplinary field aiming at understanding and imitating the mechanisms of cognition and reasoning, in order to assist or substitute humans in their activities.” (Commission d’enrichissement de la langue française, 2018)

The Machine Learning paradigm#

The first definition of Machine Learning#

“The field of study that gives computers the ability to learn without being explicitly programmed.” (Arthur Samuel, 1959).

Machine Learning in a nutshell#

Set of techniques for giving machines the ability to to find patterns and extract rules from data, in order to:

  • Identify or classify elements.

  • Detect tendencies.

  • Make predictions.

As more data is fed into the system, results get better: performance improves with experience.

a.k.a. Statistical Learning.

A new paradigm…#

Programming paradigm

Training paradigm

… Or merely a bag of tricks?#

ML on XKCD

The Machine Learning workflow#

  1. Frame the problem.

  2. Collect, analyze and prepare data.

  3. Select and train several models on data.

  4. Tune the most promising model.

  5. Deploy the model to production.

ML is not a silver bullet!#

  • Some use cases are a better fit for ML than others:

    • Difficulty to express the actions as rules.

    • Data too complex for traditional analytical methods.

    • Performance > interpretability.

  • Data quality is paramount.

The Machine Learning landscape#

AI, Machine Learning and Deep Learning#

AI/ML/DL Venn diagram

Typology of ML systems#

ML systems are traditionally classified in three categories, according to the amount and type of human supervision during training. Hybrid approaches exist.

  • Supervised Learning: expected results (called labels or tags) are given to the system along with training data.

  • Unsupervised Learning: training data comes without the expected results. The system must discover some structure in the data by itself.

  • Reinforcement Learning: without being given an explicit goal, the system’s decisions produce a reward it tries to maximize.

ML category tree

Regression#

The system predicts continuous values. Examples: temperature forecasting, asset price prediction…

Regression example

Classification#

The system predicts discrete values: input is categorized.

Classification example

Classification types#

  • Binary: only two possibles classes. Examples: cat/not a cat, spam/legit mail, benign/malignant tumor.

  • Multiclass: several mutually exclusive classes. Example: handwritten digit recognition.

  • Multilabel: several non-mutually exclusive classes. Example: face recognition.

Clustering#

Data is partitioned into groups.

ML clustering example

Anomaly Detection#

The system is able to detect abnomal samples (outliers).

ML anomaly detection example

Game AI#

Hide code cell source
from IPython.display import YouTubeVideo

YouTubeVideo("TmPfTpjtdgg")

How do machines learn, actually?#

Algorithm #1: K-Nearest Neighbors#

Prediction is based on the k nearest neighbors of a data sample.

K-NN

Algorithm #2: Decision Trees#

Build a tree-like structure based on a series of discovered questions on the data.

Decision Tree for Iris dataset

Algorithm #3: Neural Networks#

Layers of loosely neuron-inpired computation units that can approximate any continuous function.

Neuron output

Dog or Cat?

The advent of Deep Learning#

The Deep Learning tsunami#

DL is a subfield of Machine Learning consisting of multilayered neural networks trained on vast amounts of data.

AlexNet'12 (simplified)

Since 2010, DL-based approaches outperformed previous state-of-the-art techniques in many fields (language translation, image and scene recognition…).

Reasons for success#

  • Explosion of available data.

  • Huge progress in computing power.

  • Refinement of many existing algorithms.

  • Availability of sophisticated tools for building ML-powered systems.

TF, Keras and PyTorch logos

Big data universe

Computer power sheet

From labs to everyday life in 25 years#

LeCun - LeNet

Facial recognition in Chinese elementary school