Top Banner
Introduction to Machine Learning Jim Tørresen – e-mail: [email protected] Research group Robotics and Intelligent Systems Department of Informatics, University of Oslo
30

Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

May 20, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

Introduction to Machine LearningJim Tørresen – e-mail: [email protected] group Robotics and Intelligent SystemsDepartment of Informatics, University of Oslo

Page 2: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

What is the Machine Learning about?• Technology that can adapt through learning• Systems that can sense, reason (think)

and/or act/respond• Inspired from biology/nature• Increase intelligence in both single node and

multiple node systems

5

Page 3: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

Man/Woman vs Machine – Who are smartest?

• Machines are good at: – number crunching – storing data and searching in data– specific tasks (e.g. control systems in

manufacturing)• Humans are good at:

– sensing (see, hear, smell etc and be able to recognize what we senses)

– general thinking/reasoning – motion control (speaking, walking etc).

7

Page 4: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

Major Mechanisms in Nature

• Evolution: Biological systems develop and change during generations.

• Development/growth: By celldivision a multi-cellular organismis developed.

• Learning: Individuals undergo learning through their lifetime.

• Collective behavior: Immune systems, flocks of birds, fishes etc

• Sensing and motion

Page 5: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

AI, machine learning, deep learning…

Page 6: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

What Methods are Best?

12

Page 7: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

Self learning/Machine learning

System to be designed

Data set/ specification

Algorithm

Page 8: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

Data Driven Modeling in Machine Learning

14

Page 9: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

Artificial Neural Network

15

Processing Element

Page 10: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

2018.02.16 18

Types of Machine Learning (1)• Supervised learning: Training data includesdesired outputs. Based on this training set, thealgorithm generalises to respond correctly to allpossible inputs.

• Unsupervised learning: Training data does notinclude desired outputs, instead the algorithmtries to identify similarities between the inputsthat have something in common are categorisedtogether.

Page 11: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

19

Page 12: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

Classification

AlgorithmModel

Lion

Lion

Page 13: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

Forecasting, prediction and abnormality detection

Page 14: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

Deep learning algorithms• Feature extraction/creation

• Deep belief networks (DBN)• Autoencoders

• Classification/recognition• Deep neural networks• Convolutional neural networks

(CNN)• Time series/sequences/prediction

• Recurrent neural networks (RNN) • Long short term memory

Page 15: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

2018.02.16 23

Types of Machine Learning (2)• Reinforcement learning: The algorithm is toldwhen the answer is wrong, but does not get toldhow to correct it. Algorithm must balanceexploration of the unknown environment withexploitation of immediate rewards to maximize long-term rewards.

• Evolutionary learning: Biological organisms adaptto improve their survival rates and chance of havingoffspring in their environment, using the idea offitness (how good the current solution is).

Page 16: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

2018.02.16 25

Search Space

Page 17: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

Divide-and-Conquer

26

Page 18: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

Machine Learning Toolboxes (we have used)

• MathWorks/MATLAB Statistics and Machine Learning Toolbox

• Scikit-learn (Python)

• TensorFlow (C++/Python, Google team)

• Weka (Java, lower level than Python )

Other options:

• Theano (Python, competitor to TensorFlow)

• Keras: Deep Learning library for Theano and TensorFlow

• Lasagne Build and train neural networks in Theano (alt. to Keras) 27

Page 19: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

Learn More (Courses at Univ of Oslo)

• STK2100 - Machine learning and statistical methods for prediction and classification (first time Spring 2017)

• INF4490 - Biologically inspired computing (autumn, ROBIN group responsible)

• INF5860 - Machine Learning for Image Analysis (first time Spring 2017)

28

Page 20: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

Machine Learning Application Examples• Computer systems

– Web search– Web shopping– Optimization e.g. the design of physical shapes– Route planning

• Embedded/physical systems– Smartphone user adaptation– Detecting faces/people smiling in cameras– Service robots– Driverless drones, cars and submarines 29

Incr

easi

ng

size

/com

plex

ity

Page 21: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

Where is machine learning used nowadays?

● Almost everywhere ○ Detection○ Diagnosis○ Prediction○ Drug discovery○ Personalised medicine○ Medical Imaging○ Genomics○ And many more!

Page 22: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

RITMO/Music Relevant Examples

• Sensing: Classification of Error Types in Physiotherapy Exercises (Haakon Drews master project)

• Acting: PheroMusic (Kristian) and RobotJam(Charles)

33

Page 23: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

Detecting mistakes made during physiotherapy exercises

34

Intertial measurement unit (IMU)

Page 24: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

Detecting mistakes made during physiotherapy exercises• Three general error types chosen:

– amplitude (too large or small movements) – speed (too fast or slow movements) – trajectory (not moving in the right direction).

• Classification: k-nearest neighbor and dynamic time warping

• Error types are classified with high rates ofaccuracy when using template exercises for a given test subject.

• When classifying error types across subjects, the accuracy proves unsatisfactory.

35

Page 25: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

(Inter) Active Music

36

Indirect Controlo Use on-body sensors to adapt the

music to the mood of the usero Listen to music that pushes you to

work out hardero Fuse the musical preferences of

multiple users into one song

Direct Controlo Navigate within the songo Control certain instruments (e.g.

keep playing the chorus drumbeat in the verse)

o Change the tempo of the song

Page 26: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

Ant Colony Optimization (ACO)• Ants find shortest path to food source from nest.• Ants deposit pheromone along traveled path

which is used by other ants to follow the trail.• This kind of indirect communication via the local

environment is called stigmergy.

37

Page 27: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

Direct + Indirect Control Combined

39

PheroMusic app• Control by ant colony

optimization

Page 29: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

RoboJam (Charles)

A recurrent articial neural network to generatesequences of touchscreen interactions and absolutetimings, rather than high-level musical notes.

41

Page 30: Introduction to Machine Learning€¦ · Machine Learning Toolboxes (we have used) • MathWorks/MATLAB Statistics and Machine Learning Toolbox • Scikit-learn (Python) • TensorFlow

RoboJam (Charles)

42

predict location of touches

predict time deltas in between events