Sequential Artificial Neural Network Model code.
Feel free to use the dataset I used i.e. sonar.csv
. Be sure to keep the notebook and csv file both in the same directory.
Cheers!
Before executing the python notebook be sure to install pandas, matplotlib and numpy. For installing first check if you have python installed. Head over to python.org to install python. When installed run command prompt. Execute the command pip install keras
, pip install matplotlib
and then pip install numpy
. These codes will successfully install keras, matplotlib and numpy modules in your system.
The python notebook has the procedure for building an Artificial Neural Network Model (ANN).
Code blocks are commented to provide a better understanding.
- the important modules are imported
- encoding is featured
- the dataset is splitted into training and testing sets
- scaling is featured
- Keras Libraries and packages are imported
- ANN is initialized
- input layer, dropout layer, hidden layer ad output layer are created
- ANN model is compiled
- ANN is fit to the training set
- Predictions are done on test set