Breast-Cancer-Neural-Networks
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.
![](https://github.com/akshaybahadur21/Breast-Cancer-Neural-Networks/blob/master/neural.png)
For more information, see
Notes ๐๏ธ
- Dataset- UCI-ML
- I have used 30 features to classify
- Instead of 0=benign and 1=malignant, I have used 1=benign and 2=malignant
Results ๐
![](https://github.com/akshaybahadur21/Breast-Cancer-Neural-Networks/blob/master/cancer_neural.gif)
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.
- Dataset- UCI-ML
- I have used 30 features to classify
- Instead of 0=benign and 1=malignant, I have used 1=benign and 2=malignant
Results ๐
![](https://github.com/akshaybahadur21/Breast-Cancer-Neural-Networks/blob/master/bc_nn.gif)
Execution ๐
To run the code, type python B_Cancer_nn.py
python B_Cancer_nn.py