text_html_output_1.png
from sklearn import metrics

from sklearn.ensemble import RandomForestClassifier

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

data = pd.read_csv('/kaggle/input/heart-disease-uci/heart.csv')

from sklearn import metrics
from sklearn.ensemble import RandomForestClassifier
tree = RandomForestClassifier()
tree.fit(xtrain, ytrain)
ypred = tree.predict(xtest)

ypred = tree.predict(xtest)
pd.DataFrame({'predicted': ypred, 'actual': ytest})