## 3 Results and Discussion
### Case 2  
The particle swarm optimization algorithm (PSO) was used for the optimal external ANFIS input parameters search in the so called PSO-ANFIS procedure. Optimization was set to find the minimum testing RMSE based on the LOSO cross-validation procedure by altering the initial step size (ISS) and step size increase (SSI) via PSO. ANFIS input parameters such as number of MFs, type of MF and number of epochs were kept fixed (two Gaussian MFs, trained for 100 epochs with the back-propagation learning algorithm). The ANFIS structure was trained based on the back-propagation learning algorithm to determine the premise and consequent parameters. One hundred PSO particles were used in the optimum search. PSO was set to work for 100 iterations, with a set of restriction coefficients \(w=0.729\), \(C_{1}=1.496\) and \(C_{2}=1.496\). Each PSO particle's fitness function value was calculated with LOSO: in our case, this was 35-fold cross-validation. The convergence of the PSO algorithm is shown in Figure 8. The initial positions of the PSO particles, represented by ISS and SSI, were created with a random number generator at intervals of (0,10) and (1,10), respectively. Case 2, consisting of the ANFIS model and the PSO module, proved to achieve similar optimum values in multiple runs with different initial positions for the ISS and SSI. Additional external parameters, such as iteration number, number of MFs or step size decrease rate could be introduced in a similar manner to ISS and SSI. This section presents an analysis of the results of the experimental data and the ANFIS model output on the nitrogen cooling impact during the machining of Inconel 718. Table 3 and Figure 9 represent the predicted temperature differences of the ANFIS structures compared to the real experiment values. The first three columns in Table 3 present the experimental values (\(v\), \(d\) and \(x\)), the fourth column the experimental value (\(\Delta\)T) and the fifth column the temperature difference (\(\Delta\)T\({}_{\text{case1}}\)) of the testing set predicted in case 1 based on the LOSO cross-validation. The sixth column represents the temperature differences (\(\Delta\)T\({}_{\text{case2 best}}\)) of the testing set predicted in case 2. The optimized ANFIS structure in case 2 with \(ISS=1.6764\) and \(SSI=7.7766\) achieved the testing RMSE equal to 0.2620 and a training RMSE of 0.3372. The respective testing and training R\({}^{2}\) values were equal to 0.8585 and 0.8912. Figure 7: ANFIS model train (**a**) and test RMSE accuracies (**b**). Structures were trained with back-propagation for 100 epochs, two Gaussian MFs per input, different initial step sizes and different step size increase rates. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \(v\) [m/min] & \(d\) [mm] & \(x\) [mm] & \(\Delta T\) [K] & \(\Delta T_{case1}\) [K] & \(\Delta T_{case2 best}\) [K] \\ \hline \multirow{8}{*}{5} & \multirow{2}{*}{0.1} & 5 & 3.2517 & 2.2990 & 2.7937 \\ \cline{3-6}  & & 10 & 2.3180 & 2.6407 & 2.4037 \\ \cline{3-6}  & & 0 & 5.75  
The average difference between the experimentally measured temperature drop (\(\Delta T\)) and the temperature drop predicted by the ANFIS based on the LOSO testing set in case 1 (\(\left|\Delta T-\Delta T_{\text{case1}}\right|\)) was equal to 0.3450 \({}^{\circ}\)C, while the optimized ANFIS structure in case 2 achieved an average temperature difference between the experimentally measured temperature drop (\(\Delta T\)) and the temperature drop predicted by ANFIS based on the LOSO testing set (\(\left|\Delta T-\Delta T_{\text{case2 best}}\right|\)) equal to 0.2619 \({}^{\circ}\)C.  
Neural networks combined with fuzzy logic in the ANFIS system offer an insight into their decisions. Figure 10 presents the Fuzzy interference system (FIS) properties of the discussed ANFIS. Output (\(\Delta T\) represented by a first order Sugeno model) was calculated based on eight IF-THEN rules that represent all combinations of input MFs (\(=2^{3}\)).