# Combining Advanced Feature-Selection Methods to Uncover Atypical Energy-Consumption Patterns
## 4 The Feature-Selection Process
### Fuzzy Rough Feature-Selection Method  
Determining the ideal number of features can be challenging because there is always a trade-off between the smallest subset and the most accurate modeling [45]. A FRFS can be combined with FRNN for classification to address this challenge. This approach balances both aspects to achieve a more effective feature-selection process. Combining FRFS with the FRNN algorithm provides a comprehensive framework for handling uncertainty and imprecision in feature-selection and feature-classification tasks. This integration allows for more robust and accurate modeling of complex real-world data, where traditional methods may fall short due to their inability to handle uncertainty effectively. These algorithms are available in the fuzzy-rough-learn Python library [46]. In a random sample of behavioral data (Table 5), we compared the positive region selecting the features \(\{f_{2},f_{3}\}\) and \(\{f_{4},f_{5}\}\). Here, \(x_{i}\) represents the objects (\(x_{i}\in U\)), \(f\) represents the attributes (\(f\in A\)) and \(p\) represents the k-means consumption clusters. Table 6 shows the resulting set for the partition \(U/IND(F)\) when considering the features \(\{f_{2},f_{3}\}\). Figure 10: Ranking of feature importance with selected features in each clustering method as a target. (**a**) K-means, (**b**) AHC, (**c**) SOM. Figure 9: Ranking of feature importance with all features in each clustering method as a target. (**a**) K-means, (**b**) AHC, (**c**) SOM. The objects \(x_{1}\), \(x_{2}\) and \(x_{6}\) are indiscernible in relation to the attributes \(\{f_{2}\), \(f_{3}\}\), as they all have \(f_{2}=0\) and \(f_{3}=2\). Similarly, \(x_{3}\) and \(x_{7}\) cannot be distinguished from each other as they both have \(f_{2}=1\) and \(f_{3}=3\), and \(x_{5}\) and \(x_{8}\) cannot be distinguished from each other as they both have \(f_{2}=0\) and \(f_{3}=3\). Therefore, the resulting set for the partition \(U/IND(F)\) is shown in Table 6.  
Given a set of clustered objects \(Q\), if \(U/Q\) is defined as \(\{\{x_{1}\),\(x_{3}\),\(x_{7}\), \(\{x_{2}\),\(x_{4}\),\(x_{5}\),\(x_{6}\)}, \(\{x_{8}\}\}\), the elementary sets presented in \(U/IND(f_{2},f_{3})\), which are also contained in \(X\) (where \(X\) is a subset of \(U/Q\)), are \(\{x_{3}\), \(x_{7}\)} and \(\{x_{4}\}\). Therefore, the values of \(FX\) and \(POS_{F}(Q)\) for \(F=\{f_{2},f_{3}\}\) and \(Q=\{p\}\) are  
\[FX=\{\{x_{3},x_{7}\},\{x_{4}\}\}\]  
\[POS_{\{f_{2},f_{3}\}}(Q)=\{x_{3},x_{4},x_{7}\}\]  
Regarding \(\{f_{4}\), \(f_{5}\}\), it seems that \(x_{1}\) and \(x_{4}\) are indiscernible because both have \(f_{4}=1\) and \(f_{5}=1\), while \(x_{5}\) and \(x_{6}\) both have \(f_{4}=0\) and \(f_{5}=1\). The resulting set for the partition \(U/IND(F)\) is shown in Table 7.  
The sets contained in \(X\), which is a subset of \(U/Q\), and presented in \(U/IND(f_{4},f_{5})\) are: \(\{x_{2}\}\), \(\{x_{3}\}\), \(\{x_{5}\), \(x_{6}\}\), \(\{x_{7}\}\) and \(\{x_{8}\}\). Therefore, \(POS_{F}(Q)\) and \(FX\), where \(F=\{f_{4},f_{5}\}\) and \(Q=\{p\}\), are:  
\[FX=\{\{x_{2}\},\{x_{3}\},\{x_{5},x_{6}\},\{x_{7}\},\{x_{8}\}\}\]  
\[POS_{\{f_{4},f_{5}\}}(Q)=\{x_{2},x_{3},x_{5},x_{6},x_{7},x_{8}\}\]  
When \(POS_{\{f_{4},f_{5}\}}(Q)\) surpasses \(POS_{\{f_{2},f_{3}\}}(Q)\), the combination of features \(f_{4}\) and \(f_{5}\) becomes more important than \(f_{2}\) and \(f_{3}\). \begin{table}
\begin{tabular}{l l} \hline \(U/IND(F)\) & \(f_{2}\) & \(f_{3}\) \\ \hline \(\{x_{1}\), \(x_{2}\), \(x_{6}\}\) & 0 & 2 \\ \(\{x_{3}\), \(x_{7}\}\) & 1 & 3 \\ \(\{x_{5}\), \(x_{8}\}\) & 0 & 3 \\ \(\{x_{4}\}\) & 1 & 1 \\ \hline \end{tabular}
\end{table} 
Table 6: Partition of \(U\) based on \(f_{2}\) and \(f_{3}\).