Exercise

A binary classification model

Now that you know what the Banknote Authentication dataset looks like, we'll build a simple model to distinguish between real and fake bills.

You will perform binary classification by using a single neuron as an output. The input layer will have 4 neurons since we have 4 features in our dataset. The model's output will be a value constrained between 0 and 1.

We will interpret this output number as the probability of our input variables coming from a fake dollar bill, with 1 meaning we are certain it's a fake bill.

Instructions

100 XP
  • Import the Sequential model and Dense layer from tensorflow.keras.
  • Create a sequential model.
  • Add a 4 neuron input layer with the input_shape parameter and a 1 neuron output layer with sigmoid activation.
  • Compile your model using sgd as an optimizer.