This script is a general algorithm to build a binary classification neural network in R without using any package. It only uses the base package and vectorises pretty much every calculation.
It uses tanh
as the activation for hidden layers and sigmoid
function as the activation function for the output layer.
It uses only 1 hidden layer with a default of 4 units.
This is uses the same steps that Andrew Ng's Deep Learning AI module 1 uses in python, however, here it has been translated into R