# Extended Fuzzy-Based Models of Production Data Analysis within AI-Based Industry 4.0 Paradigm
## 2 Materials and Methods
### Methods
It should be noted that the roughness variable is authoritatively divided into two sets due to the specificity of the data, i.e., a division practically into two groups, with the benchmark data having the lowest value per unit. In Variant 2, the division into fuzzy sets is systematic and based on strictly accepted criteria of observed relationships in the reference data. It represents intuitions that we can express, such as:  
* We group the data into larger clusters if the set of underlying clusters is at least average. * Additionally, if another cluster minimally extends the current range of values, we still add it to the group regardless of its size. We practically implement this by starting from the lower boundary. We then group subsequent clusters into a single granular/fuzzy set following the principles:  
* A cumulative increment of at least 25% of occurrences results in a new group (granule)--fuzzy set starting from the next basic cluster;
* Additionally, the increment of values in the variable space must be at least 5% or more.If not, we still add another basic cluster to the previous group. Both of these variants are basis for finding the intervals of cores (kernels) of the fuzzy sets (the membership is equal 1). Figure 1 shows detailed data of the cores of fuzzy sets for input variables of Variant 2, as it is most efficient solution presented in this paper. Since the reference data represent the parameters of machining tools, their grouping consists mainly in combining the base clusters into larger ranges. Therefore, it is more convenient to describe them with trapezoidal sets, especially triangular sets, which appear in several cases and can be easily represented also as trapezoidal shape. All the edges in the fuzzy sets are made by adopted constant spread factor of 25%. With this factor, the models can be adjusted in the future for data other than the benchmark data (including measurement/operational data from the real systems).We also used several specific formulas, including interesting functions of fuzzy set memberships. In summary, the trapezoidal fuzzy sets were used, and their defining was performed as follows. 1. We identify the core (using Variant 1 or Variant 2 on benchmark data) to obtain a set of intervals for a given input space: [\(k^{i}\)s;\(k^{i}\)e]--where \(ks\), \(ke\)--lower and upper boundary of the \(i\)-th interval for given input variable from benchmark data. 2. Definition of trapezoidal shape is described by the fourth [\(l\); \(ks\); \(ke\); \(r\)], where \(l\) is left (down) and \(r\) is right (upper) boundary of support of fuzzy membership. That form is  
Figure 1: The example of the input variable. popular in many scientific software like Matlab, Octave, Scilab. As was mentioned earlier for the fuzzy edges, the constant parameter _spread_ = 25% was used. Finally, definition of the trapezoid fuzzy set is done as: [\(\text{Js}-0.25\text{Js}\); \(\text{Js};\text{Js};\text{ke};\text{ke}+0.25\times\text{ke}\)]. As for the output for a classification purpose, it would be enough to use activation levels as indicator of the class. However, for completeness of processing fuzzy rules, we used, for each output, simple linguistic variable \(Y\):  
\[ \begin{array}{l}Y^{i}=(Y^{i}_{no},Y^{i}_{yes}),\\ Y^{i}_{no}=(0;0;0;1),Y^{i}_{yes}=(0;1;1;1),\end{array} \]  
where:  
\(i\)--number of output variable (class to recognize)  
\(Y^{i}_{no}\),\(Y^{i}_{yes}\)--trapezoidal fuzzy numbers indicating negation or confirmation of the class recognition. In fact, in the rule base for classification, we use only confirmation parts of output variables, so with the Middle of Maximum (MOM) defuzzification, it gives us just transformation of rule activation on the output space (Table 2).