I'm trying to choose an algorithm for filtering spam. I found two options:
Create word dictionary for spam and not spam data. Calculate average TF-IDF for each word and use cosine similarity for filtering.
Or use word dictionary for training logistic regression model.
Could you suggest what fit the best for my goal. Maybe I should use some another algorithm.