DataSimple Guided Projects
Data science and learning how to code Python or really any coding language is unlike learning a traditional academic skill. Learning to write Python and build Machine or Deep Learning models is more like learning to paint in that we need to explore what is possible and how to follow your imagination in how we perform data analysis, pre-processing the data for our machine learning model, or architecting our deep learning model.
There are just so many possibilities out there that it's hard to know where to start. In this section, we have our free to use Python guided projects we practice data analysis with Pandas and Seaborn, machine learning with Sklearn and deep learning with Tensorflow.
Python Deep Learning
Type of data for your deep learning model:
In the Python Deep Learning projects, we will explore how to build computer vision and NLP models in Tensorflow. Neural Networks can handle a large number of regular machine-learning task like classification and regression. In our Python Deep Learning Projects we will explore all that is possible with artificial intelligence.
Deep Learning with Tensorflow - DataFrame / Spreadsheet
Level 1, 18 minutes
In the first part of our LSTM stock prediction series we will start by getting our deep-learning neural network. In our Tensorflow model, we use the LSTM layer but either the SImpleRNN or GRU layers can easily be substituted in the Python code. This is a great opportunity to build intuition around the impact of each recurrent layer on our time series prediction.
LSTM Google Stock Prediction part 2 -Seasonal Decomposition Time Series
Level 2, 22 minutes
In our second part of the LSTM stock prediction using Tensorflow. Now that we have our deep learning model with LSTM recurrent layer set up we focus on the times series part of our project and dive deep into the seasonal decomposition of our MACD, RSI, Fast Stochastic, and pct_change indicators...
In this Python deep learning guided project we will first predict with Sklearn's Random Forest
to set a baseline prediction for our Tensorflow's Sequential model. In this Python deep learning project we will also set up model experiments to iteratively find the best architecture and try and best the Sklearn models.
TensorFlow has 3 available APIs to build your neural network Sequential API, Functional API, and the Subclassing Model API. These 3 API offer different levels of flexibility and ease of writing code. The Sequential API is the easiest to use and a great place to start for some new to TensorFlow. It's limited in the sense that it can only have a one-way flow through the network. Where the functional API, although still fairly simple to write, allows having multiple inputs and outputs and really allows for creative neural network design.
The Subclassing Model API allows for the highest level of customization. With the Subclassing API you can you can define your own forward pass logic, loss functions, and optimization routines. This is also a good choice when we have a network that needs to adapt to the data because it allows for dynamic architecture. If you are a research scientist this is likely the API you'll be using. Don't worry we're just going to introduce the model API here as it is the most complex code to use and requires advanced Python knowledge.
In the 3rd part of our stock market prediction use the LSTM layer to predict google stock. use TensorFlow and build a neural network to predict. In the project, we pick up where we left off and include economics like Average Weekly Hours economic statistics and more with our times series prediction. We also focus on finding the right architecture for your neural network with TensorFlow in Python.
Here we will use the functional API in TensorFlow to see if we can get a better accuracy score on the Kaggle competitions for the Titanic Dataset, a common data science project. The Titanic Classification Data is one of the first projects that most will use in the data science journey.
This is a fairly easy dataset and most students ignore the name and ticket columns as with classical machine learning there isn't much we can do with easily. However, with TensorFlow, we can use a Convolutional 1D layer to reduce it down to small groups of characters, and if there is a pattern with either the name or the ticket that will help our final predictions.
Continuing our LSTM stock prediction Python guided deep learning project. In our part 4 part of our Tensorflow Stock prediction project, we start with the functional API in Tensorflow. The functional API will allow us to ingest 3 different sources of data and extract higher-level features from each dataset before combining it with the next channel inside your neural network.
Deep Learning with Tensorflow - NLP
In this Deep Learning TensorFlow Guided Project, we will use the LSTM recurrent layer along with an embedding layer and dense fully connected layer in Python to predict if the news Headlines are sarcastic or not.
After we've done the essential NLP processing for deep learning we are ready to start building our architecture. We start with an embedding layer and next in our deep learning TensorFlow model we add a recurrent layer. You can use SimpleRNN, GRU, or LSTM layers but here we choose to use the LSTM layer.
In this simple TensorFlow multiclass prediction problem in Python we will be an NLP model and attempt to classify poems as Affection, Death, Environment, or Love. Poems are a very difficult NLP classification due to the abstract nature of the writing makes this a very difficult dataset to get a very high score. Our goal will be an accuracy of .50, which is normally very low but very difficult to achieve on Poem classification.
We will build our model today in the Sequential model in TensorFlow. The first layer in our model will be an Embedding layer. We will follow our embedding layer with a special type of dropout layer called Spatial Dropout and this drops each neuron by changing not a certain percentage of each layer. This allows some epochs to have more or less total neurons turned off. This type of dropout works for NLP problems.
Level 4, 27 minutes
Follow along with this Free Guided TensorFlow project. In this free Python Project, we will use TensorFlow to build a deep learning model that will generate names. Here we will mix names of Indian Gods with Anime characters, why? Well because we wanted to have a little fun and be a little creative with our NLP TensorFlow Text Generation Project.
Name generation is actually easier than you would think, simply put your deep learning model that predicts the next character in a loop. The hard part is designing your deep learning model to be accurate but also a little crazy so we get some interesting generated names.
Level 5, 24 minutes
Hugging Face is an open-source library that provides pre-trained models for natural language processing (NLP) tasks. In this project, we will be using the TFDistilBertForSequenceClassification model for sequence classification and the DistilBertConfig and DistilBertTokenizer tools from Hugging Face. The goal of this project is to demonstrate how these tools can be used together to perform sequence classification on text data. We will start by loading the necessary libraries and then move on to exploring the data and implementing the sequence classification task.
Follow along and learn to code an NLP classification problem in TensorFlow Guided Python Project. In this guided project we will use the text review left by customers on Amazon's site and predict which star rating was left based on how they described their experience with the product.
In this TensorFlow NLP project, our teacher will guide you through a more thorough NLP preprocessing as we eliminate stop words using NLTK library, the natural language tool kit, and then remove punctuation using the string library in Python. Adding to the preprocessing steps here we also will be stemming our vocabulary to help reduce the number of total different words in our text hopefully making it easy for our model to predict.
In this level 5 guided project, we build a more advanced Sequential model in TensorFlow...
Level 6, 48 minutes
DistilBERT, a derivative of BERT (Bidirectional Encoder Representations from Transformers), is a highly efficient and compact model that retains most of the original BERT's language understanding capabilities. The "uncased" variant means that the model considers the text as lowercase, disregarding capitalization. This makes it ideal for our sentiment classification task, as sentiment can be captured effectively without considering case sensitivity. This model is produced by Hugging Faces and the documentation for the DistilBERT can be found here. And the original paper can be found here.
Deep Learning with Tensorflow - Computer Vision
In this simple TensorFlow Computer Vision Guided Project in Python we a convolution neural network or deep learning model to predict a binary classification problem and predict with an X-ray image containing a chest X-ray image with or without pneumonia.
Medical Image classification is a common and important type of computer vision problem In future projects we will explore the many various types of image preprocessing available on our images to enhance our predictions.
In this Simple Computer Vision guided project in TensorFlow using Python we will build a deep learning model to classify whether a dessert is an Apple Pie, French Toast, Donuts, or Cheesecake. In the near future, a company is building a machine to automate serving food to customers. The problem is that the Ai needs to be able to tell what food serving it is serving to customers.
Follow along in the Simple Python Guided Project Multiclass Computer Vision and classify which dessert is in the images. In the deep learning project, we will use the Sequential model in TensorFlow. To our Sequential model, we will add a set of two Convolutional layers. Convolutional layers tend to work well as pairs. Each convolution is followed with max-pooling layers and drop-out layers. We use max pooling because it was the same effect as sharpening images in a simple photo editor. These are following my dropout layers to prevent overfitting.
The hardest part of Computer Vision isn't the architecture is setting up the data for the model. Too many pictures are needed than can fit in your memory, TensorFlow's ImageDataGenerator allows you to connect your model with the folder that contain your images and allows you to pull images and augment new ones each epoch.
This project shows how to use two Convolutional layers in TensorFlow's Sequential model. Convolutional layers in our context are of the common architecture of 2 - 2D Convolutional Layers followed by a 2D Max Pooling layer and then the import Dropout Layer to help with regularization and prevent overfitting. The layers come from the keras sub library inside TensorFlow.
The Series of convolutional layers is usually followed by a Dense layer but in this project, we wanted to test putting a recurrent layer and chose to use the...
A special theme of this problem is planning out how to train a model of this complex without a GPU. There are lots of people who don't have access to a GPU to train their neural networks but that shouldn't stop them from practicing and experimenting with more complex models.
Level 6, 44 minutes
Unlock the secrets hidden within the MNIST digits dataset and emerge as a proficient image classifier!
Our CNN block comprises two convolutional layers, a max pooling layer, and a dropout layer. The convolutional layers extract essential features from the input images, while the max pooling layer reduces spatial dimensions. The dropout layer prevents overfitting by randomly deactivating neurons during training, enhancing the model's generalization ability. Together, these components form a powerful architecture that enables accurate classification in the Kaggle competition using the MNIST digits dataset.
What sets this TensorFlow project apart is its unique approach of defining a Python class to enable experimentation. By encapsulating our code and functionality within a class, we create a modular and flexible framework for conducting experiments and fine-tuning our models. This class will serve as a powerful tool that allows us to easily modify various aspects of our model, such as the architecture, hyperparameters, and data preprocessing techniques, all while maintaining a structured and organized codebase.