Skip to content

Commit 451c3c7

Browse files
authored
Update 02_Bag_of_Words.ipynb
probably clearer to drop `bow_rep_bin` because it isn't subsequently used. Also, use `fit` instead of `fit_transform`
1 parent ccbf828 commit 451c3c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Ch3/02_Bag_of_Words.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
"source": [
132132
"#BoW with binary vectors\n",
133133
"count_vect = CountVectorizer(binary=True)\n",
134-
"bow_rep_bin = count_vect.fit_transform(processed_docs)\n",
134+
"count_vect.fit(processed_docs)\n",
135135
"temp = count_vect.transform([\"dog and dog are friends\"])\n",
136136
"print(\"Bow representation for 'dog and dog are friends':\", temp.toarray())"
137137
]

0 commit comments

Comments
 (0)