## 3 Type-2 Fuzzy Logic  
The fuzzy inference is very similar for type-1 and type-2 fuzzy logic. First, a fuzzification process is performed, in which the measured real data are transformed into language variables. Authors [27] state that these language variables are represented by attributes, while the number of these attributes is normally in the range from 3 to 7. The degrees of attributes are then graphically represented by a mathematical function (see Figure 1). Within the higher level of fuzzy logic, there are three possible variants of fuzzification: \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Author** & **Fuzzy Sets** & **Type** & **Problem** \\ \hline
[16] & Gaussian & T1 FS & stock index prediction \\
[23] & Triangular & T2 FS & stock index prediction \\
[17] & Triangular & T1 FS & stock index prediction \\
[18] & Triangular & T1 FS & stock index prediction \\
[19] & Trapezoidal & T2 FS & stock index prediction \\
[20] & Triangular & T1 FS & stock index prediction \\
[22] & Bell & ANFIS & stock index prediction \\
[21] & Bell & T1 FS & stock prediction \\
[24] & Triangular & T1 FS; T2 FS & stock index prediction \\
[25] & Triangular & T2 FS & profit prediction \\
[26] & Triangular & T2 FS & stock index prediction \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Summary of literature background. (a) sharp set; (b) type-1 fuzzy set; (c) type-2 fuzzy set. The former is used if the input data is perfect, i.e., it does not contain noise. Otherwise, fuzzy sets are selected. It is necessary to note that data with stationary noise are modeled as type-1 fuzzy sets and data with non-stationary noise are modeled as type-2 fuzzy sets. The distribution function, which represents type-2 fuzzy set, can be according to [28; 29] write as:  
\[\widetilde{A}=\int_{x\in X}\int_{u\in I_{x}}\frac{\mu_{\widetilde{A}}(x,u)}{x,u }=\int_{x\in X}\left[\int_{u\in I_{x}}\mu_{\widetilde{A}}(x,\mu)/(x,u)\right]/x, \tag{1}\]  
where x is the primary variable \(I_{x}e[0,1]\) is the primary membership of \(x\), \(u\) is the second variable, and \(\int_{u\in I_{x}}\mu_{\widetilde{A}}(x,\mu)/(x,u)\) is secondary possibility distribution at \(x\). Paper [30] generalized the fuzzy set interval and defined the term IT2 FLS. The requirement for secondary possibility distribution is a condition of normality, which means that the \(X\) elements are fully distributed for \(x\), which are defined as follows. IT2 FLS is:  
\[\widetilde{A}=\int_{x\in X}\int_{u\in I_{x}}\frac{1}{x,u}=\int_{x\in X}\left[ \int_{u\in I_{x}}1/(x,u)\right]/x, \tag{2}\]  
where x is the primary variable, \(J_{x}e[0,1]\) is the primary membership of \(x\), \(u\) is the second variable, and \(\int_{u\in I_{x}}1/(x,u)\) is secondary possibility distribution at \(x\). For interval type-2 fuzzy set \(\widetilde{X}\) are upper possibility distribution defined as \(\overline{\mu}(x)\) and lower possibility distribution defined as \(\underline{\mu}(x)\) type-1 possibility distribution. According to [PERSON] et al., 2006 the footprint uncertainty of \(\widetilde{X}(FOU(\widetilde{X}))\) is defined as:  
\[FOU\left(\widetilde{X}\right)=\bigcup_{x\in X}J_{s}=\Big{\{}(x,y):J_{X}=\Big{[} \overline{\mu}(x),\underline{\mu}(x)\Big{]}\Big{\}}, \tag{3}\]  
Interval type-2 fuzzy set \(\widetilde{X}=\left[\overline{\mu}(x),\ \underline{\mu}(x)\right]=\big{(}(a,b,d;h^{U}),\ \big{(}e,b,f;h^{L}\big{)}\big{)}\), where \(\overline{\mu}(x)\) and \(\underline{\mu}(x)\) are type-1 fuzzy sets of \(a,b,d,e,f\) are reference points of the IT2 FLS, \(h^{U}\) indicates the reference point of \(a,b,d\) in the upper possibility function, \(h^{L}\) indicates the reference point of \(e,b,f\) in lower possibility function, \(h^{U}e[0,1]\), and \(h^{L}e[0,1]\). From a mathematical point of view, the lower and upper possibility distribution can be written as follows:  
\[\overline{\mu}^{U}(x)=\left\{ \begin{array}{ll}\frac{u^{U}(x-a)}{b-a},&a\leq x \leq b\\ \frac{u^{U}(d-x)}{d-b},&b\leq x\leq d\\ 0,&\text{otherwise}\end{array}