Research Article

[Retracted] Implementation of a Heart Disease Risk Prediction Model Using Machine Learning

Pseudocode 3

Random forest.
import RandomForestClassifier
n_estimators=50.
Fit the model (X_train, y_train)
Predict model.predict(X_test)
Get model Score
Rate people =0
Check if len(people) >0:
Rate people = len(people)/len(output)
Get the prediction of heart disease
import confusion_matrix
Compute confusion_matrix (y_pred, y_test)
Print Accuracy