24.07.2016 Views

www.allitebooks.com

Learning%20Data%20Mining%20with%20Python

Learning%20Data%20Mining%20with%20Python

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Beating CAPTCHAs with Neural Networks<br />

The outputs of one layer be<strong>com</strong>e the inputs of the next layer, continuing until we<br />

reach the final layer: the, output layer. These outputs represent the predictions of<br />

the neural network as the classification. Any layer of neurons between the<br />

input layer and the output layer is referred to as a hidden layer, as they learn a<br />

representation of the data not intuitively interpretable by humans. Most neural<br />

networks have at least three layers, although most modern applications use networks<br />

with many more layers than that.<br />

Typically, we consider fully connected layers. The outputs of each neuron in a layer<br />

go to all neurons in the next layer. While we do define a fully connected network,<br />

many of the weights will be set to zero during the training process, effectively<br />

removing these links. Fully connected neural networks are also simpler and more<br />

efficient to program than other connection patterns.<br />

As the function of the neurons is normally the logistic function, and the neurons are<br />

fully connected to the next layer, the parameters for building and training a neural<br />

network must be other factors. The first factor for neural networks is in the building<br />

phase: the size of the neural network. This includes how many layers the neural<br />

network has and how many neurons it has in each hidden layer (the size of the<br />

input and output layers is usually dictated by the dataset).<br />

The second parameter for neural networks is determined in the training phase: the<br />

weight of the connections between neurons. When one neuron connects to another,<br />

this connection has an associated weight that is multiplied by the signal (the output<br />

of the first neuron). If the connection has a weight of 0.8, the neuron is activated, and<br />

it outputs a value of 1, the resulting input to the next neuron is 0.8. If the first neuron<br />

is not activated and has a value of 0, this stays at 0.<br />

[ 164 ]

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

Saved successfully!

Ooh no, something went wrong!