Skip to content
Open
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
"metadata": {},
"source": [
"## Splitting the data into features and targets (labels)\n",
"Now, as a final step before the training, we'll split the data into features (X) and targets (y)."
"Now, as a final step before the training, we'll split the data into features (X) and targets (y). We must also convert the values in the one hot encoded ranks from a boolean (true or false) to a float (1 or 0)."
]
},
{
Expand All @@ -201,6 +201,7 @@
"targets = train_data['admit']\n",
"features_test = test_data.drop('admit', axis=1)\n",
"targets_test = test_data['admit']\n",
"features = features.astype(float)\n",
"\n",
"print(features[:10])\n",
"print(targets[:10])"
Expand Down