# Research on Device Modeling Technique Based on MLP Neural Network for Model Parameter Extraction
## 3 Training and Testing the MLP Neural Network
The preference model is the model with the lowest AIC  
Figure 3: Transfer curves with different activation functions: (**a**) fitting curves of log-sigmoid; (**b**) fitting curves of tanh-sigmoid. Easy to see: In the small voltage range, both curves fit quite well. However, when using the tanh-sigmoid function, there are obvious errors in the higher-value range. value [30]. Under the assumption that the model errors are normally distributed, the value of _AIC_ can be obtained by the following equation:  
\[AIC\ =\ 2k+nln(RSS/n) \tag{8}\]  
where \(k\) is the number of parameters for the model to be estimated, \(n\) is the sample size, and \(RSS\) is the residual sum of squares from the estimated model. The equation of \(RSS\) is as follows:  
\[RSS\ =\ \sum\limits_{i\ =\ 1}^{N}\left(I_{nn}^{i}-I_{sim}^{i}\right)^{2} \tag{9}\]  
_AICc_ is a correction of the _AIC_, which performs better when the sample size is smaller [31]. The equation of _AICc_ is as follows:  
\[AICc\ =\ AIC+\frac{2k(k+1)}{n-k-1} \tag{10}\]  
The _BIC_ penalizes parameters more heavily than the _AIC_. For any two estimated models, the model with the lower value of _BIC_ is preferred [32]. The equation of _BIC_ is as follows:  
\[BIC\ =\ k\times ln(n)+nln(RSS/n) \tag{11}\]  
The value of RR is obtained based on the relative error. Since there is a large magnitude difference in the currents of different regions, using the relative error can show the fit of the NN model more intuitively. The value of RR can reflect the fitting quality of the IV curves, so when the values of RR of the different NN models differ widely, we prefer the NN model that generates the smallest RR value. When the RR values of different NN models are close to each other, we select the optimal model by referring to the _AIC_, _AICc_, and _BIC_ values. The _AIC_, _AICc_, and _BIC_ values were calculated for each NN model, and the results are shown in \[I_{ds}\ =\ \mu_{0}\times\frac{W_{eff}}{L_{eff}}\times\sqrt{\frac{q\varepsilon_{ si}N_{ch}}{2\phi_{s}}}\times v_{t}^{2}\times\left(1-\exp\!\left(-\frac{V_{ds}}{v_{ t}}\right)\right)\times\exp\left(\frac{V_{gs}-V_{th}-V_{off}}{nv_{t}}\right) \tag{4}\]0 RE-10% in Table 2 represents the proportion of data with a relative error (RE) greater than 10% in the fitting data of the NN model. NN1, NN2, and NN3 are the optimal models corresponding to the _AIC_, _AICc_, and _BIC_, respectively. NN1, NN4, and NN5 are NN models with the smallest RR values. Although NN2 and NN3 achieved optimality under the _AICc_ and _BIC_ criteria, respectively, their RR values were significantly higher than the NN1 model. The equations for _AIC_ and _BIC_ can be divided into two items: the first one is the complexity penalty of the model (\(2k\) for _AIC_, \(k\times ln(n)\) for _BIC_), and the second one is the accuracy penalty of the model (\(n\times ln(RSS/n)\)). The first item is mainly used to avoid the overfitting of the model, and the second item considers the fitting of the model itself. The first item is a penalty to the second item, and the model with the fewest parameters is selected under the condition of satisfying the model validity and reliability, so the complexity must be considered after satisfying the high accuracy first. The difference in the accuracy penalty between the different NN models refers to the difference in RSS. The RSS value is 3.7910 \(\times\) 10\({}^{-5}\), 5.2934 \(\times\) 10\({}^{-5}\), and 7.5426 \(\times\) 10\({}^{-5}\) for the NN1, NN2, and NN3 models, respectively. There is a significant difference in the accuracy of the three NN models, and the accura