Book Image

Neural Network Projects with Python

By : James Loy
Book Image

Neural Network Projects with Python

By: James Loy

Overview of this book

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.
Table of Contents (10 chapters)

Questions

  1. When reading a CSV file using pandas, how does pandas recognize that certain columns are datetime?

We can use the parse_dates argument when reading the CSV file using the read_csv function in pandas.

  1. How can we filter a DataFrame to only select rows within a certain range of values, assuming that we have a DataFrame, df, and we want to select rows with height values within the range of 160 and 180?

We can filter a DataFrame like so:

df = df[(df['height'] >= 160) & (df['height'] <= 180)]

This returns a new DataFrame with range of height values between 160 and 180.

  1. How can we use code modularization to organize our neural network projects?

We can compartmentalize our functions using modular pieces of code. For example, in this project, we defined a preprocess and feature_engineer function in utils.py, which allows us to focus on...