Breast-Cancer-Neural-Networks icon indicating copy to clipboard operation
Breast-Cancer-Neural-Networks copied to clipboard

Classifying malignant and benign tumors using Neural Networks ๐Ÿ”ฌ

Breast Cancer Classifier (Shallow Network) ๐Ÿ”ฌ

This code helps you classify malignant and benign tumors using Neural Networks.

Code Requirements ๐Ÿฆ„

The example code is in Matlab (R2016 or higher will work).

Description ๐Ÿงช

An ANN is based on a collection of connected units or nodes called artificial neurons (analogous to biological neurons in an animal brain). Each connection (synapse) between neurons can transmit a signal from one to another. The receiving (postsynaptic) neuron can process the signal(s) and then signal downstream neurons connected to it. In common ANN implementations, the synapse signal is a real number, and the output of each neuron is calculated by a non-linear function of the sum of its input. Neurons and synapses may also have a weight that varies as learning proceeds, which can increase or decrease the strength of the signal that it sends downstream. Further, they may have a threshold such that only if the aggregate signal is below (or above) that level is the downstream signal sent.

For more information, see

Notes ๐Ÿ—’๏ธ

  1. Dataset- UCI-ML
  2. I have used 30 features to classify
  3. Instead of 0=benign and 1=malignant, I have used 1=benign and 2=malignant

Results ๐Ÿ“Š

Execution ๐Ÿ‰

To run the code, type run cancer.m

run cancer.m

Python Implementation ๐Ÿ‘จโ€๐Ÿ”ฌ

  • Used a shallow neural net with one hidden layer and 20 units.
  • I have used a linear learning rate decay for decreasing cost without overshooting the minima.
  1. Dataset- UCI-ML
  2. I have used 30 features to classify
  3. Instead of 0=benign and 1=malignant, I have used 1=benign and 2=malignant

Results ๐Ÿ“Š

Execution ๐Ÿ‰

To run the code, type python B_Cancer_nn.py

python B_Cancer_nn.py