ICP 8 - AsharGit/Python-ICP GitHub Wiki

Welcome to the Python-ICP-8 wiki!

This ICP we learn to use Neural Networks

Video for this ICP: https://youtu.be/aGO_ZN1bhdY

The first task for this ICP is to add an extra dense layer to our neural network

In this task we have an input layer, a hidden layer and an output layer.

We add an additional hidden layer with 5 nodes and 'relu' activation

NeuralNet

Below we see the output with a single dense layer and with two dense layers.

Single layer accuracy: 0.66

Accuracy1

Two layer accuracy: 0.71

Accuracy2

In this run the result improved with the addition of a dense layer, however; my results would fluctuate so while another layer can improve accuracy, it is not necessarily always the case.

Task 2 for our ICP is to analyze the breast cancer dataset.

Similar to last problem, we map our categorical data to integer so we can analyze it.

Code

First we run our network without any changes to the data and get an accuracy score of 0.92

We can improve our score by normalizing our dataset which we do in our final task

The same code as above shows how we can transform our dataset using standard scaler

Code

Accuracy score improved to 0.96 after normalization.