machine learning - SVM How to calculate tf-df of test documents in document classification? -
in svm, using tf-idf on documents feature extraction. these tf-idf calculated on whole of training documents.
now when test-document want classify, how generate vector ?
i used stemming before calculating tf-idf. can perform on test-document too. have count_of_words train-documents.
should increment count of words in train-document count_of_words calculating tf-idf of test-document or should use directly ?
calculate them same way during training but: use idf based on training documents , tf test documents. if have many new documents coming in, update training data time time , retrain model.
Comments
Post a Comment