text_plain_output_1.png
from sklearn.model_selection import cross_val_score

from sklearn.tree import DecisionTreeClassifier

import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

df = pd.read_csv('../input/heart.csv')

df.shape

df.target.value_counts()

dataset = pd.get_dummies(df, columns=['sex', 'cp', 'fbs', 'restecg', 'exang', 'slope', 'ca', 'thal'])

X = dataset.drop('target', axis=1)
y = df['target']

cross_val_score(DecisionTreeClassifier(), X, y)