Before proceeding, we need to change up the dataset being used. While the 20 Newsgroups dataset has worked well up until this point for all the concepts on text analysis, it becomes less usable as we try to really tune our model to predict latent features. All the additional changes that we will do next actually have minimal impact on the model when using the 20 Newsgroups, so we will switch to the spam versus ham dataset, which is similar. However, instead of involving emails to a newsgroup, these are SMS text messages. In addition, instead of the target variable being a given newsgroup, the target is either that the message is spam or a legitimate text message.Â
Contrastive divergence is the argument that allows us to leverage what we learned about Gibbs sampling. The value that we pass to this argument in the model will...