Upload
mike-anderson
View
613
Download
2
Tags:
Embed Size (px)
Citation preview
Machine Learning – A definition
"Field of study that gives computers
the ability to learn without being
explicitly programmed.“
Arthur Samuel, 1959
Source: Good Old Wikipedia 2
Learning = Building functions from experience
3
Task Input Output
Simple mathematical
function
x y = sin(x)
Spam filtering Text of an email
message
Probability of email being
spam (%)
Stockmarket
prediction
Historical data on
- Stock prices
- Economic indicators
Expected price
movements
Remembering
names
Thought:
“Who was that guy
who liked windsurfing?
Thought:
“Oh yes – that was Bob”
The state of machine learning
4
“It works! sort of…. sometimes…. on a good day….”
nuroko.com
We’re building a toolkit for machine learning that is:
• General purpose – works on any data
• Powerful – advanced algorithms to detect complex patterns
• Scalable – handle unlimited data at internet scale
• Realtime – suitable for online use in real applications
• Pragmatic – designed for solving real problems
5
Why Clojure?
Productivity and fun!
Good parts of the JVM
Interactive experiments
Functional programming
DSLs with composable abstractions
6
REPL
Some Key Abstractions
7
Module
Algorithm
Coder
Vector 1 0 1 1 0 Efficiently represents information as a
vector of double values
Converts arbitrary data into vectors (and
back again!)
Represents a function
- (e.g. a Neural Network)
Adjusts parameters in a module to learn a
function from experience / data
- (e.g. back-propagation)
Task Represents a problem to solve – typically
via provision of training examples
𝑜𝑢𝑡𝑝𝑢𝑡 = 𝑓 𝑖𝑛𝑝𝑢𝑡
1 0 1 1 0 “Cat”
Neural Networks
8
Output layer
Input layer
Hidden layer
Weighted connections
Direction of
calculation
Each node’s value is
computed as a function
of the weighted sum of its
inputs:
𝑦𝑖 = 𝑓 𝑤𝑖𝑗 . 𝑥𝑗
How to train a neural network
9
(BASIC version)
10 Initialise network with some random weights
20 Choose a random training example as input
30 Compute the output
40 Determine error (difference vs. expected output)
50 Adjust the weights very slightly to reduce the error
60 GOTO 20
Live Demo – Part 1
10
A harder problem….
11
A trick – compression of data
12
784 inputs
784 outputs
150 units (“bottleneck”)
compressor
decompressor
Putting it together
13
compressor
2
784 inputs
150 units (compressed data)
10 outputs (one for each digit)
Live Demo – Part 2
14
Questions?
15