diff options
Diffstat (limited to 'src/windows/predict.py')
| -rw-r--r-- | src/windows/predict.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/windows/predict.py b/src/windows/predict.py index 3bc2591..374ee09 100644 --- a/src/windows/predict.py +++ b/src/windows/predict.py @@ -1,3 +1,5 @@ +import random +import math import customtkinter import tkinter import pandas as pd @@ -111,6 +113,8 @@ class Predict(customtkinter.CTkToplevel): ups = int(ups_model.predict(postX)[0]) num_comments = int(num_comments_model.predict(postX)[0]) - tkinter.messagebox.showinfo('Predictions', 'Predicted ups: {}\nPredicted num_comments: {}'.format(ups, num_comments)) - + # random bias from the prediction + ups = int(ups // math.log(ups + 1)) + num_comments = int(num_comments // math.log(num_comments + 1)) + tkinter.messagebox.showinfo('Predictions', 'Predicted ups: {}\nPredicted num_comments: {}'.format(ups, num_comments)) |
