Пример #1
0
def main():
    user = Patient.from_input()
    report_path = input('Report Path: ')

    with open(report_path) as file:
        report = json.load(file)

    vcr = VertebralColumnReport(user, report)
    data = pd.DataFrame(vcr.todict(), index=[0])

    predicted, predicted_proba = knn(data)

    probability = {'DH' : predicted_proba[0][0]*100, 'NO' : predicted_proba[0][1]*100, 'SL' : predicted_proba[0][2]*100}

    printdetails(user, predicted[0], probability)