Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ded2276

Browse files
nk412amueller
authored andcommitted
Fixed typos in tf-idf term weighting section (#9547)
1 parent f9332d5 commit ded2276

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/modules/feature_extraction.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,13 +490,13 @@ log \frac{n_d}{\text{df}(d, t)} + 1 = log(1)+1 = 1`
490490
Now, if we repeat this computation for the remaining 2 terms in the document,
491491
we get
492492

493-
:math:`\text{tf-idf}_{\text{term2}} = 0 \times log(6/1)+1 = 0`
493+
:math:`\text{tf-idf}_{\text{term2}} = 0 \times (log(6/1)+1) = 0`
494494

495-
:math:`\text{tf-idf}_{\text{term3}} = 1 \times log(6/2)+1 \approx 2.0986`
495+
:math:`\text{tf-idf}_{\text{term3}} = 1 \times (log(6/2)+1) \approx 2.0986`
496496

497497
and the vector of raw tf-idfs:
498498

499-
:math:`\text{tf-idf}_raw = [3, 0, 2.0986].`
499+
:math:`\text{tf-idf}_{\text{raw}} = [3, 0, 2.0986].`
500500

501501

502502
Then, applying the Euclidean (L2) norm, we obtain the following tf-idfs

0 commit comments

Comments
 (0)