Data Analysis, Neural Networks and the Use of Keras

Data Analysis, Neural Networks and the Use of Keras

Data Analysis, Neural Networks and the use of Keras Cecilia Jarne [email protected] Twitter: @ceciliajarne Cecilia Jarne Neural Networks and Keras [email protected] 1 / 66 What is this talk about? What is Machine Learning, Neural Networks, and Deep Learning? Neural Networks concepts and topologies. A brief review of the use of python ML libraries. Cecilia Jarne Neural Networks and Keras [email protected] 2 / 66 What can we do with data? We are interested in: Data Visualization. Data Analysis (Identify features from the data). Data Classification. Implementation of different algorithms as intelligent as we can get. Cecilia Jarne Neural Networks and Keras [email protected] 3 / 66 Which are the available algorithms? Cecilia Jarne Neural Networks and Keras [email protected] 4 / 66 Which are the available algorithms? Cecilia Jarne Neural Networks and Keras [email protected] 5 / 66 What about machine learning? Cecilia Jarne Neural Networks and Keras [email protected] 6 / 66 Why Deep Learning? Data driven approach. Can we learn the underlying features directly from data? Cecilia Jarne Neural Networks and Keras [email protected] 7 / 66 Why Now? Cecilia Jarne Neural Networks and Keras [email protected] 8 / 66 How we split our data to train a model? Cecilia Jarne Neural Networks and Keras [email protected] 9 / 66 How we use (split) our data to train a model? Training set: The data where the model is trained on. We train our model, by pairing the input with the expected output. Validation set: Data the model has not been trained on and is used to tune hyperparameters. Here we estimate how well your model has been trained. Test set: Same like the validation set.. just used at the final end. This is an Application phase: we apply our developed model to the real-world data and get the results. This fase is split into two parts: • First you look at your models and select the best performing approach using the validation data (=validation). • Then you estimate the accuracy of the selected approach (=test). Cecilia Jarne Neural Networks and Keras [email protected] 10 / 66 Neural Networks: Cecilia Jarne Neural Networks and Keras [email protected] 11 / 66 The Perceptron: Forward Propagation The structural building block of Deep Learning Input ! Weights ! Sum ! Non linearity ! Output Cecilia Jarne Neural Networks and Keras [email protected] 12 / 66 The Perceptron: Forward Propagation The structural building block of Deep Learning: Input ! Weights ! Sum ! Non linearity ! Output Cecilia Jarne Neural Networks and Keras [email protected] 13 / 66 The Perceptron: Forward Propagation The structural building block of Deep Learning: Input ! Weights ! Sum ! Non linearity ! Output Cecilia Jarne Neural Networks and Keras [email protected] 14 / 66 The Perceptron: Forward Propagation The structural building block of Deep Learning: Input ! Weights ! Sum ! Non linearity ! Output Cecilia Jarne Neural Networks and Keras [email protected] 15 / 66 The Perceptron: Forward Propagation Cecilia Jarne Neural Networks and Keras [email protected] 16 / 66 Neural Networks: Activation Functions The purpose of Activation functions is to introduce non linearities into the network Cecilia Jarne Neural Networks and Keras [email protected] 17 / 66 Neural Networks: Activation Functions Cecilia Jarne Neural Networks and Keras [email protected] 18 / 66 Neural Networks: Non linear decision Cecilia Jarne Neural Networks and Keras [email protected] 19 / 66 Building Neural Networks with Perceptrons A simplified perceptron: Cecilia Jarne Neural Networks and Keras [email protected] 20 / 66 Building Neural Networks: Multi Outputs Because all inputs are connected to all outputs these are called Dense layers: Cecilia Jarne Neural Networks and Keras [email protected] 21 / 66 Single Layer Neural Network Cecilia Jarne Neural Networks and Keras [email protected] 22 / 66 Single Layer Neural Network Cecilia Jarne Neural Networks and Keras [email protected] 23 / 66 A deep neural network structure Cecilia Jarne Neural Networks and Keras [email protected] 24 / 66 Neural Networks:Loss Function (... or Cost Function or Objective Function) Depends on the kind of problem. Regression ! Mean square error Classification ! Cross entropy, binary cross entropy. Cecilia Jarne Neural Networks and Keras [email protected] 25 / 66 Neural Networks: Loss Functions See: https://arxiv.org/pdf/1702.05659.pdfs Cecilia Jarne Neural Networks and Keras [email protected] 26 / 66 Neural Networks: Crossentropy Cecilia Jarne Neural Networks and Keras [email protected] 27 / 66 Neural Networks: Mean square error Cecilia Jarne Neural Networks and Keras [email protected] 28 / 66 Training Neural Networks: Loss Optimization We want to find the network weights that achieve the lowest loss Cecilia Jarne Neural Networks and Keras [email protected] 29 / 66 Training Neural Networks: Loss Optimization We want to find the network weights that achieve the lowest loss Cecilia Jarne Neural Networks and Keras [email protected] 30 / 66 Training Neural Networks: Loss Optimization We want to find the network weights that achieve the lowest loss Cecilia Jarne Neural Networks and Keras [email protected] 31 / 66 Training Neural Networks: Loss Optimization We want to find the network weights that achieve the lowest loss Cecilia Jarne Neural Networks and Keras [email protected] 32 / 66 Training Neural Networks: Loss Optimization We want to find the network weights that achieve the lowest loss Cecilia Jarne Neural Networks and Keras [email protected] 33 / 66 Training Neural Networks: Loss Optimization We want to find the network weights that achieve the lowest loss Cecilia Jarne Neural Networks and Keras [email protected] 34 / 66 Training Neural Networks:Gradient Decent Cecilia Jarne Neural Networks and Keras [email protected] 35 / 66 Training Neural Networks:Back propagation How a small change in one weight affect the loss Cecilia Jarne Neural Networks and Keras [email protected] 36 / 66 Training Neural Networks: We apply chain rule Cecilia Jarne Neural Networks and Keras [email protected] 37 / 66 Training Neural Networks:Update gradient Cecilia Jarne Neural Networks and Keras [email protected] 38 / 66 Training Neural Networks:Update gradient Cecilia Jarne Neural Networks and Keras [email protected] 39 / 66 Training Neural Networks:Algorithms Cecilia Jarne Neural Networks and Keras [email protected] 40 / 66 The problem of Overfitting Cecilia Jarne Neural Networks and Keras [email protected] 41 / 66 Regularization A technique that constraint the optimization problem to avoid complex models. We use it to improve the generalization on our model to unseen data. There are different kind of methods. Cecilia Jarne Neural Networks and Keras [email protected] 42 / 66 Regularization I: Droopout During training randomly set some activations to 0. Cecilia Jarne Neural Networks and Keras [email protected] 43 / 66 Regularization I: Droopout During training randomly set some activations to 0. Cecilia Jarne Neural Networks and Keras [email protected] 44 / 66 Regularization II: early stooping To stop before having the opportunity to overfit by monitoring testing and training data. Cecilia Jarne Neural Networks and Keras [email protected] 45 / 66 Summary Cecilia Jarne Neural Networks and Keras [email protected] 46 / 66 Neural Networks: The Zoo of topologies Cecilia Jarne Neural Networks and Keras [email protected] 47 / 66 Neural Networks: The Zoo of topologies Cecilia Jarne Neural Networks and Keras [email protected] 48 / 66 Topologies Feed Foward networks (alredy seen). Recurrent neural networks | simple, LSTM, and GRU. Convolutional neural networks Cecilia Jarne Neural Networks and Keras [email protected] 49 / 66 Topologies: Recurrent neural networks Cecilia Jarne Neural Networks and Keras [email protected] 50 / 66 Topologies: Recurrent neural networks Cecilia Jarne Neural Networks and Keras [email protected] 51 / 66 RNN | simple, LSTM, and GRU Recurrent neural networks are a class of neural networks that exploit the sequential nature of their input. Inputs could be: a text, a speech, time series, and anything else where the occurrence of an element in the sequence is dependent on the elements that appeared before it. Cecilia Jarne Neural Networks and Keras [email protected] 52 / 66 Convolutional and pooling layers ConvNets are a class of neural networks using convolutional and pooling operations for progressively learning rather sophisticated models based on progressive levels of abstraction. This learning via progressive abstraction resembles vision models that have evolved over millions of years inside the human brain. People called it deep with 3-5 layers a few years ago, and now it has gone up to 100-200. Cecilia Jarne Neural Networks and Keras [email protected] 53 / 66 Convolutional Neural Networks. Cecilia Jarne Neural Networks and Keras [email protected] 54 / 66 About environment and installation Where can we work? Locally in Virtual env: Main purpose of Python virtual env is to create an isolated environment for Python projects. Each project can have its own dependencies, regardless of what dependencies every other project has. https: //realpython.com/python-virtual-environments-a-primer/ Google Cloud ML. https://cloud.google.com/ai-platform/docs/ getting-started-keras other Services Cecilia Jarne Neural Networks and Keras [email protected] 55 / 66 About installation Local: What is Anaconda for? Cecilia Jarne Neural Networks and Keras [email protected] 56 / 66 We can use Scikit learn also..

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    66 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us