Adversarial ML
Perturbing an image before giving it to the NN can alter Massively the results

Supervised Learning
- Regression
- Classification
- Loss Function
The supervisor tells you how wrong you are. Learning means to respect the supervision (determine the right weights such that the input corresponds to the outputs)
Learning Environment: Collection of inputs and the corresponding outputs.
Regression
Given the height of a person we want to predict his weight as a function oh : , from a collection of supervised data
We need an output corresponding to a real number
Classification
Determine if a picture represent a number between 0-9.
We need an output corresponding to a set of numbers, more generally corresponding to a category
Measure the Learning Process:
In case of supervised learning a measure of the learning process can be represented by the Loss: a sort of distance between the machine-found output and the actual output:

Our objective is to minimize: , defined as the Loss Function.
There exist infinite loss functions another one can be: or
In case of classification the loss function becomes a little more complicated because we are working with discrete numbers (or classes), but we can still find a loss function.
Unsupervised Learning
- Linear Separation (data clustering)
Find patterns in the data.
Linear Separation

To perform data clustering we can use the geometric distance of two points:
- Given the data point and two cluster points and with define with the distance between 2 points.
- If than will belong to the cluster else, to the cluster
Using the right tool for the job

Using the loss function shown in the picture is actually a bad idea. In this case the machine thinks that the 3 is more similare the the 2 to the reference image.