laptop commit linear regression
This commit is contained in:
parent
53cd39d670
commit
978a98936f
@ -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()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user