Computational Intelligence: (Introduction To Machine Learning)
Computational Intelligence: (Introduction To Machine Learning)
INTELLIGENCE
(INTRODUCTION TO MACHINE LEARNING)
SS 18
2 VO 442.070 + 1 UE 708.070
• Website: http://www.spsc.tugraz.at/courses/computational-intelligence
• Newsgroup: tu-graz.lv.ci
Organization
• Lecture / VO:
• Class cancelled on the 13th of May
• Practical / UE:
• Class cancelled on the 16th of May
Organization
• Office hours:
• Both Anand and Guillaume:
• Time: Every Tuesday 14:00 – 15:00
• Place: Our offices at Inffeldgasse 16b/1
• Exam:
• Written exam for this year’s course:
• July onwards
• Exam has two parts:
• IGI (first half of semester) + SPSC (second half)
• Language: English
• Positive grade if positive on both parts!
Materials (for IGI part)
• No textbook required
• Lecture slides and further reading on tech center
Source -- Artificial Intelligence: A Modern Approach by Stuart Russell and Peter Norvig
But what really is AI?
Turing test
Turing test
• Customized learning
• Spam filters, movie/product recommendations
Applications of Machine learning
• Machine learning is used in a wide range of fields including:
• Bio-informatics
• Brain-Machine interfaces
• Computational finance
• Game playing
• Information Retrieval
• Internet fraud detection
• Medical diagnosis
• Natural language processing
• Online advertising
• Recommender systems
• Robot locomotion
• Search engines
• Sentiment analysis
• Software engineering
• Speech and handwriting recognition
• Stock market analysis
• Economics and Finance
• Credit card fraud detection
• …….
Autonomous car
• Waymo/Alphabet
• https://www.youtube.com/watch?v=TsaES--OTzM
+ UK, France,
Switzerland,
Singapore
Bipedal robot
• ATLAS (Boston Dynamics/Alphabet)
• https://www.youtube.com/watch?v=fRj34o4hN4I (three month ago)
• https://www.youtube.com/watch?v=aFuA50H9uek (last week)
http://spectrum.ieee.org/automaton/robotics/humanoids/boston-dynamics-marc-raibert-on-nextgen-atlas
https://blog.openai.com/openai-baselines-ppo/
AI for robotics
• OpenAI (2016)
robots cannot only
learn from accelerated
simulated
environments
Web search
Image search
• Google image search
https://images.google.com
Face recognition
• Facebook
• http://www.youtube.com/watch?v=l4Rn38_vrLQ
• iPhoto
• Cameras, etc.
data prediction
Spam
vs.
Not Spam
Data visualization (Embedding images)
• Images have
thousands or
millions of pixels.
http://scikit-learn.org/stable/auto_examples/applications/plot_stock_market.html
Clustering images
Set of images
Growth of Machine Learning
• Preferred approach to
• Speech recognition, Natural language processing
• Computer vision
• Robot control
• Computational biology
• ….
• Accelerating trend
• Big data (data mining)
• Improved algorithms
• Faster computers
• Availability of good open-source software and datasets
Some of the future challenges
• The scientific challenges
• Learning from fewer data (1-shot learning)
• Generalization
• Energy efficient hardware and algorithms
• Understanding animal intelligence
• Ethical issues of AI
• Privacy
• Intelligent weapons
• Replacing artisans with robots
COURSE CONTENT
What we will cover
• IGI part: • SPSC part:
• Introduction • Parametric & non-parametric
• Linear regression density estimation
• Non-linear basis functions • Bayes classifier
• Logistic regression • Gaussian mixture model
• Under- and over-fitting • K-means
• Model selection • Markov model & Hidden Markov
• k-NN
model
• Graphical models
• Cross-validation
• PCA
• Regularization
• LDA
• Neural networks
• SVM
• Kernel methods
• Multiclass classification
INTRODUCTION:
TYPES OF ML ALGORITHMS
Types of Machine Learning algorithms
• Supervised learning
• Given: Training examples with target values
• Goal: Predict target values for new examples
• Examples: optical character recognition, speech recognition, etc.
Learning from
• Unsupervised learning examples (data)
• Given: Training examples without target values
• Goal: Detect and extract structure from data
• Examples: clustering, segmentation, embedding (visualization), compression,
automatic speaker separation
Applications:
• Spam filters
• Character recognition
• Speech recognition
• Collaborative filtering (predicting
if a customer will be interested in
an advertisement …)
• Medical diagnosis
• …
Unsupervised Learning: Example
• 90% of collected data is unlabeled
• Ex. Find patterns and structure in data
Clustering art
Unsupervised Learning: Applications
• Market partition: divide a market into distinct subsets of
customers
• Find clusters of similar customers, where each cluster may
conceivably be selected as a market target to be reached with a
distinct marketing strategy
• Data representation: Image, document, web clustering
• Automatic organization of pictures
• Generate a categorized view of a collection of documents
• For organizing search results etc.
• Bioinformatics
• Clustering the genes based on their expression profile
• Find clusters of similarly regulated genes – functional groups
INTRODUCTION:
SUPERVISED LEARNING
Regression and classification
Simple regression example
Top 50 movies (top first weekends)
Avengers
700
The Dark Knight
Million USD
600
Total income
500
400
300
200
„The Hunger Games: Catching Fire“: 158 Mio. USD on opening weekend.
How much in total?
Predicted: ~418 Mio., Actual: 424 Mio.
Simple regression example (cont’d)
700
600
• Data set: Input , Output 500
400
y
300
First Total 200
weekend
i 100
0
0 100 200 300
x
Avengers 1 207 623
… …
Simple regression example (cont’d)
700
600
• Data set: … 500
400
y
300
200
Training set 100
0
0 100 200 300
x
Hypothesis
Learning algorithm
Parameters
Test input
„Hypothesis“
x h
Prediction
Non-linear regression
10
training data
y 0 regression
-10
-20
-30
-40
-50
0 20 40 60 80 100
x x
Training set
Non-linear hypothesis, for example
Learning
algorithm
Test input
„Hypothesis“
x h
Prediction
Regression with multiple inputs
2
2
1.5
1.5 1
y 1 y 0.5
0.5 0
0 -0.5
-0.5 -1
-1.5
-1
10
-1.5
10 0
6 8
2 4
0 -10 -2 0
-6 -4
6 8
2 4
-10 -2 0
-6 -4
y 1.5
0.5
-0.5
-1
-1.5
10
Training set
0
6 8
2 4
-2 0
-10 -4
-6
Learning algorithm
i 1 2
Test input
1 5.3 -2.1 2.31
5 … … …
Simple classification example
„labeled data“
decision boundary
Tumor size Malignant?
(mm) benign
i malignant
x y
1 2.3 0 (N)
Tumor size (x)
2 5.1 1 (Y)
1
0
3 1.4 0 (N)
4 6.3 1 (Y)
5 5.3 1 (Y)
Example hypothesis:
… …
1 if x >
labels
Classification with multiple inputs
linear decision boundary
Tumor Age Malign
size ant?
i (mm)
x1 x2 y
1 2.3 25 0 (N)
Age (x2)
2 5.1 62 1 (Y)
3 1.4 47 0 (N)
4 6.3 39 1 (Y)
5 5.3 72 1 (Y)
Tumor size (x1)
… … benign
malignant
Non-linear classification
linear decision boundary non-linear decision boundary
Age (x2)
Age (x2)
• Gradient descent