Neural Network Projects with Python

Book description

Build your Machine Learning portfolio by creating 6 cutting-edge Artificial Intelligence projects using neural networks in Python

Key Features

  • Discover neural network architectures (like CNN and LSTM) that are driving recent advancements in AI
  • Build expert neural networks in Python using popular libraries such as Keras
  • Includes projects such as object detection, face identification, sentiment analysis, and more

Book Description

Neural networks are at the core of recent AI advances, providing some of the best resolutions to many real-world problems, including image recognition, medical diagnosis, text analysis, and more. This book goes through some basic neural network and deep learning concepts, as well as some popular libraries in Python for implementing them.

It contains practical demonstrations of neural networks in domains such as fare prediction, image classification, sentiment analysis, and more. In each case, the book provides a problem statement, the specific neural network architecture required to tackle that problem, the reasoning behind the algorithm used, and the associated Python code to implement the solution from scratch. In the process, you will gain hands-on experience with using popular Python libraries such as Keras to build and train your own neural networks from scratch.

By the end of this book, you will have mastered the different neural network architectures and created cutting-edge AI projects in Python that will immediately strengthen your machine learning portfolio.

What you will learn

  • Learn various neural network architectures and its advancements in AI
  • Master deep learning in Python by building and training neural network
  • Master neural networks for regression and classification
  • Discover convolutional neural networks for image recognition
  • Learn sentiment analysis on textual data using Long Short-Term Memory
  • Build and train a highly accurate facial recognition security system

Who this book is for

This book is a perfect match for data scientists, machine learning engineers, and deep learning enthusiasts who wish to create practical neural network projects in Python. Readers should already have some basic knowledge of machine learning and neural networks.

Publisher resources

