# Explainable Internet Traffic Classification
## 3 Materials and Methods
### The Proposed Traffic Classification System
#### 3.2.1 PAES-RCS Method  
Evolutionary fuzzy systems, which consist of evolutionary algorithms applied to the design of fuzzy systems, are one of the greatest advances within the area of computational intelligence. Among these, multi-objective evolutionary fuzzy classifiers (MOEFCs) are characterized by a good trade-off between accuracy and explainability level [12,16]. Therefore, these models have been widely used for approaching classification problems. Indeed, MOEFCs deal with the design of fuzzy rule based classifiers (FRBCs) by means of multi-objective evolutionary algorithms: during the evolutionary design process, both the accuracy and the explainability level of the models are concurrently optimized. At the end of the design process, a set of classification models, characterized by different trade-offs between accuracy and interpretability (Pareto front approximation), are available for the final user that will select the most suitable solution for its problem domain. The final models are usually characterized by compact fuzzy rules, namely, linguistic IF-THEN rules, which can describe the classification process in an explainable way. Figure 1: Block diagram of the proposed Traffic Classification System. An FBRC basically includes a rule base (RB), a database (DB) containing the definition of the fuzzy sets used in the RB, and an inference engine. RB and DB comprise the knowledge base of the rule-based system. Let \(X=\{X_{1},\ldots,X_{F}\}\) be the set of input variables and \(X_{F+1}\) be the output variable of the classifier. Let \(U_{f}\), with \(f=1,...,F\), being the universe of the \(f^{th}\) input variable \(X_{f}\). Let \(P_{f}=\{A_{f,1},\ldots,A_{f,j},\ldots,A_{f,T_{f}}\}\) be a partition of variable \(X_{f}\) consisting of \(T_{f}\) fuzzy sets. The output variable \(X_{F+1}\) is a categorical variable assuming values in the set \(\Gamma\) of \(K\) possible classes \(\Gamma=\{C_{1},\ldots,C_{K}\}\). Let \(\{(\mathbf{x}_{1},x_{F+1,1}),\ldots,(\mathbf{x}_{N_{r}}x_{F+1,N})\}\) be a training set composed of \(N\) input-output pairs, with \(\mathbf{x}_{l}=[x_{l,1}\ldots,x_{l,F}]\in\Re^{F}\), \(t=1,\ldots,N\) and \(x_{F+1,l}\in\Gamma\). With the aim of determining the class of a given input vector, we adopt an RB composed of \(M\) rules expressed as  
\[R_{m}:\textbf{IF }X_{1}\textbf{ is }A_{1j,\alpha_{1}}\textbf{ AND }\ldots\textbf{ AND }X_{F}\textbf{ is }A_{Fj,\alpha_{r}}\] \[\textbf{THEN }X_{F+1}\textbf{ is }C_{j\alpha}with RW_{m} \tag{1}\]  
where \(C_{j\alpha}\) is the class label associated with the \(m^{th}\) rule, and \(RW_{m}\) is the rule weight, i.e., a certainty degree of the classification in the class \(C_{j\alpha}\) for a pattern belonging to the subspace delimited by the antecedent of rule \(R_{m}\). Usually, a purposely defined fuzzy set \(A_{f,0}\) (\(f=1,\ldots,F\)) is considered for all the \(F\) input variables. This fuzzy set, which represents the \"do not care\" condition, is defined by a membership function equal to 1 on the overall universe. The term \(A_{f,0}\) allows generating rules that contain only a subset of the input variables. A specific _reasoning method_ employs the information it receives from the RB to determine the class label for a given input pattern. We adopt the _maximum matching_ as reasoning method (see [16] for details). Concerning the DB, we adopted triangular fuzzy sets: each fuzzy set \(A_{f,j}\) is identified by the tuples \((a_{f,j},b_{f,j},c_{f,j})\), where \(a_{f,j}\) and \(c_{f,j}\) correspond to the left and right extremes of the support, and \(b_{f,j}\) to the core. In particular, in the experiments, we use strong fuzzy partitions, where \(a_{f,1}=b_{f,1},b_{f,T_{f}}=c_{f,Tf}\) and, for \(j=2,...,T_{f}-1\), \(b_{f,j}=c_{f,j-1}\) and \(b_{f,j}=a_{f,j+1}\). In Figure 2, we show an example of a strong fuzzy partition composed by three triangular fuzzy sets. In order to concurrently design the RB and tune the parameters of the fuzzy sets, we adopt the PAES-RCS algorithm introduced in [44].