Skip to content

Commit

Permalink
Merge branch 'mljar:master' into #729
Browse files Browse the repository at this point in the history
  • Loading branch information
maciekmalachowski authored Jul 9, 2024
2 parents 4585419 + d06ee68 commit cc55741
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions supervised/preprocessing/text_transformer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import warnings

import numpy as np
import pandas as pd
from sklearn.feature_extraction.text import TfidfVectorizer

Expand Down Expand Up @@ -70,4 +70,4 @@ def from_json(self, data_json):
)
self._vectorizer.vocabulary_ = vocabulary
self._vectorizer.fixed_vocabulary_ = fixed_vocabulary
self._vectorizer.idf_ = idf
self._vectorizer.idf_ = np.array(idf)
1 change: 1 addition & 0 deletions tests/tests_preprocessing/test_text_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def test_transformer(self):
transf = TextTransformer()
transf.fit(df, "col1")
df = transf.transform(df)

self.assertTrue(df.shape[0] == 5)
self.assertTrue("col1" not in df.columns)

Expand Down

0 comments on commit cc55741

Please sign in to comment.