AI Blueprint Engine in Action: Purpose-Built Deep Learning for Predicting Survival of the Titanic Disaster

Jun 4, 2018 · 7 min read
Walk-through using the AI Blueprint Engine to generate code for an end-to-end machine learning pipeline including data loading, pre-processing and a deep neural network for the titanic passenger survival prediction project.

Starting the project

Retrieving and preparing data

Output of the code excerpt above, the top rows provide information about columns in the train.csv file, the bottom rows about the test.csv file.
Filling the missing values in the Age and Fare feature columns.
Filling the missing values in the Embarked feature.
Encode the Sex and Embarked features with categorical indices.

Building the model with the AI Blueprint Engine

Setting up the environment

# Create new environment "venv" inside the current
# working directory and activate it.
$ conda create --name venv python=2.7 && source activate venv
# Install packages.
$ pip install -r requirements.txt

Training the model

Running with the default configuration.

Predicting survival of passengers from the test set

cp titanic_ml_from_disaster/ \ 
The modified data loading function. We explicitly subtract the column indices by one to highlight the changes.
$ python titanic_ml_from_disaster/ \
--source_file_1 ./data/test_preprocessed.csv


Written by


Bridging the gap between ease of use and flexibility in artificial intelligence development —

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade