Heart failure, a complicated clinical syndrome, occurs when the heart cannot pump enough oxygenated blood to satisfy the body’s metabolic needs. It is a major public health problem and is associated with significant morbidity and mortality. Care workers intentionally mine and save patient medical information to generate potential for enhanced treatment planning as healthcare and creative diagnostics become much more collaborative. To predict strokes, this paper does a comprehensive evaluation of the many variables in electronic heart data. The most crucial variables for stroke prediction are identified using a principal component analysis. We have considered a set of 12 different attribute which are a common symptom of various heart conditions. The features are employed to predict cardiovascular disease, each attributes contains 918 data set which are taken from Kaggle. The data set are trained on 70% and tested on 30% of Kaggle heart dataset. We apply the test and training data on different machine learning algorithm, i.e., K Neighbors Classifier, Random Forest Classifier, and on deep neural network and achieve the results. On comparing the accuracy result of all three methods, i.e., K Neighbors Classifier accuracy result 0.877, Random Forest Classifier accuracy result 0.8590, and deep neural network accuracy result 0.89. In our investigations, we identify that deep neural networks actually superior to machine learning algorithms.