Developing Data Products Course Project

DDP Logo
Author: Reza Nirumand
Date: 2015-10-23

Titanic Survival Prediction App

  • you have read the books /seen the movies or TV series about Titanic
  • You thought what if, if i were in the ship?
  • Could i survive?!!
  • You may be surprised that, having the most expensive first-class ticket / being a young male does not guarantee your survival!

How does the app look like?

app layout

About the Titanic disaster

plot of chunk unnamed-chunk-1

How does it work

When app starts:

  • it builds a model using random forest algorithm which is taken from kaggle website using kaggles “train.csv” dataset.
  • App gets users data from the input panel such gender, age, number of childs, port of embarkation….
  • Then the application does a prediction after clicking submit button by the user.
  • The Result: survived /not survived is shown in results tab.
CheckSurvival<-function(dt){
        Survived <- predict(rf, prepareTestData(dt))
        if(Survived[1]==1)
        {
                return("Wow! you could have survived the disaster!!")
        }
        else
                return("Oh no! Sorry it seems you were not lucky!")
        }