introduction to neural
prediction
What is a neural network?
Here is your first neural network
Multiplies The Input
Making a prediction with
multiple outputs
Neural networks can also make multiple
predictions using only a single input
• Prediction occurs the same as if there were three disconnected
single-weight neural networks
• The most important comment in this setting is to notice that the
three predictions are completely separate
• Unlike neural networks with multiple inputs and a single output,
where the prediction is undeniably connected, this network truly
behaves as three independent components, each receiving the same
input data
Predicting with multiple
inputs and outputs
Neural networks can predict multiple outputs
given multiple inputs
• Finally, the way you build a network with multiple inputs or outputs
can be combined to build a network that has both multiple inputs and
multiple outputs
• As before, a weight connects each input node to each output node,
and prediction occurs in the usual way
Multiple inputs and outputs:
How does it work?
It performs three independent weighted
sums of the input to make three predictions
• You can take two perspectives on this architecture: think of it as either
three weights coming out of each input node, or three weights going into
each output node
• Think about this neural network as three independent dot products: three
independent weighted sums of the input
• Each output node takes its own weighted sum of the input and makes a
prediction
• This function iterates through each row of weights and makes a prediction
using the w_sum function
• The series of weighted sums is exactly that: you take a vector and perform
a dot product with every row in a matrix
Predicting on predictions
Neural networks can be stacked!
• As the following figures make clear, you can also take the output of
one network and feed it as input to another network
• The following listing shows how you can do the same operations
coded in the previous section using a convenient Python library called
NumPy
• Using libraries like NumPy makes your code faster and easier to read
and write
To predict, neural networks perform repeated
weighted sums of the input
• The network’s intelligence depends on the weight values you give it
• Everything we’ve done in this chapter is a form of what’s called
forward propagation, wherein a neural network takes input data and
makes a prediction
• Just as prediction is based on several simple techniques that are
repeated/stacked on top of each other, weight learning is also a series
of simple techniques that are combined many times across an
architecture