0
$\begingroup$

Im am following this excellent tutorial to get a better grasp on the concept of tv-idf: http://blog.christianperone.com/2011/10/machine-learning-text-feature-extraction-tf-idf-part-ii/

Everything is clear till the final part where this data has to be normalized;

Mtf-idf = [(0,0), (0.41,0.81), (0.41, 0.41), (0,0)]

This should lead to:

Mtf-idf = Mtf-idf/Mtfidf||2 = [(0,0), (0,71, 0.89), (0.71, 0.45), (0,0)]

Could anybody explain to me in plain English what is happening here?

$\endgroup$
1
  • 1
    $\begingroup$ What do you mean by this should lead to? are you asking how to perform the normalization? or why do you get different results? what is the question? $\endgroup$
    – yoav_aaa
    Jan 17, 2017 at 12:02

1 Answer 1

0
$\begingroup$

It normalizing row as it said in text , it means sum of squares of rows must be 1 , so :

(0)^2 + (-0.41)^2 + (-0.41)^2 + (0)^2 = 0.34

to normalize the sum these numbers must be 1 so we calculate sqrt(1/0.34) = 1.71 then we multiple this coefficient to all rows ->

0 , -0.41*1.71 = -0.70, -0.41*1.71 = -0.70, 0

for second row -> sqrt(1/0.84)=1.09

0, 1.09*0.81 = -0.88, -0.41*1.09 = -0.45, 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.