ANN Analysis
ANN Analysis
Sequential model:
Dense
Tensorflow.keras.layers.Dense defines a dense (fully connected) layer of the
neural network
Activation Function
More:
https://www.datacamp.com/tutorial/introduction-to-activation-functions-in-
neural-networks
Dropout
Dropout(0.1): This line adds a dropout layer with a rate of 0.1. Dropout is a
regularization technique that helps prevent overfitting by randomly
deactivating a fraction of neurons during training.
The cost function and loss function refer to the same context (i.e. the training
process that uses backpropagation to minimize the error between the actual
and predicted outcome). We calculate the cost function as the average of all
loss function values whereas we calculate the loss function for each sample
output compared to its actual value.
The loss function is directly related to the predictions of the model you’ve
built. If your loss function value is low, your model will provide good results.
The loss function (or rather, the cost function) you use to evaluate the model
performance needs to be minimized to improve its performance.
1. Gradient Descent
3. Adagrad
4. Adadelta
5. RMSprop
6. Adam
More
https://medium.com/analytics-vidhya/this-blog-post-aims-at-explaining-the-
behavior-of-different-algorithms-for-optimizing-gradient-46159a97a8c1
xtrain and ytrain are the training data, where xtrain contains the resources
(inputs) and ytrain contains the corresponding labels (outputs). This data is
used to adjust model weights during training.
epochs is the number of times the model will go through the entire training
set. Each epoch consists of a cycle of going through the training data and
adjusting the model weights.
batch_size is the number of training examples used in a single iteration. The
training set is divided into smaller batches and adjustment of model weights
is performed after each batch.
validation_data = (xtest, ytest) specifies the validation data to be used during
training. This data is used to evaluate the model's performance on an
independent dataset during training. xtest are the test resources and ytest are
the corresponding labels.
Training Loss
The training loss is a metric used to assess how a deep learning model fits the
training data. That is to say, it assesses the error of the model on the training
set. Note that, the training set is a portion of a dataset used to initially train
the model. Computationally, the training loss is calculated by taking the sum
of errors for each example in the training set.
It is also important to note that the training loss is measured after each batch.
This is usually visualized by plotting a curve of the training loss.
Validation Loss