Closed aykutfirat closed 7 years ago
Extracting the 2388-th does not work for me. I always get 0 as value.
I used examples that are predicted as positive in the paper.
Example:
if __name__ == '__main__':
mdl = Model()
text = [
'too bad!',
'it was so cool, beautiful',
'the screenplay and the directing were horrendous',
'best books'
]
text_features = mdl.transform(text)
print('shape')
print(text_features.shape)
sentiment = text_features[:, 2388]
print('sentiment')
print(sentiment)
Result:
0.000 seconds to transform 4 examples
shape
(4, 4096)
sentiment
[ 0. 0. 0. 0.]
Apparently I get 0. for every value of the feature vector extracted, there must be an error somewhere else I guess, looking for it.
Referenced in #3 - it's something to do with how HTMLParser.HTMLParser().unescape(text) works. I ran into the same problem trying it with Python 2, but wasn't able to resolve it.
2388 is the unit visualized and the single experiment results are reported on in the paper