# FLAME-VQA: A Fuzzy Logic-Based Model for High Frame Rate Video Quality Assessment
## 4 Fuzzy Logic in User Experience Assessment
### The Model Development Process
#### 4.2.1 Fuzzification of the Scalars  
The presented model in this contribution aims to assess video quality, as perceived by users, based on four video parameters: video frame rate (annotated with Video FPS), compression rate (dependent on the CRF, hence, Video CRF), SI, and TI. The model development process involves the fuzzification of scalar values for these parameters using the Fuzzy C-Means (FCM) clustering approach [14]. The method groups all data points into clusters based on their similarities. Unlike traditional hard clustering methods like K-Means, FCM assigns membership degrees to data points for each cluster rather than assigning a single cluster label. This enables data points to belong to multiple clusters with varying degrees of membership, reflecting the uncertainty and partiality of data points' association with clusters. Therefore, \(i\)-th data point (\(x_{i}\)) can be a member of several clusters (\(j\)) with different degrees of membership (\(u_{ij}\)). Based on [14], to perform the fuzzification, the model minimizes the objective function \(J_{m}\), as given by Equation (1):  
\[J_{m}=\sum_{i=1}^{L}\sum_{j=1}^{C}{u_{ij}}^{m}.||x_{i}-c_{j}||^{2} \tag{1}\]  
where \(c_{j}\) represents the center of the \(d\)-dimension cluster, \(||*||\) is a norm that expresses the similarity between the measured data and the center, and \(m\) is any real number greater than 1. In this study, \(m=2\), which implies that a specific data point can belong to two fuzzy clusters. The iterative process of finding fuzzy clusters and their centers involves updating \(u_{ij}\) and \(c_{j}\) using Equations (2) and (3), respectively (\(N\) represents the number of data points); the process continues until the stopping criteria (\(\varepsilon\)) is met (Equation (4); \(k\) are the iteration steps) [14]. In our case, we used the value of \(\varepsilon=10^{-5}\). \[u_{ij}=\frac{1}{\sum_{k=1}^{C}\left(\frac{||x_{i}-c_{j}||}{||x_{i}-c_{k}||} \right)^{\frac{2}{m-1}}} \tag{2}\]  
\[c_{j}=\frac{\sum_{i=1}^{N}{u_{ij}}^{m}.x_{i}}{\sum_{i=1}^{N}{u_{ij}}^{m}} \tag{3}\]  
\[max_{ij}\left\{\left|{u_{ij}}^{(k)}-{u_{ij}}^{(k-1)}\right|\right\}<\varepsilon. \tag{4}\]The FCM clustering approach was implemented in Python (version 3.11.4) using the latest version of the skfuzzy package. The decision regarding the optimal number of clusters for the FCM algorithm initially involved a heuristic approach using two clustering validity indices, namely the FCM partition coefficient (\(PC\)) and partition entropy (\(PE\)). In this initial phase, we aimed to establish a foundational clustering structure using the PC and PE methods, which served as a starting point for further refinement. We executed the FCM algorithm for a range of cluster numbers (\(c\)), spanning from two to a user-defined maximum value that we initially set at five. For each iteration of clustering, both the PC and PE were calculated, employing Equations (5) and (6), respectively, as outlined in [47]. These indices allowed us to quantitatively evaluate the quality and coherence of the resulting partitions. The PC serves as a measure of cluster compactness, gauging how closely data points within each cluster are grouped. On the other hand, the PE offers insights into the fuzziness or overlap present among clusters, providing a sense of how distinct or intermingled the partitions are. By analyzing the PC and PE values, we could gain an initial understanding of the suitability of different cluster numbers in representing the underlying data distribution. In this initial phase, the data points for each input variable of the model were clustered into two fuzzy clusters. \[PC=\frac{1}{N}\sum_{i=1}^{N}\left(\frac{1}{c}\,\sum_{j=1}^{c}{u_{ij}}^{m} \right)^{2}. \tag{5}\]  
\[PE=-\frac{1}{N}\sum_{i=1}^{N}\sum_{j=1}^{c}\left({u_{ij}}^{m}\cdot log\left({u _{ij}}\right)\right). \tag{6}\]  
However, as our analysis progressed, we observed that the FCM partitions formed with two clusters per input variable did not fully capture the complexity and nuances of the video quality assessment task.