Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions article_1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
}
],
"source": [
"print data.shape"
"print (data.shape)"
]
},
{
Expand Down Expand Up @@ -1007,7 +1007,7 @@
"outputs": [],
"source": [
"def status(feature):\n",
" print 'Processing', feature, ': ok'"
" print ('Processing', feature, ': ok')"
]
},
{
Expand Down Expand Up @@ -1084,7 +1084,7 @@
}
],
"source": [
"print combined.shape"
"print (combined.shape)"
]
},
{
Expand Down Expand Up @@ -1283,7 +1283,7 @@
}
],
"source": [
"print titles"
"print (titles)"
]
},
{
Expand Down Expand Up @@ -1632,7 +1632,7 @@
}
],
"source": [
"print combined.iloc[:891].Age.isnull().sum()"
"print (combined.iloc[:891].Age.isnull().sum())"
]
},
{
Expand All @@ -1656,7 +1656,7 @@
}
],
"source": [
"print combined.iloc[891:].Age.isnull().sum()"
"print (combined.iloc[891:].Age.isnull().sum())"
]
},
{
Expand Down Expand Up @@ -2399,7 +2399,7 @@
}
],
"source": [
"print train_cabin"
"print (train_cabin)"
]
},
{
Expand All @@ -2416,7 +2416,7 @@
}
],
"source": [
"print test_cabin"
"print (test_cabin)"
]
},
{
Expand Down Expand Up @@ -2883,7 +2883,7 @@
}
],
"source": [
"print len(tickets)"
"print (len(tickets))"
]
},
{
Expand Down Expand Up @@ -3021,7 +3021,7 @@
}
],
"source": [
"print combined.shape"
"print (combined.shape)"
]
},
{
Expand Down Expand Up @@ -3788,7 +3788,7 @@
"source": [
"model = SelectFromModel(clf, prefit=True)\n",
"train_reduced = model.transform(train)\n",
"print train_reduced.shape"
"print (train_reduced.shape)"
]
},
{
Expand All @@ -3806,7 +3806,7 @@
],
"source": [
"test_reduced = model.transform(test)\n",
"print test_reduced.shape"
"print (test_reduced.shape)"
]
},
{
Expand Down Expand Up @@ -3872,10 +3872,10 @@
],
"source": [
"for model in models:\n",
" print 'Cross-validation of : {0}'.format(model.__class__)\n",
" print ('Cross-validation of : {0}'.format(model.__class__))\n",
" score = compute_score(clf=model, X=train_reduced, y=targets, scoring='accuracy')\n",
" print 'CV score = {0}'.format(score)\n",
" print '****'"
" print ('CV score = {0}'.format(score))\n",
" print ('****')"
]
},
{
Expand Down Expand Up @@ -4070,21 +4070,21 @@
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python [conda root]",
"display_name": "Python 3",
"language": "python",
"name": "conda-root-py"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.12"
"pygments_lexer": "ipython3",
"version": "3.8.5"
}
},
"nbformat": 4,
Expand Down