0
$\begingroup$

I have been working on the Kaggle tutorial on the Titanic Disaster. Although I get a result which seems good to me (on the training set) the trained model performs bad on the test set. It would be great if you wanted to help me to understand what I am doing wrong.

Here is my notebook https://www.kaggle.com/asindico/titanic/my-titanic-attempt

$\endgroup$

1 Answer 1

1
$\begingroup$

Here is a pretty solid notebook for you to compare with (their random forest yielded 0.98): https://www.kaggle.com/startupsci/titanic/titanic-data-science-solutions/notebook

Have you tried adjusting the number of estimators in your random forest model? It looks like you are using 10, but more should help improve the model. Try 100.

I get a result which seems good to me (on the training set) the trained model performs bad on the test set

Don't base your results on the training set. Your test set is how you assess your model.

$\endgroup$
2
  • $\begingroup$ Thank you! I meant the test set obtained from the 20% of the data they gave me for training (I split it 80-20) $\endgroup$ Jan 5, 2017 at 19:50
  • $\begingroup$ Anyway the problem was that the output was float instead of int. I scored 0 for this :) $\endgroup$ Jan 5, 2017 at 19:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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