This repo contains code related to this kaggle competition.
This repo contains exclusively data and .ipynb
files for processing, training, and predicting on that data. Specifically, there is:
- The
data
folder. This is where all the data is meant to be. PreProcessing.ipynb
, which contains code that takes the initial dataset and produces a dataset that is ready to be fed to the learning algorithms in this repo.ConvNet.ipynb
, which contains the code for loading data and running a few different Keras CNNs.LogisticRegression.ipynb
, same but for sklearn Logistic Regression.NeuralNet.ipynb
, same but for a 'written-by-hand' implementation of a vanilla NeuralNetwork using Numpy.
-
Download the training and test sets from the Kaggle website and put them in the 'data' directory without renaming the files
-
Run the PreProcessing.ipynb file in jupyter notebook
- This will create the final preprocessed data files used in subsequent
.ipynb
files (both for the training and test data) - This file will also create intermediate data files such as
bw_rescaled_x.csv
which contains all of the images with black background and white digits with the largest digit extracted (~96% accurate extraction of the largest digit)
- This will create the final preprocessed data files used in subsequent
-
Run any of the
LogisticRegression.ipynb
,NeuralNet.ipynb
, andConvNet.ipynb
files in jupyter notebook- You should be able to press play in the jupyter notebook and have the code run
- Each program prints the performance on the validation set and the
LogisitcRegression.ipynb
andConvNet.ipynb
files produce predicts for the processed test dataset - Predictions are stored in
data/LogisitcPredictions.csv
,data/ConvNetPrediction.csv
,data/ConvNetPrediction2.csv
, anddata/ConvNetPrediction3.csv
(3 ConvNets were used for predicting on the test set)
Check out this report outlining the work in this repo.