# A Classification Model Based on Interval Rule Inference Network with Interpretability
## 4 Interval Rule Inference Network
### Parameter Determination
#### 4.3.2 Parameter Training  
To obtain a reasonable IBRB and build a high-performance classification system, IRIN updates parameters such as \(\beta_{j,k}^{-},\beta_{j,k}^{+},\theta_{k},\bar{\delta}_{i}\), and the gradient descent algorithm is adopted. 1. Calculate the discrepancy: A given input \(i\)th sample is denoted as \(x_{i}=\{x_{1,i},\ldots,x_{t,i},\ldots,x_{T,i};y_{i}\}\), and the conclusion obtain by inference from the IBRB is denoted as \(\hat{y}_{i}=[\hat{y}_{i}^{-},\hat{y}_{i}^{+}]\), where \(\hat{y}_{i}^{-}=\{\hat{y}_{1}^{(i)^{-}},\ldots,\hat{y}_{I_{D}}^{(i)^{-}}\},\hat {y}_{i}^{+}=\{\hat{y}_{1}^{(i)^{+}},\ldots,\hat{y}_{I_{D}}^{(i)^{+}}\}\), \(x_{i}\) is the \(i\)th sample and \[[\{(y_{1}^{(i)^{-}},\ldots,y_{j_{1}}^{(i)^{-}})\},\{y_{1}^{(i)^{+}},\ldots,y_{j_{D}}^ {(i)^{+}}\}]\]. The discrepancy between the \(\hat{y}_{i}\) and \(y_{i}\) is calculated according to the following loss function. \[E_{i}=\frac{1}{J_{D}}\sum_{j=1}^{J_{D}}\frac{{(\hat{y}_{j}^{-}-{y_{j}}^{-})}^{2}+ {(\hat{y}_{j}^{+}-{y_{j}}^{+})}^{2}}{2} \tag{38}\]
2. Update of the belief degrees of consequents: The belief degrees of consequents can be updated as \[{\beta_{j,k}}^{-}={\beta_{j,k}}^{-}+\Delta{\beta_{j,k}}^{-}(j=1,\ldots,J_{D},k =1,\ldots,L)\] (39) \[{\beta_{j,k}}^{+}={\beta_{j,k}}^{+}+\Delta{\beta_{j,k}}^{+}(j=1,\ldots,J_{D}, k=1,\ldots,L)\] (40) The belief degrees of consequents biases can be updated as \[\Delta{\beta_{j,k}}^{-}=-\eta\frac{\partial E_{i}}{\partial y_{i}}\] (41) \[{\Delta{\beta_{j,k}}}^{+}=-\eta\frac{\partial E_{i}}{\partial y_{i}}^{+}\] (42) where \(\eta\) is the learning rate, and \(\frac{\partial E_{i}^{-}}{\partial y_{i}^{-}}\frac{\partial E_{i}^{+}}{ \partial y_{i}^{+}}\) are the gradients. The partial derivative \(\frac{\partial E_{i}^{-}}{\partial y_{i}^{-}}\), \(\frac{\partial E_{i}^{+}}{\partial y_{i}^{+}}\) is calculated as follows: \[ \begin{array}{c}\frac{\partial E_{i}}{\partial\beta_{j,k}}=\sum\limits_{j=1 }^{I_{D}}\frac{\partial E_{i}}{\partial y_{j}}\cdot\frac{\partial y_{j}^{-}}{ \partial\beta_{j,k}^{-}}\\ \frac{\partial E_{i}}{\partial\beta_{j,k}^{-}}=\sum\limits_{j=1}^{I_{D}}\frac{ \partial E_{i}}{\partial y_{j}^{-}}\cdot\frac{\partial y_{j}^{+}}{\partial \beta_{j,k}^{-}}\end{array} \] (43) \[ \begin{array}{c}\frac{\partial E_{i}}{\partial y_{j}^{-}}=\frac{1}{J_{D}}( \hat{y}_{j}^{-}-y_{j}^{-})\\ \frac{\partial E_{i}}{\partial y_{j}^{+}}=\frac{1}{J_{D}}(\hat{y}_{i}^{+}-y_{j} )\end{array} \] (44) \[ \begin{array}{c}\frac{\partial y_{i}^{-}}{\partial\beta_{j,k}^{-}}=\frac{ {(\mu_{j}^{+}f_{j}^{-}+\mu^{-}f_{j}^{-})}^{-}g^{-+}(1-g^{-})\mu_{k}^{-}f_{j}^{ -}}{g^{-}}\\ \frac{\partial y_{i}^{+}}{\partial\beta_{j,k}^{-}}=\frac{{(\mu_{k}^{+}f_{j}^{- }+\mu^{+}f_{j}^{+})}^{-}g^{+}(1-g^{+})\mu_{k}^{+}f_{j}^{+}}{g^{+}}\end{array} \] (45) where \[f_{j}=\left[\prod_{k=1}^{L}{(w_{k}\times\beta_{j\pm}^{-}+1-w_{k})}-\prod_{k=1 }^{L}{1-w_{k}\prod_{k=1}^{L}{(w_{k}\times\beta_{j\pm}^{+}+1-w_{k})}-\prod_{k=1 }^{L}{1-w_{k}}}\right]\] (46) \[g=\left[1-\mu^{-}\prod_{k=1}^{L}{(1-w_{k})},1-\mu^{+}\prod_{k=1}^{L}{(1-w_{k} )}\right]\] (47) \[s_{k}=\left[\prod_{l=1,l\
eq k}^{L}{w_{l}\times\beta_{j\pm}^{-}+1-w_{l}},\prod _{l=1,l\
eq k}^{L}{w_{l}\times\beta_{j\pm}^{+}+1-w_{l}}\right]\] (48) \[h_{k}=\prod_{l=1,l\
eq k}^{L}{(1-w_{l})}\] (49)  
* Repeat Step 5 until the difference is less than the expected error \(\varepsilon_{\min}\) or the training data are greater than the preset maximum training time \(\lambda_{\max}\). The IRIN algorithm is shown in Algorithm 1. ```
Input: A training data set \(\{(A_{i},y_{i})\}\), where \(A_{i}\) is the attribute and \(y_{i}\) is the category; Expected error \(\varepsilon_{\min}\).Maximum training iterations \(\lambda_{\max}\). Output: IRBR.