[MINI] Feed Forward Neural Networks
Feed Forward Neural Networks In a feed forward neural network, neurons cannot form a cycle. In this episode, we explore how such a network would be able to represent three common logical operators: OR, AND, and XOR. The XOR operation is the interesting case.
Below are the truth tables that describe each of these functions.
AND Truth Table Input 1 Input 2 Output 0 0 0 0 1 0 1 0 0 1 1 1 OR Truth Table Input 1 Input 2 Output 0 0 0 0 1 1 1 0 1 1 1 1 XOR Truth Table Input 1 Input 2 Output 0 0 0 0 1 1 1 0 1 1 1 0 The AND and OR functions should seem very intuitive. Exclusive or (XOR) if true if and only if exactly single input is 1. Could a neural network learn these mathematical functions?
Let's consider the perceptron described below. First we see the visual representation, then the Activation function , followed by the formula for calculating the output.
Can this perceptron learn the AND function?
Sure. Let and
What about OR?
Yup. Let and
An infinite number of possible solutions exist, I just picked values that hopefully seem intuitive. This is also a good example of why the bias term is important. Without it, the AND function could not be represented.
How about XOR?
No. It is not possible to represent XOR with a single layer. It requires two layers. The image below shows how it could be done with two laters.
In the above example, the weights computed for the middle hidden node capture the essence of why this works. This node activates when recieving two positive inputs, thus contributing a heavy penalty to be summed by the output node. If a single input is 1, this node will not activate.
Universal approximation theorem tells us that any continuous function can be tightly approximated using a neural network with only a single hidden layer and a finite number of neurons. With this in mind,
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Data Skeptic · Data Skeptic · 11 of 60
1
2
3
4
5
6
7
8
9
10
▶
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Data Skeptic book giveaway contest winner selection
Data Skeptic
OpenHouse - Front end and API overview
Data Skeptic
OpenHouse Crawling with AWS Lambda
Data Skeptic
[MINI] Logistic Regression on Audio Data
Data Skeptic
Data Provenance and Reproducibility with Pachyderm
Data Skeptic
[MINI] Primer on Deep Learning
Data Skeptic
Big Data Tools and Trends
Data Skeptic
[MINI] Automated Feature Engineering
Data Skeptic
The Data Refuge Project
Data Skeptic
[MINI] The Perceptron
Data Skeptic
[MINI] Feed Forward Neural Networks
Data Skeptic
Data Science at Patreon
Data Skeptic
[MINI] Backpropagation
Data Skeptic
[MINI] GPU CPU
Data Skeptic
OpenHouse
Data Skeptic
[MINI] Generative Adversarial Networks
Data Skeptic
[MINI] AdaBoost
Data Skeptic
[MINI] The Bootstrap
Data Skeptic
[MINI] Dropout
Data Skeptic
[MINI] Gini Coefficients
Data Skeptic
[MINI] Random Forest
Data Skeptic
[MINI] Heteroskedasticity
Data Skeptic
[MINI] ANOVA
Data Skeptic
Urban Congestion
Data Skeptic
[MINI] The CAP Theorem
Data Skeptic
Unstructured Data for Finance
Data Skeptic
Detecting Terrorists with Facial Recognition?
Data Skeptic
Predictive Models on Random Data
Data Skeptic
[MINI] Entropy
Data Skeptic
[MINI] F1 Score
Data Skeptic
Causal Impact
Data Skeptic
Machine Learning on Images with Noisy Human-centric Labels
Data Skeptic
The Library Problem
Data Skeptic
Stealing Models from the Cloud
Data Skeptic
Data Science at eHarmony
Data Skeptic
Multiple Comparisons and Conversion Optimization
Data Skeptic
Election Predictions
Data Skeptic
[MINI] Calculating Feature Importance
Data Skeptic
MS Connect Conference
Data Skeptic
Music21
Data Skeptic
The Police Data and the Data Driven Justice Initiatives
Data Skeptic
Studying Competition and Gender Through Chess
Data Skeptic
[MINI] Goodhart's Law
Data Skeptic
Trusting Machine Learning Models with LIME
Data Skeptic
[MINI] Leakage
Data Skeptic
Predictive Policing
Data Skeptic
Mutli-Agent Diverse Generative Adversarial Networks
Data Skeptic
[MINI] Convolutional Neural Networks
Data Skeptic
Unsupervised Depth Perception
Data Skeptic
[MINI] Max-pooling
Data Skeptic
MS Build 2017
Data Skeptic
Activation Functions
Data Skeptic
Doctor AI
Data Skeptic
[MINI] The Vanishing Gradient
Data Skeptic
CosmosDB
Data Skeptic
Estimating Sheep Pain with Facial Recognition
Data Skeptic
[MINI] Conditional Independence
Data Skeptic
MINI: Bayesian Belief Networks
Data Skeptic
Project Common Voice
Data Skeptic
[MINI] Recurrent Neural Networks
Data Skeptic
More on: ML Maths Basics
View skill →Related AI Lessons
⚡
⚡
⚡
⚡
How to choose AI ML master’s program?
Medium · AI
CognitiveTwin: Robust Multi-Modal Digital Twins for Predicting Cognitive Decline in Alzheimer's Disease
ArXiv cs.AI
The Machine Learning Cheatsheet: Every Algorithm You Need to Know, Explained
Medium · AI
The Machine Learning Cheatsheet: Every Algorithm You Need to Know, Explained
Medium · Data Science
🎓
Tutor Explanation
DeepCamp AI