# Incorporating Grey Total Influence into Tolerance Rough Sets for Classification Problems
## 3 Grey-Total-Influence-Based Tolerance Rough Sets
### Determining Grey Total Influence
#### 3.3.2 Generating a Grey Direct Influence Matrix for Pattern Classification  
For a multiclass problem, to verify the performance of a classifier, it is necessary to partition the collected patterns into training (Category 1) and testing (Category 2) data. That is, each pattern (e.g., \(\mathbf{x}_{i}\), \(\mathbf{x}_{j}\)) can be categorized into either Category 1 or 2. As a result, four matrix segments, \(\mathbf{Z}_{11}\), \(\mathbf{Z}_{12}\), \(\mathbf{Z}_{21}\)and \(\mathbf{Z}_{22}\) make up a partitioned matrix \(\mathbf{Z}\), where each matrix segment represents a relationship between categories in a classification system:  
\[\mathbf{Z}=\left[\begin{array}{ccccc}Z_{11}&Z_{12}\\ Z_{21}&Z_{22}\end{array}\right] \tag{23}\] \[=\left[\begin{array}{ccccccccc}z(x_{11},x_{11})&z(x_{11},x_{12})& \cdots&z(x_{11},x_{1m_{1}})&z(x_{11},x_{21})&z(x_{11},x_{22})&\cdots&z(x_{11},x _{1m_{2}})\\ z(x_{12},x_{11})&z(x_{12},x_{12})&\cdots&z(x_{12},x_{1m_{1}})&z(x_{12},x_{21})&z (x_{12},x_{22})&\cdots&z(x_{12},x_{1m_{2}})\\ \vdots&\vdots&\ddots&\vdots&\vdots&\vdots&\ddots&\vdots\\ z(x_{1m_{1}},x_{11})&z(x_{1m_{1}},x_{12})&\cdots&z(x_{1m_{1}},x_{1m_{1}})&z(x_ {1m_{1}},x_{21})&z(x_{1m_{1}},x_{22})&\cdots&z(x_{1m_{1}},x_{1m_{2}})\\ z(x_{21},x_{11})&z(x_{21},x_{12})&\cdots&z(x_{21},x_{1m_{1}})&z(x_{21},x_{21})& z(x_{21},x_{22})&\cdots&z(x_{21},x_{1m_{2}})\\ z(x_{22},x_{11})&z(x_{22},x_{12})&\cdots&z(x_{22},x_{1m_{1}})&z(x_{22},x_{21})& z(x_{22},x_{22})&\cdots&z(x_{22},x_{1m_{2}})\\ \vdots&\vdots&\ddots&\vdots&\vdots&\vdots&\ddots&\vdots\\ z(x_{2m_{2}},x_{11})&z(x_{2m_{2}},x_{12})&\cdots&z(x_{2m_{2}},x_{1m_{1}})&z(x_ {2m_{2}},x_{21})&z(x_{2m_{2}},x_{22})&\cdots&z(x_{2m_{2}},x_{1m_{2}})\end{array}\right]\]  
\(\mathbf{Z}_{11}\) and \(\mathbf{Z}_{22}\) describe the inner impacts of the patterns on those in Categories 1 and 2, respectively, whereas \(\mathbf{Z}_{12}\) and \(\mathbf{Z}_{21}\), respectively, describe the outer impacts of the imposition of Category 1 on Category 2, and vice versa. Let pattern \(p\) in Category 1, represented by \(\mathbf{x}_{1p}=(x_{1p1},\,x_{1p2},\,\ldots,\,x_{1 pn})\) (\(1\leq p\leq m_{1}\)), be a reference pattern, and pattern \(q\) in Category 2, \(\mathbf{x}_{2q}\), represented by \((x_{2q1},\,x_{2q2},\,\ldots,\,x_{2 qn})\) (\(1\leq q\leq m_{2}\)), be a comparative pattern, where \(m_{1}\) and \(m_{2}\) denote the number of patterns in Categories 1 and 2, respectively. Therefore, \(m_{1}+m_{2}=m\). \(\mathbf{Z}_{11}\), \(\mathbf{Z}_{12}\), \(\mathbf{Z}_{21}\), and \(\mathbf{Z}_{22}\) are derived as follows:  
1. \(\mathbf{Z}_{11}\): \(z(\mathbf{x}_{1l},\,\mathbf{x}_{1p})\) (\(1\leq l\leq m_{1}\)) is obtained using \(\mathbf{x}_{11}\), \(\mathbf{x}_{12}\), \(\ldots\), \(\mathbf{x}_{1m_{1}}\) as comparative sequences and \(\mathbf{x}_{1l}\) as a reference sequence, so that \(z(\mathbf{x}_{1l},\,\mathbf{x}_{1p})=Y(\mathbf{x}_{1l},\,\mathbf{x}_{1p})\).
2. \(\mathbf{Z}_{12}\): \(z(\mathbf{x}_{1p},\,\mathbf{x}_{2q})\) is obtained using \(\mathbf{x}_{11}\), \(\mathbf{x}_{12}\), \(\ldots\), \(\mathbf{x}_{1m_{1}}\) as comparative sequences and \(\mathbf{x}_{2j}\) as a reference sequence, so that \(z(\mathbf{x}_{1p},\,\mathbf{x}_{2q})=Y(\mathbf{x}_{1p},\,\mathbf{x}_{2q})\).
3. \(\mathbf{Z}_{21}\): As the testing patterns are unseen by the training patterns, they do not have any impact on the training patterns. Therefore, \(z(\mathbf{x}_{2q},\,\mathbf{x}_{1p})\) is set to zero, so that \(\mathbf{Z}_{21}=0\).
4. \(\mathbf{Z}_{22}\): As the testing patterns are unseen, they do not have any impact on themselves. Therefore, \(z(\mathbf{x}_{2k},\,\mathbf{x}_{2q})\) (\(1\leq k\leq m_{2}\)) is set to zero, so that \(\mathbf{Z}_{22}=0\).  
Of course, the symmetry of \(\mathbf{Z}\) is not required. Note that during the training phase, only training patterns are considered, \(\mathbf{Z}_{12}=0\).