laptop commit linear regression

This commit is contained in:
Bartosz Ogonowski 2020-06-08 19:21:35 +02:00
parent 53cd39d670
commit 978a98936f

View File

@ -47,10 +47,10 @@ def prediction(input,output):
y_hat += weights[word[token]] * line_vocabulary[token] y_hat += weights[word[token]] * line_vocabulary[token]
if y_hat > 0.5: if y_hat > 0.5:
output_f.write("1\n") output_f.write("1\n")
print(y_hat) #print(y_hat)
else: else:
output_f.write("0\n") output_f.write("0\n")
print(y_hat) #print(y_hat)
output_f.close() output_f.close()