Machine Learning / A.I. Projects

I have grouped my Artificial Intelligence and Data Science / Machine Learning projects in one repository for ease of viewing. I used Python exclusively for these projects.

Butterfly Image Classifier

This group project was a semester-long effort to create a machine learning algorithm that would identify the different species of butterflies based on provided image sets. The original competition prompt was found on kaggle, and we provided our solution as part of our end-of-year Data Science assignment. Images of butterflies will be given to help train the machine in classifying the butterflies as Yum (Non-poisonous) or Yuck (Poisonous) to birds based on the features laid out in the dataset.
Various classification and image processing techniques and libraries are used throughout our program, and documented throughout. Due to the vast amount of photos used for training and testing, I have not uploaded them to the repository, but have included a final report with our findings and methods which include screenshots of our outputs.


Tic-Tac-Toe A.I. Player

The goal of this program is to create an agent that can make optimal moves to win a Tic Tac Toe game. Given an input game state, I try and find the best move for the 'X' player (our intelligent agent) using the Minimax algorithm, where we assign a numeric score of +10 for an 'X' win, -10 for an 'O' win, and 0 for a draw. In addition, in order to motivate the agent to win or lose as soon as possible, I subtract the depth of the completed game state from the score (as shown below).

Minimax Scoring

I then create a function Minimax that uses a dictionary to pair the values of the game state to the game score, and so incorporate the depth-score to get an optimal move. I then incorporate the Minimax algorithm using recursion to get a score at each depth level of the game, then compare that to the highest or lowest possible scores at that depth, then use the appropriate one as the move in our X_move function. Once we run the code, the intelligent agent ('X') plays against 'O' (which just prints the next possible move), and finds the most efficient path to a win score.

Minimax Running

Heart Disease Predictor

In this Machine Learning project, I use a heart disease dataset provided by UC Irvine. Using the features in the data, I build a Logistic Regression Classifier model to predict heart disease (the label) based on the training and testing datasets I create using sklearn, then compute and report the accuracy.


I also use matplot library to plot the ROC Curve for this classifier to show the performance of the model in terms of True Positive Rate vs False Positive Rate at different classification thresholds, and compute the area under the curve (AUC) to measure the quality of the model's predictions.

Heart Disease ROC