Spaces:
Running
Running
File size: 698 Bytes
32965bb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import numpy as np
import pandas as pd
import joblib # for loading the saved model
from sklearn.tree import DecisionTreeClassifier #using sklearn decisiontreeclassifier
#from concrete.ml.sklearn.xgb import DecisionTreeClassifier
# Load the saved model
dt = joblib.load('heart_disease_dt_model.pkl')
#fhe_circuit =
# Make prediction on the first row of data
#prediction = dt.predict(sample_data, fhe="execute")
prediction = dt.predict(sample_data) # clair
# Display the prediction result
print(prediction)
if prediction == 1:
print("Prediction: The patient is likely to have heart disease.")
else:
print("Prediction: The patient is unlikely to have heart disease.")
|