Skip to content

Commit

Permalink
Small format fix for word2vec+svm
Browse files Browse the repository at this point in the history
  • Loading branch information
advaithsrao committed Nov 8, 2023
1 parent 473ddd6 commit e6d65ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions detector/modeler.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def train(
X = None
# Concatenate sparse matrices into a single feature matrix
for doc in body:
doc_vector = self.vectorizer.transform(doc)
doc_vector = self.vectorizer.fit_transform(doc)
if X is None:
X = doc_vector
else:
Expand Down Expand Up @@ -373,7 +373,7 @@ def predict(
X = None
# Concatenate sparse matrices into a single feature matrix
for doc in body:
doc_vector = self.vectorizer.transform(doc)
doc_vector = self.vectorizer.fit_transform(doc)
if X is None:
X = doc_vector
else:
Expand Down

0 comments on commit e6d65ef

Please sign in to comment.