From 9181425dce43cdd9ef0b321b0e69911338504012 Mon Sep 17 00:00:00 2001 From: Griffiths Lott Date: Sun, 6 Nov 2022 15:55:01 -0500 Subject: [PATCH] Fixed some formatting --- BasicCreditDec.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BasicCreditDec.py b/BasicCreditDec.py index de84bcb..092c9f6 100644 --- a/BasicCreditDec.py +++ b/BasicCreditDec.py @@ -71,12 +71,12 @@ def generate_sample_data(data_size: int, save_data: bool = False, save_name: str def predict_with_model(model): yib = float(input("How many years in business?:\t")) if yib == "": return False - sbss = int(input("What is your SBSS?:\t")) + sbss = int(input("What is your SBSS?:\t\t")) if sbss == "": return False - model_pred = model.predict([[yib,sbss]]) == 1 + model_pred = model.predict([[yib,sbss]])[0] == 1 actual = eval_approval(sbss, yib) == 1 - print(f"The model predicts:\t{model_pred}\nThe rules say:\t{actual}.") - print(f"The model was {'correct' if model_pred == actual else 'incorrect'}\n") + print(f"The model predicts:\t\t{model_pred}\nThe rules say:\t\t\t{actual}.") + print(f"The model was {'correct' if model_pred == actual else 'incorrect'}.\n") return True