Zaktualizuj 'linearpred.py'

This commit is contained in:
Dominika Grajewska 2020-04-21 07:43:54 +00:00
parent ca7be0f60e
commit 026265d53d

View File

@ -22,7 +22,7 @@ for line2 in lines:
for t in terms2: for t in terms2:
if(t in vocabulary): if(t in vocabulary):
expected=expected+(words_count[t]/len(words_count)*(weights[word_to_index[t]])) expected=expected+(words_count[t]/len(words_count)*(weights[word_to_index[t]]))
if(expected>0.65): if(expected>0.5):
print(1) print(1)
else: else:
print(0) print(0)