# Feature normalization in Text Classification

I'm doing Text Classification in R, and my initial features are just word frequency inside a Document. For example:

docID, label, word1, word2, word3, ...wordN
doc123, 1, 10, 2, 5, ..., 12
doc456, 1, 8, 1, 3, ..., 10
doc789, 0, 2, 10, 4, ..., 4


How should i approach scaling and normalization in this case? For example, if i normalize the frequency across rows, should i drop the 'wordN' feature? (since the sum at each row is 1).

I'm getting better results using this row normalization idea, but the Logistic regression output is complaining about the last column.

Thanks for any insights on this!

• Have you considered normalizing columns instead of rows? – mcastillon Feb 19 '15 at 7:10
• I'm scaling the columns. – Fernando Feb 19 '15 at 19:14