SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Downloaden Sie, um offline zu lesen
How do neural
networks make
predictions?
Save 42% off Grokking Deep
Learning with code grokdl at
manning.com
Let’s start with the simplest neural network that we
can, to illustrate how neural networks make
predictions.
This network takes in one datapoint at a time
(average number of toes -on the players’ feet- on
the baseball team) and outputs a single prediction
(whether or not it thinks the team will win).
Let’s break down the
process:
Here we have entered our single input datapoint (#
of toes = 8.5).
Now we’ve got to do a bit of
math:
Our input is going to be multiplied by the weight
(0.1).
Out comes the prediction:
We’ve shown how a basic neural network predicts
something - 8.5 toes x 0.1 = 0.85
You might be asking: what exactly is weight
in our neural network?
Our neural network accepts an input variable as
information, and a weight variable as knowledge and
outputs a prediction. Every neural network you will ever
see works this way. It uses the knowledge in the
weights to interpret the information in the input data.
Basically, a neural network's weight is a measure of
sensitivity between the input of the network and its
prediction – like a volume knob.
Now let’s see what happens when we have
multiple inputs:
This example is like our first but it has multiple
inputs, rather than just one (# of toes, win/loss, # of
fans).
We’re going to set our three inputs and
corresponding weights:
As you can see, the three datapoints have been
entered (# of toes, win/loss, # of fans) and the
weights set.
It’s time for
math! We’re
going to
multiply each of
our inputs by
our weights
(notice that the
weights are
different) and
add them
together.
Voila! We have our prediction:
After filtering our inputs (# of toes, win/loss, # of
fans) through our weights (knowledge) we now have a
prediction (0.98).
That’s pretty cool, right? But, what else can
we do with our neural network?
Neural Networks can also make multiple predictions
using only a single input. This is perhaps a simpler
augmentation than multiple inputs. Instead of using
more inputs for a single prediction, we are going to
make multiple predictions about a single input.
The prediction occurs in the same way as if there were
3 disconnected single-weight neural networks – like in
the first example.
It’s like our first example x 3:
This time, we’re going to apply multiple different
weights to our input (win/loss, happy/sad, and
injuries sustained in %).
We insert our datapoints and multiply them
with their weights, one at a time:
It is important to note that these are, in fact, three
separate predictions – unlike our second example,
where the multiple inputs were linked to one another.
It’s time for
math again!
Here we are
going to
perform an
elementwise
multiplication –
like in our first
example, but for
each weight
(0.3, 0.2, and
0.9).
We’ve got our 3 predictions!
By filtering our input through our various weights
(volume knob) we have predicted player injuries, win
%, and probability of sadness!
What would happen if we combined the
methods used in the second and third
examples?
Yes, neural networks can predict multiple outputs given
multiple inputs!
The way in which we built a network with multiple
inputs or outputs (examples 2 and 3) can be combined
together to build a network that has both multiple
inputs AND multiple outputs.
Just like before, we simply have a weight connecting
each input node to each output node and prediction
occurs in the usual way.
Let’s multiply each of our three inputs by our
three weights:
We’re going to perform three independent, weighted
sums of each input.
You can think of this in one of two ways: either
as 3 weights coming out of each input node; or 3
weights going into each output node.
Here, each
output
node has taken
its own weighted
sum of the input
and made a
prediction.
That’s all! Hopefully you found this
presentation fun and informative!
Save 42% off Grokking Deep
Learning with code grokdl at
manning.com
Check out
some of
our other
deep
learning
titles:

Weitere ähnliche Inhalte

Mehr von Manning Publications

Kubernetes Native Microservices with Quarkus and MicroProfile
Kubernetes Native Microservices with Quarkus and MicroProfileKubernetes Native Microservices with Quarkus and MicroProfile
Kubernetes Native Microservices with Quarkus and MicroProfileManning Publications
 
Crafting interactive troubleshooting guides and team documentation for your K...
Crafting interactive troubleshooting guides and team documentation for your K...Crafting interactive troubleshooting guides and team documentation for your K...
Crafting interactive troubleshooting guides and team documentation for your K...Manning Publications
 
Entity Framework Core in Action, Second Edtion
Entity Framework Core in Action, Second EdtionEntity Framework Core in Action, Second Edtion
Entity Framework Core in Action, Second EdtionManning Publications
 
Microservices in .NET Core, Second Edition
Microservices in .NET Core, Second EditionMicroservices in .NET Core, Second Edition
Microservices in .NET Core, Second EditionManning Publications
 
Kubernetes in Action, Second Edition
Kubernetes in Action, Second EditionKubernetes in Action, Second Edition
Kubernetes in Action, Second EditionManning Publications
 
Machine Learning with TensorFlow, Second Edition
Machine Learning with TensorFlow, Second EditionMachine Learning with TensorFlow, Second Edition
Machine Learning with TensorFlow, Second EditionManning Publications
 
Spring Microservices in Action, Second Edition
Spring Microservices in Action, Second EditionSpring Microservices in Action, Second Edition
Spring Microservices in Action, Second EditionManning Publications
 
Grokking Artificial Intelligence Algorithms
Grokking Artificial Intelligence AlgorithmsGrokking Artificial Intelligence Algorithms
Grokking Artificial Intelligence AlgorithmsManning Publications
 
GitOps and Kubernetes: a radical idea
GitOps and Kubernetes: a radical ideaGitOps and Kubernetes: a radical idea
GitOps and Kubernetes: a radical ideaManning Publications
 
Data Pipelines with Apache Airflow
Data Pipelines with Apache AirflowData Pipelines with Apache Airflow
Data Pipelines with Apache AirflowManning Publications
 
Learn PowerShell in a Month of Lunches: Linux and macOS Edition
Learn PowerShell in a Month of Lunches: Linux and macOS EditionLearn PowerShell in a Month of Lunches: Linux and macOS Edition
Learn PowerShell in a Month of Lunches: Linux and macOS EditionManning Publications
 
Hugo in Action: website creation made painless
Hugo in Action: website creation made painlessHugo in Action: website creation made painless
Hugo in Action: website creation made painlessManning Publications
 
Learn dbatools in a Month of Lunches
Learn dbatools in a Month of LunchesLearn dbatools in a Month of Lunches
Learn dbatools in a Month of LunchesManning Publications
 
Designing APIs with Swagger and OpenAPI
Designing APIs with Swagger and OpenAPIDesigning APIs with Swagger and OpenAPI
Designing APIs with Swagger and OpenAPIManning Publications
 

Mehr von Manning Publications (20)

Kubernetes Native Microservices with Quarkus and MicroProfile
Kubernetes Native Microservices with Quarkus and MicroProfileKubernetes Native Microservices with Quarkus and MicroProfile
Kubernetes Native Microservices with Quarkus and MicroProfile
 
Cloud Native Machine Learning
Cloud Native Machine Learning Cloud Native Machine Learning
Cloud Native Machine Learning
 
Spring in Action, Sixth Edition
Spring in Action, Sixth EditionSpring in Action, Sixth Edition
Spring in Action, Sixth Edition
 
Crafting interactive troubleshooting guides and team documentation for your K...
Crafting interactive troubleshooting guides and team documentation for your K...Crafting interactive troubleshooting guides and team documentation for your K...
Crafting interactive troubleshooting guides and team documentation for your K...
 
Entity Framework Core in Action, Second Edtion
Entity Framework Core in Action, Second EdtionEntity Framework Core in Action, Second Edtion
Entity Framework Core in Action, Second Edtion
 
Code like a Pro in C#
Code like a Pro in C#Code like a Pro in C#
Code like a Pro in C#
 
Microservices in .NET Core, Second Edition
Microservices in .NET Core, Second EditionMicroservices in .NET Core, Second Edition
Microservices in .NET Core, Second Edition
 
Kubernetes in Action, Second Edition
Kubernetes in Action, Second EditionKubernetes in Action, Second Edition
Kubernetes in Action, Second Edition
 
Core Kubernetes
Core KubernetesCore Kubernetes
Core Kubernetes
 
Machine Learning Bookcamp
Machine Learning BookcampMachine Learning Bookcamp
Machine Learning Bookcamp
 
Machine Learning with TensorFlow, Second Edition
Machine Learning with TensorFlow, Second EditionMachine Learning with TensorFlow, Second Edition
Machine Learning with TensorFlow, Second Edition
 
Spring Security in Action
Spring Security in ActionSpring Security in Action
Spring Security in Action
 
Spring Microservices in Action, Second Edition
Spring Microservices in Action, Second EditionSpring Microservices in Action, Second Edition
Spring Microservices in Action, Second Edition
 
Grokking Artificial Intelligence Algorithms
Grokking Artificial Intelligence AlgorithmsGrokking Artificial Intelligence Algorithms
Grokking Artificial Intelligence Algorithms
 
GitOps and Kubernetes: a radical idea
GitOps and Kubernetes: a radical ideaGitOps and Kubernetes: a radical idea
GitOps and Kubernetes: a radical idea
 
Data Pipelines with Apache Airflow
Data Pipelines with Apache AirflowData Pipelines with Apache Airflow
Data Pipelines with Apache Airflow
 
Learn PowerShell in a Month of Lunches: Linux and macOS Edition
Learn PowerShell in a Month of Lunches: Linux and macOS EditionLearn PowerShell in a Month of Lunches: Linux and macOS Edition
Learn PowerShell in a Month of Lunches: Linux and macOS Edition
 
Hugo in Action: website creation made painless
Hugo in Action: website creation made painlessHugo in Action: website creation made painless
Hugo in Action: website creation made painless
 
Learn dbatools in a Month of Lunches
Learn dbatools in a Month of LunchesLearn dbatools in a Month of Lunches
Learn dbatools in a Month of Lunches
 
Designing APIs with Swagger and OpenAPI
Designing APIs with Swagger and OpenAPIDesigning APIs with Swagger and OpenAPI
Designing APIs with Swagger and OpenAPI
 

Kürzlich hochgeladen

Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfmaor17
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdfAndrey Devyatkin
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
Data modeling 101 - Basics - Software Domain
Data modeling 101 - Basics - Software DomainData modeling 101 - Basics - Software Domain
Data modeling 101 - Basics - Software DomainAbdul Ahad
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 
Copilot para Microsoft 365 y Power Platform Copilot
Copilot para Microsoft 365 y Power Platform CopilotCopilot para Microsoft 365 y Power Platform Copilot
Copilot para Microsoft 365 y Power Platform CopilotEdgard Alejos
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 

Kürzlich hochgeladen (20)

Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdf
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
Data modeling 101 - Basics - Software Domain
Data modeling 101 - Basics - Software DomainData modeling 101 - Basics - Software Domain
Data modeling 101 - Basics - Software Domain
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 
Copilot para Microsoft 365 y Power Platform Copilot
Copilot para Microsoft 365 y Power Platform CopilotCopilot para Microsoft 365 y Power Platform Copilot
Copilot para Microsoft 365 y Power Platform Copilot
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 

Grokking Deep Learning: how do neural networks make predictions?

  • 1. How do neural networks make predictions? Save 42% off Grokking Deep Learning with code grokdl at manning.com
  • 2. Let’s start with the simplest neural network that we can, to illustrate how neural networks make predictions. This network takes in one datapoint at a time (average number of toes -on the players’ feet- on the baseball team) and outputs a single prediction (whether or not it thinks the team will win).
  • 3. Let’s break down the process: Here we have entered our single input datapoint (# of toes = 8.5).
  • 4. Now we’ve got to do a bit of math: Our input is going to be multiplied by the weight (0.1).
  • 5. Out comes the prediction: We’ve shown how a basic neural network predicts something - 8.5 toes x 0.1 = 0.85
  • 6. You might be asking: what exactly is weight in our neural network? Our neural network accepts an input variable as information, and a weight variable as knowledge and outputs a prediction. Every neural network you will ever see works this way. It uses the knowledge in the weights to interpret the information in the input data. Basically, a neural network's weight is a measure of sensitivity between the input of the network and its prediction – like a volume knob.
  • 7. Now let’s see what happens when we have multiple inputs: This example is like our first but it has multiple inputs, rather than just one (# of toes, win/loss, # of fans).
  • 8. We’re going to set our three inputs and corresponding weights: As you can see, the three datapoints have been entered (# of toes, win/loss, # of fans) and the weights set.
  • 9. It’s time for math! We’re going to multiply each of our inputs by our weights (notice that the weights are different) and add them together.
  • 10. Voila! We have our prediction: After filtering our inputs (# of toes, win/loss, # of fans) through our weights (knowledge) we now have a prediction (0.98).
  • 11. That’s pretty cool, right? But, what else can we do with our neural network? Neural Networks can also make multiple predictions using only a single input. This is perhaps a simpler augmentation than multiple inputs. Instead of using more inputs for a single prediction, we are going to make multiple predictions about a single input. The prediction occurs in the same way as if there were 3 disconnected single-weight neural networks – like in the first example.
  • 12. It’s like our first example x 3: This time, we’re going to apply multiple different weights to our input (win/loss, happy/sad, and injuries sustained in %).
  • 13. We insert our datapoints and multiply them with their weights, one at a time: It is important to note that these are, in fact, three separate predictions – unlike our second example, where the multiple inputs were linked to one another.
  • 14. It’s time for math again! Here we are going to perform an elementwise multiplication – like in our first example, but for each weight (0.3, 0.2, and 0.9).
  • 15. We’ve got our 3 predictions! By filtering our input through our various weights (volume knob) we have predicted player injuries, win %, and probability of sadness!
  • 16. What would happen if we combined the methods used in the second and third examples? Yes, neural networks can predict multiple outputs given multiple inputs! The way in which we built a network with multiple inputs or outputs (examples 2 and 3) can be combined together to build a network that has both multiple inputs AND multiple outputs. Just like before, we simply have a weight connecting each input node to each output node and prediction occurs in the usual way.
  • 17. Let’s multiply each of our three inputs by our three weights: We’re going to perform three independent, weighted sums of each input.
  • 18. You can think of this in one of two ways: either as 3 weights coming out of each input node; or 3 weights going into each output node.
  • 19. Here, each output node has taken its own weighted sum of the input and made a prediction.
  • 20. That’s all! Hopefully you found this presentation fun and informative! Save 42% off Grokking Deep Learning with code grokdl at manning.com Check out some of our other deep learning titles: