Multi-Class Deep Learning Model for Rock Paper Scissors Using TensorFlow Take 1

Template Credit: Adapted from a template made available by Dr. Jason Brownlee of Machine Learning Mastery.

SUMMARY: The purpose of this project is to construct a predictive model using various machine learning algorithms and to document the end-to-end steps using a template. The Rock Paper Scissors dataset is a multi-class classification situation where we are trying to predict one of several (more than two) possible outcomes.

INTRODUCTION: When learning Computer Vision, especially the training of DNNs and CNNs to recognize and classify images, there is a shortage of suitable datasets. Laurence Moroney wanted to fix that problem by creating a dataset that could be used for teaching multi-class classifiers that were unique and distinct from existing datasets. Laurence also wished to see if he could use Photo-real CGI to train a neural network that could then recognize and classify real images with the same subject matter.

The Rock Paper Scissors dataset contains images from a variety of different hand poses with different races, ages, and genders. These images have all been generated using CGI techniques as an experiment in determining if a CGI-based dataset can be used for classification against real photos. All of this data is posed against a white background, and each image is 300×300 pixels in 24-bit color.

In this Take1 iteration, we will construct and tune machine learning models for this dataset using TensorFlow with two VGG blocks. Laurence also demonstrated the dataset using a model with four VGG blocks, each block with just one convolution layer. We will observe the best result that we could obtain using different VGG-2 models with a different number of convolution layers.

ANALYSIS: From this Take1 iteration, the performance of the baseline model achieved an accuracy score of 97.85% on the validation dataset after 15 epochs. After a series of modeling trials, the TensorFlow model with two VGG blocks and two convolution layers processed the validation dataset with an accuracy score of 95.16%.

CONCLUSION: For this dataset, the model built using TensorFlow with two VGG blocks did not improve the result from the baseline model. However, we still should consider using TensorFlow and VGG blocks to model this dataset further.

Dataset Used: Rock Paper Scissors Dataset

Dataset ML Model: Multi-classification with numerical attributes

Dataset Reference: http://www.laurencemoroney.com/rock-paper-scissors-dataset/

The HTML formatted report can be found here on GitHub.

Scott Adams on Loserthink, Part 7

In the book, Loserthink: How Untrained Brains Are Ruining America, Scott Adams analyzed and discussed ways to teach us how to eliminate our biases and to sharpen our ability to think critically.

These are some of my favorite quotes and takeaways from reading the book.

How can we minimize our tendency for Loserthink by not copying things that pundits say?

What to watch out for: Moral Equivalency

“If you are accusing someone of making inappropriate morel equivalences, you are probably experiencing Loserthink of the mind reader variety.”

What to watch out for: Word-Thinking

“If your only complaint about another person’s behavior is that it might normalize something, you might not have any reasons to back your opinion.”

“If you find yourself calling a plan problematic and you can’t give some reasonable-sounding examples to back up your opinion, you might be engaging loserthink.”

What to watch out for: The Hypocrisy Defense

“If you make a mistake and your best response is that other people do similar things, you are engaging in loserthink.”

What to watch out for: Fairness

“Arguing for fairness is loserthink because no two people will agree on what it looks like. The exception is when you are trying to persuade, in which case rationality matters less.”

What to watch out for: Feels-The-Same

“If you find that your best argument depends on the predictive or persuasive characteristics of analogies, you are likely in a mental prison of your own making.”

What to watch out for: Friction

“Add friction to any human choice will reduce the number of people making that choice. To assume otherwise is loserthink.”

What to watch out for: Mentioning Is Not Comparing

“If two or more items are mentioned in the same conversation, that doesn’t mean anyone is comparing them for relative value.”

What to watch out for: “Do Your Own Research”

“For big, complicated political questions, “doing your own research” is a waste of time.”

What to watch out for: “Be Yourself”

“Never be yourself if you can make yourself into something better through your conscious actions. You are what you do.”

What to watch out for: “Coward!”

“It is loserthink to call people cowards after those people risked their lives for a cause.”

What to watch out for: “Apologist!” and Words Like That

“If your response to a disagreement is to assign your opponent a dismissive label, you have surrendered the moral and intellectual high ground to wallow in loserthink.”

What to watch out for: “Why Didn’t You Do It Sooner?”

“If someone does something you appreciate, it is loserthink to ask why it didn’t happen sooner.”

Web Scraping of Books to Scrape Using Selenium Take 2

SUMMARY: The purpose of this project is to practice web scraping by extracting specific pieces of information from a website. The Python web scraping code leverages the Selenium module.

INTRODUCTION: Books to Scarpe is a fictional bookstore that desperately wants to be scraped according to its site owner. It is a safe place for beginners learning web scraping and for developers validating their scraping technologies as well. This iteration of the script automatically traverses the book listing and detail web pages to capture all the descriptive data about the books and store them in a CSV output file.

