CSC 4510 – Machine Learning
description
Transcript of CSC 4510 – Machine Learning
![Page 1: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/1.jpg)
CSC 4510 – Machine LearningDr. Mary-Angela PapalaskariDepartment of Computing SciencesVillanova University
Course website: www.csc.villanova.edu/~map/4510/
7: Introduction to Neural Networks
1CSC 4510 - M.A. Papalaskari - Villanova University
Some of the slides in this presentation are adapted from:• Prof. Frank Klassner’s ML class at Villanova• the University of Manchester ML course http://www.cs.manchester.ac.uk/ugt/COMP24111/• The Stanford online ML course http://www.ml-class.org/
![Page 2: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/2.jpg)
Machine learning problems• Supervised Learning
– Classification– Regression
• Unsupervised learning
Others: Reinforcement learning, recommender systems.
Also talk about: Practical advice for applying learning algorithms.
CSC 4510 - M.A. Papalaskari - Villanova University 2
![Page 3: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/3.jpg)
Motivation – part 1• Learning a non-linear function
CSC 4510 - M.A. Papalaskari - Villanova University 3
![Page 4: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/4.jpg)
You see this:
But the camera sees this:
What is this?
![Page 5: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/5.jpg)
Computer Vision: Car detection
Testing:
What is this?
Not a carCars
![Page 6: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/6.jpg)
Learning Algorithm
pixel 1
pixel 2
pixel 1
pixel 2
Raw image
Cars“Non”-Cars
![Page 7: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/7.jpg)
pixel 1
pixel 2
Raw image
Cars“Non”-Cars
Learning Algorithm
pixel 1
pixel 2
![Page 8: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/8.jpg)
pixel 1
pixel 2
Raw image
Cars“Non”-Cars
Learning Algorithm
pixel 1
pixel 2
Why not apply logistic regression?
![Page 9: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/9.jpg)
Non-linear decision boundaries
x1
x2
Predict “ “ if
1-1
-1
1
Reminder: logistic regression can do non-linear
Add some higher-order terms?
![Page 10: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/10.jpg)
pixel 1
pixel 2
Raw image
Cars“Non”-Cars
50 x 50 pixel images→ 2500 pixels (7500 if RGB)
pixel 1 intensity
pixel 2 intensity
pixel 2500 intensity
Quadratic features ( ): ≈3 million features
Learning Algorithm
pixel 1
pixel 2
![Page 11: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/11.jpg)
Motivation – part 2• Take inspiration from the brain
CSC 4510 - M.A. Papalaskari - Villanova University 11
![Page 12: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/12.jpg)
Neural Networks
Origins: Algorithms that try to mimic the brain.
• Was very widely used in 80s and early 90s;• popularity diminished in late 90s.• Recent resurgence: State-of-the-art technique for
many applications
![Page 13: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/13.jpg)
Auditory cortex learns to see
Auditory Cortex
The “one learning algorithm” hypothesis
[Roe et al., 1992]
![Page 14: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/14.jpg)
Somatosensory cortex learns to see
Somatosensory Cortex
The “one learning algorithm” hypothesis
[Metin & Frost, 1989]
![Page 15: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/15.jpg)
Seeing with your tongue Human echolocation (sonar)
Haptic belt: Direction sense Implanting a 3rd eye
Sensor representations in the brain
[BrainPort; Welsh & Blasch, 1997; Nagel et al., 2005; Constantine-Paton & Law, 2009]
![Page 16: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/16.jpg)
Neuron in the brain
Input signals sentfrom other neurons
If enough sufficient signals accumulate, the neuron fires
a signal.
Connection strengths determine how the signals are accumulated
![Page 17: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/17.jpg)
Neurons in the brain
[Credit: US National Institutes of Health, National Institute on Aging]
![Page 18: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/18.jpg)
Comparing Carbon & SiliconHuman Brain
Computational Units: O(1011) neuronsStorage Units: O(1011) neurons, O(1014) synapsesCycle Time: O(10-3) sec, Bandwidth: O(1014) bits/secNeuron Updates/sec: O(1014)
ComputerComputational Units: 1 CPU, 107 gatesStorage Units: O(1011) bits RAM, O(1012) bits diskCycle Time: O(10-8) sec, Bandwidth: O(108) bits/secNeuron Updates/sec: O(108)
![Page 19: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/19.jpg)
The neuron modelMcCulloch & Pitts 1943
• Compute weighted sum of inputs and “fire” if above threshold value
CSC 4510 - M.A. Papalaskari - Villanova University 19
![Page 20: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/20.jpg)
1x
2x
3x
add
)( taif 1output output
signal
• input signals ‘x’ and coefficients ‘w’ are multiplied
• weights correspond to connection strengths
• signals are added up – if they are enough, FIRE!
else0output
1w
2w
3w
i
M
iiwxa
1
incoming signal
connection strength
activationlevel
output signal
![Page 21: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/21.jpg)
Activation Functions
![Page 22: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/22.jpg)
A neuron can compute….
![Page 23: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/23.jpg)
The perceptronRosenblatt 1958: Training algorithm Neural Net• A single neuron• Adjustable synaptic weights
CSC 4510 - M.A. Papalaskari - Villanova University 23
![Page 24: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/24.jpg)
Perceptron learning1. Initialize weights and thresholds to random
numbers between -0.5 and 0.52. Activate perceptron3. Update weights:wi(p+1) = wi(p) + α * xi(p) * err(p)
4. Iterate until Convergence
![Page 25: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/25.jpg)
Example: Perceptron
learning logical AND
25
![Page 26: CSC 4510 – Machine Learning](https://reader035.fdocuments.us/reader035/viewer/2022062520/56815aa5550346895dc8369f/html5/thumbnails/26.jpg)
Representation Limits for perceptron
Linear Separability