train modified with more exact values
This commit is contained in:
parent
ba0ba3b068
commit
9d8b8556b2
4
train.py
Executable file → Normal file
4
train.py
Executable file → Normal file
@ -45,8 +45,8 @@ def predict_data(data):
|
||||
prepared = prepare_data(data)
|
||||
vectorized = vectorize.transform(data["text"])
|
||||
predicted = bayes.predict_proba(vectorized)[:,1]
|
||||
predicted[predicted < 0.05] = 0.05
|
||||
predicted[predicted > 0.95] = 0.95
|
||||
predicted[predicted < 0.05] = 0.00000005
|
||||
predicted[predicted > 0.95] = 0.99999995
|
||||
return predicted
|
||||
|
||||
dev_predicted = predict_data(dev_set)
|
||||
|
Loading…
Reference in New Issue
Block a user