Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Neural networks talk

Marissa Hoek
November 12, 2015

Neural networks talk

Tech meeting NN talk

Marissa Hoek

November 12, 2015
Tweet

Other Decks in Science

Transcript

  1. WHY NEURAL NETWORKS? What if it’s hard to write a

    step-by-step recipe to solve our problem? Sometimes the underlying pattern is too complicated!
  2. WHY NEURAL NETWORKS? Instead of an algorithm, we use data

    to make a ‘magic box’ that can solve our problem.
  3. WHY NEURAL NETWORKS? Neural networks can help us solve problems

    for which it is hard to write a step-by-step algorithm. Examples: fraud detection, facial recognition, stock market prediction All you need is data!
  4. HOW DO THEY WORK? Neural networks emulate the structure of

    the brain. Input data is transformed by layers of ‘neurons’ to create output data
  5. HOW DO THEY WORK? The value of a neuron is

    the sum of all connected neurons, multiplied by a weight value. By changing the weight values of our network, we can make it do anything. The right weight values are determined by training.
  6. HOW TO TRAIN YOUR NEURAL NETWORK 1. Collect a lot

    of examples. Example: PHP files grouped by ‘infected' and ‘clean’. 2. Write a function that converts your examples to something the Neural Network understands: a list of numbers (vector) per example. This is your dataset.
  7. HOW TO TRAIN YOUR NEURAL NETWORK 3. The vector goes

    into the input neurons, a result is calculated in the output neurons. 4. Find the weight values that result in the smallest difference between calculated and actual result on your dataset. Example: the most PHP files classified correctly.
  8. USING YOUR NEURAL NETWORK 1. Use the function you made

    earlier to convert new data to a vector. 2. Fill the input neurons with this data. 3. After calculating, a value appears in your output neurons. This is your result! 
 Example: Chance that a PHP file is infected.
  9. NEURAL NETWORK CHECKLIST 1. A function from any data to

    a vector. 2. A meaningful result that can be calculated by your network. 3. As many examples as possible. 4. A training algorithm.
  10. TESTING YOUR NEURAL NETWORK 1. Divide your data in two

    parts: training and test. 2. Use the first part (80%) to train your network. 3. Calculate results using the rest as input (20%). 4. Use success rate on test set to determine how good your network is.
  11. IN PHP: FANN FANN is a PHP extension that does

    all of the heavy lifting for you A training algorithm is included (cascade2) It’s very fast, probably faster than something you make yourself.
  12. DISADVANTAGES Not always right: no 100% success rate. Success rate

    depends heavily on your data. Hard to tell what’s going on exactly.