Starting URLs: http://books.toscrape.com/

The source code and HTML output can be found here on GitHub.

Binary Classification Deep Learning Model for Horses or Human Using TensorFlow Take 3

Template Credit: Adapted from a template made available by Dr. Jason Brownlee of Machine Learning Mastery.

SUMMARY: The purpose of this project is to construct a predictive model using various machine learning algorithms and to document the end-to-end steps using a template. The Horses or Humans dataset is a binary classification situation where we are trying to predict one of the two possible outcomes.

INTRODUCTION: When learning Computer Vision, especially the training of DNNs and CNNs to recognize and classify images, there is a shortage of suitable datasets. Laurence Moroney wanted to fix that problem by creating a dataset that could be used for teaching binary classifiers that were unique and distinct from existing datasets. Laurence also wished to see if he could use Photo-real CGI to train a neural network that could then recognize and classify real images with the same subject matter.

The set contains 500 rendered images of various species of horses in different poses in multiple locations. It also includes 527 rendered images of humans in various poses and locations. Emphasis has been taken to ensure the diversity of humans, and to that end, there are both men and women as well as different ethnic groups present in the training set. The validation set adds six different figures of varying gender, race, and pose to ensure the breadth of data.

In iteration Take1, we constructed and tuned machine learning models for this dataset using TensorFlow with three VGG blocks. Laurence also demonstrated the dataset using a model with five VGG blocks, each block with just one convolution layer. We also observed the best result that we could obtain using different VGG-3 models with a different number of convolution layers.

In iteration Take2, we constructed and tuned machine learning models for this dataset using TensorFlow with four VGG blocks. Laurence also demonstrated the dataset using a model with five VGG blocks, each block with just one convolution layer. We also observed the best result that we could obtain using different VGG-4 models with a different number of convolution layers.

In this Take3 iteration, we will construct and tune machine learning models for this dataset using TensorFlow with three to five VGG blocks with Dropout layers. Laurence also demonstrated the dataset using a model with five VGG blocks, each block with just one convolution layer. We will observe the best result that we could obtain using different VGG models with Dropout.

ANALYSIS: From iteration Take1, the performance of the baseline model achieved an accuracy score of 82.03% on the validation dataset after 15 epochs. After a series of modeling trials, the TensorFlow model with three VGG blocks and two convolution layers processed the validation dataset with an accuracy score of 85.94%.

From iteration Take2, the performance of the baseline model achieved an accuracy score of 83.59% on the validation dataset after 15 epochs. After a series of modeling trials, the TensorFlow model with four VGG blocks and two convolution layers processed the validation dataset with an accuracy score of 86.33%.

From this Take3 iteration, the performance of the baseline model achieved an accuracy score of 82.42% on the validation dataset after 15 epochs. After a series of modeling trials, the TensorFlow model with four VGG blocks and three convolution layers with Dropout processed the validation dataset with an accuracy score of 89.45%.

CONCLUSION: For this dataset, the model built using TensorFlow with four VGG blocks and three convolution layers per block with Dropout improved the result from the baseline model. We should consider using TensorFlow and VGG blocks to model this dataset further.

Dataset Used: Horses or Humans Dataset

Dataset ML Model: Binary Classification with numerical attributes

Dataset Reference: http://www.laurencemoroney.com/horses-or-humans-dataset/

The HTML formatted report can be found here on GitHub.

Time Series Model for Private Housing Permits for California Using Python and ARIMA

Template Credit: Adapted from a template made available by Dr. Jason Brownlee of Machine Learning Mastery.

SUMMARY: The purpose of this project is to construct a time series prediction model and document the end-to-end steps using a template. The Private Housing Permits for California dataset is a time series situation where we are trying to forecast future outcomes based on past data points.

INTRODUCTION: The problem is to forecast the monthly total number of building permits for all structure types for the state of California. The dataset describes a time-series of permits issued over 30 years (1991-2020), and there are 354 observations. We used the first 80% of the observations for training various models while holding back the remaining observations for validating the final model.

ANALYSIS: The baseline prediction (or persistence) for the dataset resulted in an RMSE of 2153. After performing a grid search for the most optimal ARIMA parameters, the final ARIMA non-seasonal order was (0, 1, 1) with the seasonal order being (1, 0, 2, 12). Furthermore, the chosen model processed the validation data with an RMSE of 1486, which was better than the baseline model as expected.

CONCLUSION: For this dataset, the chosen ARIMA model achieved a satisfactory result, and we should consider using the algorithm for further modeling.

Dataset Used: Monthly New Private Housing Units Authorized by Building Permits for California

Dataset ML Model: Time series forecast with numerical attribute

U.S. Census Bureau, New Private Housing Units Authorized by Building Permits for California [CABPPRIV], retrieved from FRED, Federal Reserve Bank of St. Louis; https://fred.stlouisfed.org/series/CABPPRIV, August 23, 2020.

