Skip to content

Commit

Permalink
Merge pull request udacity#8 from jared-weed/machine-learning-brance
Browse files Browse the repository at this point in the history
Fix for loops and visualization
  • Loading branch information
jared-weed committed Mar 18, 2016
2 parents b1e205e + 53d76d3 commit bcc7d63
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
" \"\"\" Model with no features. Always predicts a passenger did not survive. \"\"\"\n",
"\n",
" predictions = []\n",
" for passenger in data.iterrows():\n",
" for _, passenger in data.iterrows():\n",
" \n",
" # Predict the survival of 'passenger'\n",
" predictions.append(0)\n",
Expand Down Expand Up @@ -226,7 +226,7 @@
" - Predict a passenger survived if they are female. \"\"\"\n",
" \n",
" predictions = []\n",
" for passenger in data.iterrows():\n",
" for _, passenger in data.iterrows():\n",
" \n",
" # Remove the 'pass' statement below \n",
" # and write your prediction conditions here\n",
Expand Down Expand Up @@ -282,7 +282,7 @@
},
"outputs": [],
"source": [
"survival_stats(data, outcomes, 'Parch', [\"Sex == 'male'\"])"
"survival_stats(data, outcomes, 'Age', [\"Sex == 'male'\"])"
]
},
{
Expand Down Expand Up @@ -310,7 +310,7 @@
" - Predict a passenger survived if they are male and younger than 10. \"\"\"\n",
" \n",
" predictions = []\n",
" for passenger in data.iterrows():\n",
" for _, passenger in data.iterrows():\n",
" \n",
" # Remove the 'pass' statement below \n",
" # and write your prediction conditions here\n",
Expand Down Expand Up @@ -395,7 +395,7 @@
" \"\"\" Model with multiple features. Makes a prediction with an accuracy of at least 80%. \"\"\"\n",
" \n",
" predictions = []\n",
" for passenger in data.iterrows():\n",
" for _, passenger in data.iterrows():\n",
" \n",
" # Remove the 'pass' statement below \n",
" # and write your prediction conditions here\n",
Expand Down

0 comments on commit bcc7d63

Please sign in to comment.