Kaggle competition: Titanic - Machine Learning from Disaster
<SOS> metric: categorizationaccuracy Kaggle data source: titanic-machine-learning-from-disaster<install_modules>
def ignore_warn(*args, **kwargs):
pass
warnings.warn = ignore_warn
!cp '.. /input/ef5-ahe/ef5_ah_400_1.pth' models/
!cp '.. /input/ef5-400/ef5_400_1.pth' models/
!cp '.. /input/ef5-b15/ef5_b15_400_1.pth' models/
!cp '.. /input/ef5-b15/ef5_b15_320_1.pth' models/
!cp '.. /input/ef5-b-w-400/ef5_b_400_2.pth' models/
!cp '.. /input/ef4-b-ls-400/ef5_b_400_1.pth' models/ 
<train_model>
test = pd.read_csv('.. /input/titanic/test.csv')
 test['Boy'] =(test.Name.str.split().str[1] == 'Master.' ).astype('int')
 submission = pd.DataFrame({'PassengerId': test['PassengerId'], 'Survived': pd.Series(dtype='int32')})
 test['Survived'] = [1 if(x == 'female')else 0 for x in test['Sex']]
test.loc[(test.Boy == 1), 'Survived'] = 1
test.loc[(( test.Pclass == 3)&(test.Embarked == 'S')) , 'Survived'] = 0
submission.Survived = test.Survived
submission.to_csv('submission_S_Boy_Sex.csv', index=False )
<compute_test_metric><EOS> 
def highlight(value):
if value >= 0.5:
style = 'background-color: palegreen'
else:
style = 'background-color: pink'
return style
train = pd.read_csv('.. /input/titanic/train.csv')
 pd.pivot_table(train, values='Survived', index=['Sex'] ).style.applymap(highlight )