Now, we will move on to building and training the neural network. To do so, let's import some specific layers from Keras. Then, we will define a create_model() function to build the Keras model, and define the model type as Sequential. After this, we will define an input layer, a hidden layer and an output layer, compile the model, and finally print the model:
As we see in the preceding screenshot, we have our model summary. We have 112 parameters for the first layer, 36 for the second, and 25 for the third layer. We have a total of 173 parameters. These are all trainable data for our neural network, which is what we will be using to classify the patients as either having coronary artery disease or not having coronary artery disease.
We will now fit the model to the training data using the model.fit() function:
From the preceding screenshot...