SlideShare a Scribd company logo
Test Driven
Neural
Networks
Matthew Kirk - Modulus 7
Rubyconf Neural Networks
automatic playlists
The Challenge
“Big Data”
Languages

Java
Python
R
Julia
Clojure
Ruby has tools too
Rubyconf Neural Networks
Ruby is not
Complex Math
Today we’ll cover
•
•
•
•

What feed forward neural networks are
How to classify strings to languages using Neural
Nets
How to do it in a TDD fashion
Demonstration
Neural
Networks!
aka the sledge hammer of
functional relationships
Neural Networks
Input layer
Hidden layer
How many Neurons?
• 2/3 * Input layer count + output count is a
good start

• Aggregation over expansion so less

neurons in the hidden layer than on the
input layer.
Output layer
Neurons
Digital Logic
Fuzzy Logic
Activation Functions
• Sigmoid
• Elliott
• Gaussian
• Linear
• Threshold
• Cosine and Sine
Activation Functions
• Sigmoid => Learning Curve
• Elliott => Learning Curve
• Gaussian => Bell curve
• Linear => Line
• Threshold => Yes or No
• Cosine and Sine => Periodic
Rubyconf Neural Networks
Training Algorithms
• Quickprop
• RProp => Use this
• Back propagation
Visually What they do
Just the tip of the
Neural Nets
iceberg
Rubyconf Neural Networks
Specifically
• English
• German
• Polish
• Swedish
• Finnish
• Norwegian
Data Collection
• Using the most translated book in the

world “The Bible” to collect sentences
used in each of these languages.
Now What?
Rubyconf Neural Networks
Character Distribution
TDD Neural Nets
Test the Seams
describe Language do
it 'has the proper keys for each vector'
it 'sums to 1 for all vectors'
it 'returns characters that is a unique set of characters used'
end
Cross Validation
describe Network do
%w[English Finnish German Norwegian Polish Swedish].each do |lang|
it "Trains and cross-validates with an error of 5% for #{lang}"
end
end
Ockham’s Razor
Demo
modulus7.com/rubyconf
@mjkirk
Conclusion
This is just the beginning
Go learn more become more adept at data
analysis
Photo Credits
http://rickmanelius.com/article/do-you-dread-emails
http://www.flickr.com/photos/irisheyes/8469160004/
http://www.flickr.com/photos/andy_bernay-roman/2206610268/
http://www.flickr.com/photos/kev_walsh/2216144544/sizes/o/in/photostream/
http://www.flickr.com/photos/clover_1/2926385130/
http://www.flickr.com/photos/andy_bernay-roman/2206610268/sizes/o/in/photostream/
http://translate.google.com
http://www.flickr.com/photos/epistemographer/68200471
http://www.allaboutcircuits.com/vol_4/chpt_3/5.html
http://www.flickr.com/photos/brunobord/3987593006/

More Related Content

PDF
Practical Deep Learning
PPTX
Deep Learning in Robotics
PDF
PDF
Making neural programming architectures generalize via recursion
PPTX
Embed, Encode, Attend, Predict – applying the 4 step NLP recipe for text clas...
PPTX
Deep learning on Hadoop/Spark -NextML
PDF
Deep Domain
PPTX
IROS 2017 Slides
Practical Deep Learning
Deep Learning in Robotics
Making neural programming architectures generalize via recursion
Embed, Encode, Attend, Predict – applying the 4 step NLP recipe for text clas...
Deep learning on Hadoop/Spark -NextML
Deep Domain
IROS 2017 Slides

What's hot (9)

