I'm using the Titanic data set to classify the missing Cabins. There is a lot of missing Cabin values. My objective is just to assign the letter of the Cabin without the room number. So, I'm just wanting to use the models to assign the section letter. I've used 4 models:

  • (2) RandomForestClassifier with two different parameters
  • a LinearSVC model
  • a OVR with SVC as the base estimator

However, my scores are extremely poor. I have not tried using the GridSearchCV yet to try to find the best parameters for the models because I wanted to see if there is any recommendations on which parameters to use that could possible give better scores than what I was able to get.

Here is my notebook to see my work: https://github.com/SugarfreeTX/kaggle/blob/master/cabin_classification.ipynb

The data set is in the repository.

  • $\begingroup$ Are you sure that the features contain indications about the missing cabins? If you study the features manually, can you guess the missing cabin reasonably well? If not, it's unlikely that a ML algorithm can do it. $\endgroup$ – Erwan Apr 14 at 21:29
  • $\begingroup$ Okay, i didn't know that was a way to go about it. I figured that the combination of Fare and Class it would be possible. Thanks for clarifying that. Now I see why it hasn't ever been attempted. $\endgroup$ – idkfa.bfg2 Apr 15 at 22:24

Let us try to think from first principles for this problem. It is not clear what outcome you want to achieve by trying to predict cabin section here. I'm assuming it is purely learning to apply ML algorithms. We can hypothesize that the cabin sections assigned to a passengers would've been assigned by their class and fair paid.

You can note (from the notebook link) that there are about 295 rows in the data where you have cabin section calculated. There are 7 unique values for cabin class. So you are effectively trying to fit a multi-class classifier with 7 possible output values from a data of size 295. It is unlikely to give much accuracy no matter which algorithm you choose.

You might find some mild success by trying to predict it using fare paid and passenger class. Other variables in dataset (sex, age) may not be that useful for this task.

Also, with so few columns and rows, using random forest etc. is overkill here (you don't have a large number of columns). tl:dr; is this is probably not a good task for machine learning.

  • $\begingroup$ Okay now I see. Also, you are correct, I was just trying to see if I could apply ML to the problem. Thanks for clarifying this. I figure the number of rows might be too little so I tried to use different algos to see if any one of them would provide better scores than the other but they all seem to score around the same. Thanks for the feedback! $\endgroup$ – idkfa.bfg2 Apr 15 at 22:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.