The HTML formatted report can be found here on GitHub.

Binary Classification Deep Learning Model for Horses or Human Using TensorFlow Take 2

Template Credit: Adapted from a template made available by Dr. Jason Brownlee of Machine Learning Mastery.

SUMMARY: The purpose of this project is to construct a predictive model using various machine learning algorithms and to document the end-to-end steps using a template. The Horses or Humans dataset is a binary classification situation where we are trying to predict one of the two possible outcomes.

INTRODUCTION: When learning Computer Vision, especially the training of DNNs and CNNs to recognize and classify images, there is a shortage of suitable datasets. Laurence Moroney wanted to fix that problem by creating a dataset that could be used for teaching binary classifiers that were unique and distinct from existing datasets. Laurence also wished to see if he could use Photo-real CGI to train a neural network that could then recognize and classify real images with the same subject matter.

The set contains 500 rendered images of various species of horses in different poses in multiple locations. It also includes 527 rendered images of humans in various poses and locations. Emphasis has been taken to ensure the diversity of humans, and to that end, there are both men and women as well as different ethnic groups present in the training set. The validation set adds six different figures of varying gender, race, and pose to ensure the breadth of data.

In iteration Take1, we constructed and tuned machine learning models for this dataset using TensorFlow with three VGG blocks. Laurence also demonstrated the dataset using a model with five VGG blocks, each block with just one convolution layer. We also observed the best result that we could obtain using different VGG-3 models with a different number of convolution layers.

In this Take2 iteration, we will construct and tune machine learning models for this dataset using TensorFlow with four VGG blocks. Laurence also demonstrated the dataset using a model with five VGG blocks, each block with just one convolution layer. We will observe the best result that we could obtain using different VGG-4 models with a different number of convolution layers.

ANALYSIS: From iteration Take1, the performance of the baseline model achieved an accuracy score of 82.03% on the validation dataset after 15 epochs. After a series of modeling trials, the TensorFlow model with three VGG blocks and two convolution layers processed the validation dataset with an accuracy score of 85.94%.

From this Take2 iteration, the performance of the baseline model achieved an accuracy score of 83.59% on the validation dataset after 15 epochs. After a series of modeling trials, the TensorFlow model with four VGG blocks and two convolution layers processed the validation dataset with an accuracy score of 86.33%.

CONCLUSION: For this dataset, the model built using TensorFlow with four VGG blocks and two convolution layers the result from the baseline model. We should consider using TensorFlow and VGG blocks to model this dataset further.

Dataset Used: Horses or Humans Dataset

Dataset ML Model: Binary Classification with numerical attributes

Dataset Reference: http://www.laurencemoroney.com/horses-or-humans-dataset/

The HTML formatted report can be found here on GitHub.

Binary Classification Deep Learning Model for Horses or Human Using TensorFlow Take 1

Template Credit: Adapted from a template made available by Dr. Jason Brownlee of Machine Learning Mastery.

SUMMARY: The purpose of this project is to construct a predictive model using various machine learning algorithms and to document the end-to-end steps using a template. The Horses or Humans dataset is a binary classification situation where we are trying to predict one of the two possible outcomes.

INTRODUCTION: When learning Computer Vision, especially the training of DNNs and CNNs to recognize and classify images, there is a shortage of suitable datasets. Laurence Moroney wanted to fix that problem by creating a dataset that could be used for teaching binary classifiers that were unique and distinct from existing datasets. Laurence also wished to see if he could use Photo-real CGI to train a neural network that could then recognize and classify real images with the same subject matter.

The set contains 500 rendered images of various species of horses in different poses in multiple locations. It also includes 527 rendered images of humans in various poses and locations. Emphasis has been taken to ensure the diversity of humans, and to that end, there are both men and women as well as different ethnic groups present in the training set. The validation set adds six different figures of varying gender, race, and pose to ensure the breadth of data.

In this Take1 iteration, we will construct and tune machine learning models for this dataset using TensorFlow with three VGG blocks. Laurence also demonstrated the dataset using a model with five VGG blocks, each block with just one convolution layer. We will observe the best result that we could obtain using different VGG-3 models with a different number of convolution layers.

ANALYSIS: From this Take1 iteration, the performance of the baseline model achieved an accuracy score of 82.03% on the validation dataset after 15 epochs. After a series of modeling trials, the TensorFlow model with three VGG blocks and two convolution layers processed the validation dataset with an accuracy score of 85.94%.

CONCLUSION: For this dataset, the model built using TensorFlow with three VGG blocks and two convolution layers the result from the baseline model. We should consider using TensorFlow and VGG blocks to model this dataset further.

Dataset Used: Horses or Humans Dataset

Dataset ML Model: Binary Classification with numerical attributes

Dataset Reference: http://www.laurencemoroney.com/horses-or-humans-dataset/

The HTML formatted report can be found here on GitHub.