15.04.2018 Views

programming-for-dummies

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

654<br />

Machine Learning<br />

A neural network models itself on the human brain, which is divided into a<br />

network of interlocking neurons. Each neuron acts like a primitive computer<br />

that can receive input and produce output, which gets fed into another<br />

neuron as input.<br />

Although a single neuron may not be capable of doing much, a network of<br />

interconnected neurons acts like a group of tiny computers that can tackle<br />

different parts of a problem simultaneously, which is known in computer<br />

science as parallel processing. Ordinary computers represent a single, fast<br />

machine that can tackle a problem in sequential steps. The strength of a computer<br />

is that it can per<strong>for</strong>m these multiple steps much faster than a human<br />

can, which is what makes computers so powerful.<br />

Human brains can’t calculate as fast as a computer, but they can process multiple<br />

data simultaneously. That makes human brains better at solving seemingly<br />

simple problems, like recognizing a face from a crowd. On the other<br />

hand, computers have trouble recognizing faces because computers try to<br />

follow a sequential series of steps. As a result, computers are slow at recognizing<br />

faces while a human’s ability to recognize faces is nearly instantaneous.<br />

In a neural network, each neuron can accept data. The data is weighted by a<br />

specific value. This total value is then compared to the neuron’s threshold. If<br />

this value is less than the threshold, the neuron produces an output of zero<br />

(0). If this value is greater than the threshold, the neuron produces an<br />

output of one (1), as shown in Figure 4-3.<br />

Figure 4-3:<br />

How a<br />

neuron<br />

processes<br />

and outputs<br />

a value.<br />

1<br />

0<br />

Threshold<br />

0.7<br />

1.25<br />

0.6<br />

Weights<br />

0<br />

The neuron in Figure 4-3 receives an input of 1 and 0. The 1 value is<br />

weighted by 0.7 while the 0 value is weighted by 0.6, such as:<br />

(1)*(0.7) + (0)*(0.6) = 0.7.<br />

Because this value is less than the threshold value of 1.25, the neuron outputs<br />

a value of 0.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!