Neural Networks


Neural Networks

Machine Learning Model - Neural Networks

A neural net consists of many different layers of neurons, with each layer receiving inputs from previous layers, and passing outputs to further layers.
The way each layer output becomes the input for the next layer depends on the weight given to that specific link, which depends on the cost function, and the optimizer.
The neural net iterates for a predetermined number of iterations, called epochs. After each epoch, the cost function is analyzed to see where the model could be improved.
The optimizing function then alters the internal mechanics of the network, such as the weights, and the biases, based on the information provided by the cost function, until the cost function is minimized.

When categorizing the movie data using ratingInter, which had 8 options, the model had the following accuracy scores:

Accuracy with one hidden layer:
937/937 - 0s - loss: 1.1234 - acc: 0.5496
Normal Neural Network - Loss: 1.1233897466160827, Accuracy: 0.5496264696121216

Accuracy with two hidden layers:
937/937 - 0s - loss: 1.3102 - acc: 0.5358
Normal Neural Network - Loss: 1.310229677909721, Accuracy: 0.5357524156570435

For Neural Network we applied ratingInteger in place of performance.
Both ratingInterger and performance have a high relationship and we can’t use both in the same model.
We applied ratingInteger in KNN so that we can compare with Neural Network and the latter had a higher score.
We also found out that two hidden layers in Neural Network had a lower score than one hidden layer, therefore it’s advisable to apply one hidden layer.
However, the score for two hidden layer seem to be improving the more times we run the model.
Initially it had accuracy of 0.51 but after running the model several times accuracy increased to 0.53.