Keras 2.x Projects
上QQ阅读APP看书,第一时间看更新

Heart Disease Classification with Neural Networks

Classification algorithms help us to automatically learn how to make accurate predictions based on our observations. Starting from a set of predefined class labels, the classifier gives each piece of data a class label in accordance with the training model. Classification is somewhat similar to regression, which we studied in Chapter 2, Modeling Real Estate Using Regression Analysis. As well as regression, classification uses known labels of a training dataset to predict the response of the new test dataset. The main difference between regression and classification is that regression is used to predict continuous values, whereas classification works with categorical data.

For example, regression can be used to predict the future price of housing based on prices over the last 10 years. However, we should use the classification method to predict whether the price of housing will grow or decrease in the near future. In the first case, we use continuous data for the prediction and choose a continuous data response (the exact price of housing, as we did in Chapter 2Modeling Real Estate Using Regression Analysis). In the second case, starting with continuous values (housing prices over the last 10 years), we begin by classifying the various phases where a growth or diminution of price has been recorded, and then we use that classification to predict a relative trend in the near future. In this chapter, you'll learn how to classify heart disease using Keras classification algorithms.

We will cover the following topics in this chapter:

  • Basics of classification problems
  • Different types of classification
  • Pattern recognition using a Keras neural network
  • Exploratory analysis
  • Data visualization
  • Keras binary classifier

By the end of this chapter, we will have learned about the basic concepts of the classification problem. We will explore different types of classification techniques. Then, we will understand the basic concepts of classification methods, learn to implement them in the Keras environment, and also learn how to import and organize data for a neural network classification analysis. Finally, we will learn how to implement a Keras classification model using a real-life example.