Skip to content

Commit

Permalink
Fixed some typos 🪲
Browse files Browse the repository at this point in the history
Relates to #11.
  • Loading branch information
KarelZe committed Nov 6, 2022
1 parent e956753 commit 98be907
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions notebooks/2.0-mb-data_preprocessing_loading_splitting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3351,7 +3351,7 @@
}
],
"source": [
"# use shap instead of feature importance to maintain consistency throughout the work\n",
"# use shap to maintain consistency throughout the work\n",
"model.fit(X, y)\n",
"explainer = shap.TreeExplainer(model)\n",
"shap_values = explainer.shap_values(Pool(X, y, cat_features=cat_features))\n",
Expand Down Expand Up @@ -3804,9 +3804,10 @@
"outputs": [],
"source": [
"# randomly sample 10 % of rows\n",
"train = train.sample(frac=0.1, random_state=seed)\n",
"valid = valid.sample(frac=0.1, random_state=seed)\n",
"test = test.sample(frac=0.1, random_state=seed)\n"
"frac= 0.1\n",
"train = train.sample(frac=frac, random_state=seed)\n",
"valid = valid.sample(frac=frac, random_state=seed)\n",
"test = test.sample(frac=frac, random_state=seed)\n"
]
},
{
Expand Down Expand Up @@ -4159,7 +4160,9 @@
}
],
"source": [
"# number of samples compared\n",
"n = 20\n",
"\n",
"ser_train = train[\"ROOT\"].value_counts()[:n]\n",
"ser_valid = valid[\"ROOT\"].value_counts()[:n]\n",
"ser_test = test[\"ROOT\"].value_counts()[:n]\n",
Expand Down

0 comments on commit 98be907

Please sign in to comment.