Introduction to Machine Learning - Heidelberg University

45
Introduction to Machine Learning JULIAN MARTUS

Transcript of Introduction to Machine Learning - Heidelberg University

Introduction toMachine LearningJULIAN MARTUS

Machine learning […] gives computers the ability to learn without being explicitly programmed- ARTHUR SAMUEL, 1959 (AI-PIONEER)

Learning: modification of a behavioraltendency by experience- MERRIAM WEBSTER DICTONARY

MotivationMachine Learning Appliances

Value Prediction Anomaly Detection

ClusteringStructuring

Classification

Anomaly Detection

ClusteringStructuring

Classification

Value Prediction

Analyse stock

market

Estimate demand

PredictSales

Value Prediction Anomaly Detection

ClusteringStructuring

Classification

Value Prediction Anomaly Detection

Classification

ClusteringStructuring

Find Patterns

Recommender System

Social Network Analysis

Value PredictionAnomalyDetection

ClusteringStructuring

Classification

Value Prediction Anomaly Detection

ClusteringStructuring

Classification

Computer Vision

Speech Recognition

Value PredictionAnomalyDetection

ClusteringStructuring

Classification

Value Prediction

ClusteringStructuring

Classification

AnomalyDetection

Anti-Virus

Detect Fraud

Abnormal Equipment Readings

ML-AlgorithmsHOW DOES IT WORK

HOW DOES IT WORK

Data

Model

Use

clean

un-supervisedsuper

vised

Value PredictionAnomalyDetection

ClusteringStructuring

Classification

Data

Model

Use

Features

Instances

Unlabeled dataset – Iris (flower)

Sepal length Sepal width Petal length petal width

5,1 3,5 1,4 0,25,0 3,4 1,5 0,26,6 3,0 4,4 1,47,1 3,0 5,9 2,16,3 2,5 5,0 1,96,5 3,0 5,2 2,06,2 3,4 5,4 2,3

Data

Model

Use

Unsupervisedlearning

Data

Model

Use

Data

Model

Use

0

0,5

1

1,5

2

2,5

3

1 1,5 2 2,5 3 3,5 4 4,5 5

Peta

lwid

th[c

m]

Sepal width [cm]

Iris Dataset

SEPERATING DATA

Data

Model

Use

0

1

2

3

0 5

Pet

alw

idth

[cm

]

Sepal width [cm]

Iris Dataset

K-MeansPARTITION N OBSERVATIONSINTO K CLUSTERS

Data

Model

Use

0

1

2

3

0 5

Pet

alw

idth

[cm

]

Sepal width [cm]

Iris Dataset

K-MeansPARTITION N OBSERVATIONSINTO K CLUSTERS

MATLAB Demo

Data

Model

Use

Data

Create model

Use

LabelSepal length

Sepal width Petal length petal width

Setosa 5,1 3,5 1,4 0,2

Versicolor 5,0 3,4 1,5 0,2

Setosa 6,6 3,0 4,4 1,4

Versicolor 7,1 3,0 5,9 2,1

Virginica 6,3 2,5 5,0 1,9

Virginica 6,5 3,0 5,2 2,0

Virginica 6,2 3,4 5,4 2,3

Labeled dataset – Iris (flower)

Supervised Learning

Data

Model

Use

Logistic RegessionCUTTING LABELED DATA

Data

Create model

Use

0

0,2

0,4

0,6

0,8

1

1,2

1,4

1,6

1,8

2

0 0,5 1 1,5 2 2,5 3 3,5 4 4,5 5

Peta

lwid

th[c

m]

Sepal width [cm]

Iris Dataset

DRAW RANDOM LINE

Logistic Regession

Data

Create model

Use

0

0,2

0,4

0,6

0,8

1

1,2

1,4

1,6

1,8

2

0 0,5 1 1,5 2 2,5 3 3,5 4 4,5 5

Peta

lwid

th[c

m]

Sepal width [cm]

Iris Dataset

CALCULATE ERROR FUNCTION

Logistic Regession

Data

Create model

Use

0

0,2

0,4

0,6

0,8

1

1,2

1,4

1,6

1,8

2

0 0,5 1 1,5 2 2,5 3 3,5 4 4,5 5

Peta

lwid

th[c

m]

Sepal width [cm]

Iris Dataset

MOVE LINE TO REDUCE ERROR

Logistic Regession

Data

Create model

Use

0

0,2

0,4

0,6

0,8

1

1,2

1,4

1,6

1,8

2

0 0,5 1 1,5 2 2,5 3 3,5 4 4,5 5

Peta

lwid

th[c

m]

Sepal width [cm]

Iris Dataset

REPEAT UNTIL ERROR IS MINIMAL

Logistic Regession

Data

Create model

Use

0

0,2

0,4

0,6

0,8

1

1,2

1,4

1,6

1,8

2

0 0,5 1 1,5 2 2,5 3 3,5 4 4,5 5

Peta

lwid

th[c

m]

Sepal width [cm]

Iris Dataset

REPEAT UNTIL ERROR IS MINIMAL

Logistic Regession

ModelUse

Data

Model

Use

0

0,2

0,4

0,6

0,8

1

1,2

1,4

1,6

1,8

2

0 0,5 1 1,5 2 2,5 3 3,5 4 4,5 5

Peta

lwid

th[c

m]

Sepal width [cm]

Iris Dataset

Logistic Regession

Data

Model

Use

Logistic Regession

y= 0,24x

0

0,2

0,4

0,6

0,8

1

1,2

1,4

1,6

1,8

2

0 1 2 3 4 5

Peta

lwid

th[c

m]

Sepal width [cm]

Iris Dataset

0,24x – y = 0

Data

Model

Use

Logistic Regession

0

0,2

0,4

0,6

0,8

1

1,2

1,4

1,6

1,8

2

0 0,5 1 1,5 2 2,5 3 3,5 4 4,5 5

Peta

lwid

th[c

m]

Sepal width [cm]

Iris Dataset

0,24x – y > 0

0,24x – y < 0

Data

Model

Use

0

0,5

1

1,5

2

2,5

3

0 0,5 1 1,5 2 2,5 3 3,5 4 4,5 5

Peta

lwid

th[c

m]

Sepal width [cm]

Iris Dataset

Non-binary dataset

Data

Model

Use0

0,5

1

1,5

2

2,5

3

0 1 2 3 4 5

y

x

0

0,5

1

1,5

2

2,5

3

0 1 2 3 4 5

y

x

0

1

0,24x – y = 0

Data

Model

Use0

0,5

1

1,5

2

2,5

3

0 1 2 3 4 5

y-1

0

0,5

1

1,5

2

2,5

3

0 1 2 3 4 5

x-0,6

0

1

Simplified Neural Net

input layer hidden layer output layer

Data

Create model

Use

Data

Model

Use0

0,5

1

1,5

2

2,5

3

0 1 2 3 4 5

y-1

0

0,5

1

1,5

2

2,5

3

0 1 2 3 4 5

x-0,6

0

1

0

0

Simplified Neural Net x= 3 y= 1

-2,28?-2,28>0

0.2?0,6>1

Hardware AccelerationFOR NEURAL NETS

GPUPARALLEL STRUCTURE OF NEURONS

FPGACAN BE EASLEY ADAPTED

ASICSLOW PRECICION GPUADAPTED MEMORY ACCESS PATTERNS

Outlook

Thank you