PDF
Chris Fregly, Research Scientist, PipelineIO at MLconf ATL 2016
PDF
Deep learning with Keras
PDF
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017
PDF
A Theory of Functional Programming LambdUp
PDF
Using Optimal Learning to Tune Deep Learning Pipelines
PDF
Deep Learning as a Cat/Dog Detector
PDF
Dato Keynote
PDF
The marginal value of adaptive gradient methods in machine learning
PPTX
Value iteration networks
Chris Fregly, Research Scientist, PipelineIO at MLconf ATL 2016
Deep learning with Keras
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017
A Theory of Functional Programming LambdUp
Using Optimal Learning to Tune Deep Learning Pipelines
Deep Learning as a Cat/Dog Detector
Dato Keynote
The marginal value of adaptive gradient methods in machine learning
Value iteration networks
Ad

Similar to Rubyconf Neural Networks (20)

PPTX
Introduction to deep learning
PPTX
Activation functions and Training Algorithms for Deep Neural network
PDF
Python for Image Understanding: Deep Learning with Convolutional Neural Nets
PDF
NLP and Deep Learning for non_experts
PPTX
Introduction of Machine learning and Deep Learning
PPTX
Deep Learning in Recommender Systems - RecSys Summer School 2017
PPTX
Introduction to Deep learning and H2O for beginner's
PPTX
Deep Learning Made Easy with Deep Features
PPT
Notes from 2016 bay area deep learning school
PDF
Understanding deep learning requires rethinking generalization
PDF
Entity embeddings for categorical data
PPTX
Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...
PPTX
nn_important study materoial okfjevh rji
PDF
CNIT 141: 9. Hard Problems
PDF
Intro to TensorFlow and PyTorch Workshop at Tubular Labs
PDF
Introduction to deep learning
PDF
Image classification with neural networks
PPTX
Neural Network ppt (vs.swathi).pptx neural network neyral network
PPTX
Machine Learning, Deep Learning and Data Analysis Introduction
PPTX
prace_days_ml_2019.pptx
Introduction to deep learning
Activation functions and Training Algorithms for Deep Neural network
Python for Image Understanding: Deep Learning with Convolutional Neural Nets
NLP and Deep Learning for non_experts
Introduction of Machine learning and Deep Learning
Deep Learning in Recommender Systems - RecSys Summer School 2017
Introduction to Deep learning and H2O for beginner's
Deep Learning Made Easy with Deep Features
Notes from 2016 bay area deep learning school
Understanding deep learning requires rethinking generalization
Entity embeddings for categorical data
Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...
nn_important study materoial okfjevh rji
CNIT 141: 9. Hard Problems
Intro to TensorFlow and PyTorch Workshop at Tubular Labs
Introduction to deep learning
Image classification with neural networks
Neural Network ppt (vs.swathi).pptx neural network neyral network
Machine Learning, Deep Learning and Data Analysis Introduction
prace_days_ml_2019.pptx
Ad

More from hexgnu (6)

PPTX
What is Reinforcement Learning? A quick 8 slide intro
PDF
Lessons learned
PDF
Pasted image-94
PDF
Pasted image-97
PDF
Pasted image-100
PDF
Katy perry and trend detection red dirt
What is Reinforcement Learning? A quick 8 slide intro
Lessons learned
Pasted image-94
Pasted image-97
Pasted image-100
Katy perry and trend detection red dirt

Recently uploaded (20)

PDF
Approach and Philosophy of On baking technology
PPT
Teaching material agriculture food technology
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Machine learning based COVID-19 study performance prediction
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Empathic Computing: Creating Shared Understanding
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Approach and Philosophy of On baking technology
Teaching material agriculture food technology
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
sap open course for s4hana steps from ECC to s4
Dropbox Q2 2025 Financial Results & Investor Presentation
The Rise and Fall of 3GPP – Time for a Sabbatical?
Machine learning based COVID-19 study performance prediction
Unlocking AI with Model Context Protocol (MCP)
Diabetes mellitus diagnosis method based random forest with bat algorithm
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
cuic standard and advanced reporting.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Reach Out and Touch Someone: Haptics and Empathic Computing
Advanced methodologies resolving dimensionality complications for autism neur...
Empathic Computing: Creating Shared Understanding
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...

Rubyconf Neural Networks