Skip to content

Commit

Permalink
minor optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
mircealex authored Nov 15, 2019
1 parent 890a0fa commit 33b4078
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Mission433Solutions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -949,11 +949,11 @@
"p_ham = len(ham_messages) / len(training_set_clean)\n",
"\n",
"# N_Spam\n",
"n_words_per_spam_message = spam_messages['SMS'].apply(lambda x: len(x))\n",
"n_words_per_spam_message = spam_messages['SMS'].apply(len)\n",
"n_spam = n_words_per_spam_message.sum()\n",
"\n",
"# N_Ham\n",
"n_words_per_ham_message = ham_messages['SMS'].apply(lambda x: len(x))\n",
"n_words_per_ham_message = ham_messages['SMS'].apply(len)\n",
"n_ham = n_words_per_ham_message.sum()\n",
"\n",
"# N_Vocabulary\n",
Expand Down

0 comments on commit 33b4078

Please sign in to comment.