Download Example Code

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. Neural Network Projects with Python
  3. Dedication
  4. About Packt
    1. Why subscribe?
  5. Contributors
    1. About the author
    2. About the reviewer
    3. Packt is searching for authors like you
  6. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
  7. Machine Learning and Neural Networks 101
    1. What is machine learning?
      1. Machine learning algorithms
      2. The machine learning workflow
    2. Setting up your computer for machine learning
    3. Neural networks
      1. Why neural networks?
      2. The basic architecture of neural networks
      3. Training a neural network from scratch in Python
        1. Feedforward
        2. The loss function
        3. Backpropagation
        4. Putting it all together
      4. Deep learning and neural networks
    4. pandas – a powerful data analysis toolkit in Python
      1. pandas DataFrames
      2. Data visualization in pandas
      3. Data preprocessing in pandas
        1. Encoding categorical variables
        2. Imputing missing values
      4. Using pandas in neural network projects
    5. TensorFlow and Keras – open source deep learning libraries
      1. The fundamental building blocks in Keras
        1. Layers – the atom of neural networks in Keras
        2. Models – a collection of layers
        3. Loss function – error metric for neural network training
        4. Optimizers – training algorithm for neural networks
      2. Creating neural networks in Keras
    6. Other Python libraries
    7. Summary
  8. Predicting Diabetes with Multilayer Perceptrons
    1. Technical requirements
    2. Diabetes – understanding the problem
    3. AI in healthcare
      1. Automated diagnosis
    4. The diabetes mellitus dataset
    5. Exploratory data analysis
    6. Data preprocessing
      1. Handling missing values
      2. Data standardization
      3. Splitting the data into training, testing, and validation sets
    7. MLPs
      1. Model architecture
        1. Input layer
        2. Hidden layers
        3. Activation functions
          1. ReLU
          2. Sigmoid activation function
    8. Model building in Python using Keras
      1. Model building
      2. Model compilation
      3. Model training
    9. Results analysis
      1. Testing accuracy
      2. Confusion matrix
      3. ROC curve
      4. Further improvements
    10. Summary
    11. Questions
  9. Predicting Taxi Fares with Deep Feedforward Networks
    1. Technical requirements
    2. Predicting taxi fares in New York City
    3. The NYC taxi fares dataset
    4. Exploratory data analysis
      1. Visualizing geolocation data
      2. Ridership by day and hour
    5. Data preprocessing
      1. Handling missing values and data anomalies
    6. Feature engineering
      1. Temporal features
      2. Geolocation features
    7. Feature scaling
    8. Deep feedforward networks
      1. Model architecture
      2. Loss functions for regression problems
    9. Model building in Python using Keras
    10. Results analysis
    11. Putting it all together
    12. Summary
    13. Questions
  10. Cats Versus Dogs - Image Classification Using CNNs
    1. Technical requirements
    2. Computer vision and object recognition
    3. Types of object recognition tasks
    4. Digital images as neural network input
    5. Building blocks of CNNs
      1. Filtering and convolution
      2. Max pooling
    6. Basic architecture of CNNs
    7. A review of modern CNNs
      1. LeNet (1998)
      2. AlexNet (2012)
      3. VGG16 (2014)
      4. Inception (2014)
      5. ResNet (2015)
      6. Where we stand today
    8. The cats and dogs dataset
    9. Managing image data for Keras
    10. Image augmentation
    11. Model building
      1. Building a simple CNN
      2. Leveraging on pre-trained models using transfer learning
    12. Results analysis
    13. Summary
    14. Questions
  11. Removing Noise from Images Using Autoencoders
    1. Technical requirements
    2. What are autoencoders?
    3. Latent representation
    4. Autoencoders for data compression
    5. The MNIST handwritten digits dataset
    6. Building a simple autoencoder
      1. Building autoencoders in Keras
      2. Effect of hidden layer size on autoencoder performance
    7. Denoising autoencoders
      1. Deep convolutional denoising autoencoder
    8. Denoising documents with autoencoders
      1. Basic convolutional autoencoder
      2. Deep convolutional autoencoder
    9. Summary
    10. Questions
  12. Sentiment Analysis of Movie Reviews Using LSTM
    1. Technical requirements
    2. Sequential problems in machine learning
    3. NLP and sentiment analysis
      1. Why sentiment analysis is difficult
    4. RNN
      1. What's inside an RNN?
      2. Long- and short-term dependencies in RNNs
      3. The vanishing gradient problem
    5. The LSTM network
      1. LSTMs – the intuition
      2. What's inside an LSTM network?
        1. Forget gate
        2. Input gate
        3. Output gate
        4. Making sense of this
    6. The IMDb movie reviews dataset
    7. Representing words as vectors
      1. One-hot encoding
      2. Word embeddings
    8. Model architecture
      1. Input
      2. Word embedding layer
      3. LSTM layer
      4. Dense layer
      5. Output
    9. Model building in Keras
      1. Importing data
      2. Zero padding
      3. Word embedding and LSTM layers
      4. Compiling and training models
    10. Analyzing the results
      1. Confusion matrix
    11. Putting it all together
    12. Summary
    13. Questions
  13. Implementing a Facial Recognition System with Neural Networks
    1. Technical requirements
    2. Facial recognition systems
    3. Breaking down the face recognition problem
      1. Face detection
        1. Face detection in Python
      2. Face recognition
    4. Requirements of face recognition systems
      1. Speed
      2. Scalability
      3. High accuracy with small data
    5. One-shot learning
      1. Naive one-shot prediction – Euclidean distance between two vectors
    6. Siamese neural networks
    7. Contrastive loss
    8. The faces dataset
    9. Creating a Siamese neural network in Keras
    10. Model training in Keras
    11. Analyzing the results
    12. Consolidating our code
    13. Creating a real-time face recognition program
      1. The onboarding process
      2. Face recognition process
      3. Future work
    14. Summary
    15. Questions
  14. What's Next?
    1. Putting it all together
      1. Machine Learning and Neural Networks 101
      2. Predicting Diabetes with Multilayer Perceptrons
      3. Predicting Taxi Fares with Deep Feedforward Nets
      4. Cats Versus Dogs – Image Classification Using CNNs
      5. Removing Noise from Images Using Autoencoders
      6. Sentiment Analysis of Movie Reviews Using LSTM
      7. Implementing a Facial Recognition System with Neural Networks
    2. Cutting edge advancements in neural networks
      1. Generative adversarial networks
      2. Deep reinforcement learning
    3. Limitations of neural networks
    4. The future of artificial intelligence and machine learning
      1. Artificial general intelligence
      2. Automated machine learning
    5. Keeping up with machine learning
      1. Books
      2. Scientific journals
      3. Practicing on real-world datasets
    6. Favorite machine learning tools
    7. Summary
  15. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Neural Network Projects with Python
  • Author(s): James Loy
  • Release date: February 2019
  • Publisher(s): Packt Publishing
  • ISBN: 9781789138900