Rubbish in rubbish out
<p class="p1">Rubbish in rubbish out is the popular idiom with data analysis. The vocabulary needs to be of high quality for the classifier to sniff out sin well. The first problem is the use of a one word vocabulary. We speak in sentences and phrases - cake may be associated with gluttony, but the phrase 'more cake' has a stronger resonance. I decided to use a natural language package from Apache, opennlp to decompose the text into its parts of speech (adjective, noun etc). The terms most indicative of the text I decided to be the noun and verb phrases. I also chose to isolate the adjectives, as sins themselves are of descriptors as well as subjects and objects.</p><p class="p2"><br /></p><p class="p1">The claasifier in weka uses a StringToWord vector to store the instances of words in a document. TheĀ StringToWordĀ is a filter that can be applied to input data to transform it into a format appropriate for classification. The format involves creating a matrix of features, features are aspects of the data that can be used to predict the class. In our model here, have been using the appearance of words, so the filter would break down all the words in the training data, and compute the count of each one.Ā The filter uses a tokeniser to break the document into words, I replaced the tokeniser with a phrase tokeniser that uses opennlp to extract the most salient parts of speech, thus we are now tracking the counts of phrases as opposed to words, where we would be catching a lot of noise.</p><p class="p2"><br /></p><p class="p1"><br /></p><p class="p1"><br /></p><p class="p1">Code here.</p><p class="p2"><br /></p><p class="p1">I also changed the money seed vocab for the vocab generation to words describing money in a positive light, 'wealthy', 'affluent' to try and identify the love of money better. The phrase extractor is injected into the mapping phase to create a like for like classification.</p><p class="p2"><br /></p><p class="p1">The stream graph used earlier is nice looking, but has a habit of conflating results. The dominance of the reduction of lustiness overshadows the observed behaviour of envy which seemed to remain fairly constant. So I decided to show the sins in isolation, the JavaScript is hacky, but I wanted to focus more on the sin extraction code! All sat in githhb if you fancy a migraine..Ā </p>
Rubbish in rubbish out is the popular idiom with data analysis. The vocabulary needs to be of high quality for the classifier to sniff out sin well. The first problem is the use of a one word vocabulary. We speak in sentences and phrases - cake may be associated with gluttony, but the phrase 'more cake' has a stronger resonance. I decided to use a natural language package from Apache, opennlp to decompose the text into its parts of speech (adjective, noun etc). The terms most indicative of the text I decided to be the noun and verb phrases. I also chose to isolate the adjectives, as sins themselves are of descriptors as well as subjects and objects.
The classifier in Weka uses a StringToWord vector to store the instances of words in a document. TheĀ StringToWordĀ is a filter that can be applied to input data to transform it into a format appropriate for classification. The format involves creating a matrix of features, features are aspects of the data that can be used to predict the class. In our model here, have been using the appearance of words, so the filter would break down all the words in the training data, and compute the count of each one.Ā The filter uses a tokeniser to break the document into words, I replaced the tokeniser with a phrase tokeniser that uses opennlp to extract the most salient parts of speech, thus we are now tracking the counts of phrases as opposed to words, where we would be catching a lot of noise.
Code here.
I also changed the money seed vocab for the vocab generation to words describing money in a positive light, 'wealthy', 'affluent' to try and identify the love of money better. The phrase extractor is injected into the mapping phase to create a like for like classification.
The stream graph used earlier is nice looking, but has a habit of conflating results. The dominance of the reduction of lustiness overshadows the observed behaviour of envy which seemed to remain fairly constant. So I decided to show the sins in isolation, the JavaScript is hacky, but I wanted to focus more on the sin extraction code! All sat in githhb if you fancy a migraine..Ā
Latest results
*refresh with a long run on data in 5 hours!










