From 9d8b8556b226de495446ad0ca54f1808954d6539 Mon Sep 17 00:00:00 2001 From: Yevheniia Tsapkova Date: Tue, 26 May 2020 11:52:02 +0000 Subject: [PATCH] train modified with more exact values --- train.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100755 => 100644 train.py diff --git a/train.py b/train.py old mode 100755 new mode 100644 index 70cbda5..7788c7a --- a/train.py +++ b/train.py @@ -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)