Spam detection
Spam detection is an important use case to deal with. With the growing number of users, the number of spam comments/messages is also increasing. Hence, it is important to build a model or a rule engine which would be capable of identifying the fraudulent user, posting some random message.
The implementation of this algorithm would be slightly difficult because there is no direct mechanism to tag a post as spam. In this section, we will teach you to build a basic model based on certain parameters as well as users' inputs to identify a spam post. This will definitely help you to understand the concept. Any such algorithm implemented would require a constant update since the spammers too, would change their strategy.
Implementing a spam detection algorithm
The following is a simple implementation of a spam detection algorithm using logistic regression. Let's see in detail what the code does to predict the spam messages as comments in the Facebook page posts:
page<- getPage("beach4all...