## 3 Neural Network Based DPD Architecture
### Features of the NN Model
#### 3.1.1 Loss Function  
Prior to optimizing, it is essential that, the error is estimated for the current state of the model. For this, selecting an error function, normally known as loss function is necessary as it helps calculate the loss of the model. After this, the weights of the model are updated which minimizes this loss function for further evaluations. Loss functions broadly classify into:  
1. Regression Loss.
2. Classification Loss.  
Figure 5: Block diagram of RoF system utilizing RoF NN model and NN based DPD system. The RoF NN model \(\hat{I}\) is obtained upon transmission of I/P and O/P through the generic RoF link. Once achieved, we train \(I^{-1}\) by backpropagating error through \(\hat{I}\). Then, linearization is performed by connecting this DPD-RoF model to generic RoF link. Predistortion is held in a digital baseband eliminating DACs and ADCs.  
Regression loss functions are divided into following:  
Mean Squared Error (MSE)  
MSE calculates the average of the squared differences between actual and predicted value. Outcomes are always positive values irrespective of the sign of the actual and predicted values. The minimum value it can result in is 0.0. Note that, larger differences cause more error due to squaring of the value, penalizing the model for them.  
Mean Squared Logarithmic Error (MSLE)  
As the name suggests, here, the natural logarithm of each of the predicted values is calculated and then the MSE is calculated. MSLE relaxes the punishing effect of large differences in large, predicted values.  
Mean Absolute Error (MAE)  
The MAE is more powerful. It calculates the average of the absolute difference between the predicted and actual values.  
Classification Loss Functions:  
Classification loss functions are divided into following:  
Binary Cross-Entropy  
This function is used when our target values belong to the set {0, 1}. A score which summarizes the average difference between the predicted and actual probability distributions is calculated and is then minimized. The least score that can be achieved by this function is 0.  
Hinge Loss  
This function is used when our target values belong to the set {-1, 1}. This function basically promotes correctness of the sign of values and will allot more error for differences in signs between predicted values and actual values.  
Squared Hinge Loss  
This is a function obtained by modifications in the hinge loss function. It merely calculates the square of the hinge loss score. This causes the error function to smoothen making it easy to work with numerically. It smoothens the surface of the error function and makes it easy to work with numerically. As stated in the case of hinge loss, values must belong to the set {-1, 1}.  
Multi-Class Cross-Entropy  
Hinge loss is considered for binary classification similarly, multi-class cross entropy loss is considered for multi-class classification. Every class is given a distinct integer value. A score for all classes is summarized by calculating the average difference between the predicted and actual probability distributions. The minimum score that can be obtained is 0.