Hello Community,
I am trying to build a NN to classify mushrooms as edible or poisonous from scratch using a mushroom dataset from Kaggle. (just for practicing)
The dataset (8124 rows × 117 columns)
The neural network 4_layers ([8,4,3,1])
All have RELU as an activation function except for the last node which has Sigmoid as an activation function
After running the NN (without regularization), it gave:
- train set error: 99.8%
- dev set error: 99.6%
I suspected overfitting, so I decided to implement L2 regularization.
- I edited the cost function the same as done in the Regularization Assignment.
- I edited the update_parameter function as follows:
weight_decay = 1- ((alphalearning_rate)//m)
for l in range(L):
parameters[“W” + str(l+1)] =weight_decay(parameters[“W” + str(l+1)])- (learning_rate * grads[“dW” + str(l+1)])
My question is: Is my implementation correct?? Should I edit dWs??