Skip to content

Commit a683b34

Browse files
authored
Merge pull request #36 from az0/master
Do copy editing
2 parents a4d1e9c + ab74160 commit a683b34

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

notebooks/xgboost-titanic.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
"cell_type": "markdown",
106106
"metadata": {},
107107
"source": [
108-
"We do just minimal preprocessing: convert obviously contiuous *Age* and *Fare* variables to floats,\n",
108+
"We do just minimal preprocessing: convert obviously continuous *Age* and *Fare* variables to floats,\n",
109109
"and *SibSp*, *Parch* to integers. Missing *Age* values are removed."
110110
]
111111
},
@@ -170,14 +170,14 @@
170170
"cell_type": "markdown",
171171
"metadata": {},
172172
"source": [
173-
"There is one tricky bit about the code above: one may be templed to just pass ``dense=True`` to ``DictVectorizer``: after all, in this case the matrixes are small. But this is not a great solution, because we will loose the ability to distinguish features that are missing and features that have zero value.\n",
173+
"There is one tricky bit about the code above: one may be tempted to just pass ``dense=True`` to ``DictVectorizer``: after all, in this case the matrixes are small. But this is not a great solution, because we will lose the ability to distinguish features that are missing and features that have zero value.\n",
174174
"\n",
175175
"\n",
176176
"## 3. Explaining weights\n",
177177
"\n",
178-
"In order to calculate a prediction, XGBoost sums predictions of all its trees.\n",
178+
"To calculate a prediction, XGBoost sums predictions of all its trees.\n",
179179
"The number of trees is controlled by ``n_estimators`` argument and is 100 by default.\n",
180-
"Each tree is not a great predictor on it's own, but by summing across all trees,\n",
180+
"Each tree is not a great predictor on its own, but by summing across all trees,\n",
181181
"XGBoost is able to provide a robust estimate in many cases. Here is one of the trees:"
182182
]
183183
},
@@ -1151,8 +1151,8 @@
11511151
"source": [
11521152
"## 5. Adding text features\n",
11531153
"\n",
1154-
"Right now we treat *Name* field as categorical, like other text features.\n",
1155-
"But in this dataset each name is unique, so XGBoost does not use this feature at all, because it's\n",
1154+
"Now we treat *Name* field as categorical, like other text features,\n",
1155+
"but in this dataset, each name is unique, so XGBoost does not use this feature at all, because it's\n",
11561156
"such a poor discriminator: it's absent from the weights table in section 3.\n",
11571157
"\n",
11581158
"But *Name* still might contain some useful information. We don't want to guess how to best pre-process it\n",

0 commit comments

Comments
 (0)