dataesr/scientific-paragraphs-categorization huggingface dataset:
Features Selection for HEA Identification Let F = { f 1 , f 2 ,. , f p }, with f i ∈ R, ∀i ∈ [1, p] be the overall set of p features. The FS process aims at finding the optimal subset of features F ⊆ F that maximizes the identification accuracy such that its cardinality verifies card(F ) = d ≤ p  [24]. This process induces several benefits such as avoiding the curse of dimensionality and overfitting phenomenon  [25] , improving the classification performance with the removal of nondiscriminating features and decreasing the computational cost by only collecting the needed features. In contrast to the other dimensionality reduction techniques  [24] , FS does not change the original meaning of features and therefore allows further interpretation by a domain expert. Our work consists in evaluating several feature selection techniques when applied to an HEA recognition scenario, in terms of recognition accuracy and in terms of robustness by investigating two distinct datasets and several classification methods.
Transfer Learning The last challenge addressed in this study concerns transfer learning  [21] , which consists in using the knowledge extracted from a given dataset to tackle a new problem based on a different dataset with a different setup and classification taxonomy. The investigated datasets can be of different natures since they use different recording protocols, different grid properties and different annotation taxonomies. This main motivation is to show the validity and the generalization capability of the selected features from one dataset to another. To this end, we introduce a novel dataset recorded on a French grid (utility frequency at 50 Hz) which is different from the other existing publicly available datasets such as PLAID  [26] , which was recorded recorded in the USA grid with utility frequency at 60 Hz.
HEAs Datasets To test the performance of an NILM technique, it is important to consider real data. Due to the challenges in the creation of such datasets, mainly related to the required time and the high costs involved, we investigated in this study two data sets that are freely available: the PLAID dataset  [26] , which is shared online and is used as common reference, and our novel publicly available dataset freely accessible at http://dx. doi. org/ 10. 21227/ww76-d733). Both datasets contain individual HEAs measurements which are convenient for extracting features, training models, conducting performance evaluation and performing benchmarking on a common basis. Indeed, some existing datasets include scenarios of multiple simultaneous loads  [27]. However, before conducting disaggregation (i.
e. , decomposing the whole energy consumption of a dwelling into the energy usage of individual HEAs), it is important to build an initial signature database that is key to many NILM techniques. For both datasets considered in this study, a class of HEA corresponds to a brand of a category of HEA, e. g. , the class "Incandescent light bulb-Electrix-soft white", which is distinct from the HEA class "Incandescent light bulb-Philips Durama". Furthermore, we only consider steady-state conditions, and we extracted for each class of HEAs in both datasets several periods of the current and voltage steady-state waveforms. Indeed, during HEAs' switching On/Off, momentary fluctuations of the current and voltage signals occur before settling in to a steady-state value. These fluctuations are called transients and can characterize a given HEA.
PLAID Dataset This dataset  [26]  contains current and voltage measurements sampled at 30 kHz from 11 different HEA types present in more than 60 households in Pittsburgh, Pennsylvania, USA. The goal of this dataset is to provide a public library for high-frequency measurements that can be used to assess existing or novel HEA classification algorithms. There are 11 categories of HEAs, which correspond to: air conditioner, compact fluorescent lamp, fridge, hairdryer, laptop, microwave, washing machine, bulb, vacuum, fan, and heater. Each category of HEA is represented by more than ten different instances. For each HEA, three to six measurements are collected for each state transition (i. e. , on/off changing state). As mentioned, we only consider the steady-state operations, and we extracted for each class of HEAs in the PLAID dataset several periods of the current and voltage steady-state waveforms such that we have a total of 71 HEAs (with different categories and brands) and n = 36, 720 distinct recordings (also called individuals in the statistical terminology).
New Proposed Dataset We introduce a novel publicly availabledataset containing 24 categories of HEAs (e. g. , fans, fridges, washers, etc. ) considered with distinct brands (35 types) and that were recorded at several power levels to lead us to a total of 61 considered HEAs. For HEAs with a wide variety of operational programs or adjustable settings such as temperature or intensity, we recorded all power consumption patterns and considered that an HEA power level corresponds to a specific class of HEA, although power consumption patterns refer to the same device. Figure  2   The HEAs have been recorded in steady-state conditions in a French 50 Hz electrical grid. The measurement setup consists of an AC current probe (E3N Chauvin Arnoux) with a 10 mV/A sensitivity and a differential voltage probe with a 1/100 attenuation.
Voltage and current waveforms were captured by an 8-bit resolution digital oscilloscope (RIGOL DS1104Z). The sampling rate was set at f s 1 = 250 kHz for some of the recordings and f s 2 = 50 kHz for the other part. Electrical assembly and instrumentation are depicted in Figure  3. Hence, each HEA of this dataset is described by 8 periods of the current and voltage steady-state waveforms, resulting consequently in a set of n = 8 × 61 = 488 distinct individuals.
Electrical Features Name Number of Computed Features Effective current I and its harmonics I k for k ∈ {1,. , 15} and I H (A) 17 Active power P and its harmonics P k for k ∈ {1,. , 15} and P H (W) 17 Reactive power Q and its harmonics Q k for k ∈ {1,. , 15} and Q H (VAR) 17 Apparent power S and its harmonics S k for k ∈ {1,. , 15} and S H , S N (VA) 18 Current harmonic distortion THD I 1 Distortion power D, D I , D V (VAD) 3 Power factor F p and F pk for k ∈ {1,. ,  15} 16  Current crest factor F CI 1 Total 90 Since the NILM problem consists in the breakdown of an unknown mixture of HEAs into a set of identifiable HEAs signatures possibly belonging to a database, it is important to consider the electrical features that meet the additivity criterion  [8]  such that: f (v, i) = N s ∑ n=1 f (v, i n ) for i = N s ∑ n=1 i n (13) where f (v, i) is an electrical feature, v is a vector of voltage, i a vector of current samples acquired during one voltage period and N s is the number of HEAs that are simultaneously switched on.
Thus, when an HEA is connected (resp. disconnected) to the power network, an "additive" feature is increased (resp. decreased) by an amount equal to that produced by this HEA operating individually. Among the 90 features, p = 34 features meet the additivity criterion and are reported in red in Table  1. This property is required for extracting HEAs features from an aggregated signal and for comparing them with the dataset of individual HEAs signatures. For example, a change detection method as proposed in  [6]  can be used in order to separate the distinct contribution of each HEA when several ones are switched on simultaneously. Hence, this study only focuses on the additive features computed for a unique observed HEA. Both datasets are stored in an n × p normalized matrix X, where the p = 34 features detailed earlier are in columns and have been normalized with a zero mean and a unit standard deviation.
New Proposed Sequential Forward Method This approach is an iterative wrapper-based FS method that aims at maximizing the classifier accuracy when adding each feature one-by-one  [30, [36] [37] [38] [39]. The first iteration starts with an empty set of selected features, and each feature f ∈ F, where F is the set of p features, is tested individually using a given classifier (in this study, we used LDA and K-nearest-neighbor (KNN) presented in Section 5). The feature that maximizes the classification accuracy (Acc)  [40]  of the training dataset is the first one selected. Then, each remaining feature is added to the set of previously selected features, and the same process is applied to find again the highest accuracy. The iterative feature selection ends once further feature addition yields no accuracy improvement.
Algorithm 1 Sequential forward FS algorithm Input: dataset X n,p , whole set of features F, ground-truth labels Y Output: Set of sorted features F p 1: Initialization: F 0 ← ∅ 2: for k ← 0 to p -1 do 3: for f ∈ F F k do 4: F + ← F k ∪ { f } 5: evaluate (LDA or KNN classifier, X n (F + ), Y) 6: compute Acc(F + ) 7: end for 8: Select the best remaining feature: f k ← arg max f ∈F F k Acc(F k ∪ { f }) 9: Update feature set: F k+1 ← F k ∪ { f k } 10: end for 11: return F p 4. 1. 3. New Proposed Deep Neural Network (DNN) Feature Selection Method This method is inspired by  [41] , which is a filter-based approach that uses our proposed neural architecture. It uses the sum of the trained weights of the first layer neurons as a score of relevance of the input features. Deep learning uses a combination of agents (the neurons) to learn high-level non-linear relationships and correlations in the analyzed data.
Feature Selection Results In the context of event-based NILM  [6] , the selection of features meeting the additivity criterion matters. Each FS method, among the five ones previously presented in Section 4. 1, is then applied on the two datasets considered in this study (see Section 3. 1), where each HEA is represented by a vector of p = 34 features meeting the additivity criterion (see Section 3. 2). Datasets are centered and reduced in order to get an (n × p) matrix X with a zero mean and a unit standard deviation. This is obtained by applying the same operation The following observations can be made according to the obtained results:.
• For both datasets, some features such as P, P 1 , P H , Q, Q 1 , or Q H are present regardless of the used FS method; • For both datasets, the features selected by the DNN method for FS and by the PCA method are diversified in terms of harmonic orders; • For both datasets, the features selected by the MI and LDA methods are related to odd-order harmonics, which describe the power supply structures included in most of the HEAs; • For the sequential forward FS method, our experiments compare the results provided by the Euclidean-based KNN classifier (where the neighborhood parameter is set to K = 7) and to the LDA classifier. The number of nearest neighbors is set to 7 because it is the closest odd number to the number of instances in a class in the proposed dataset, so that for each neighborhood, there is a majority vote.
The selected features are those that reach the maximum accuracy  [47]  reported in Tables  2  and 3. For our dataset, only 12 features allow maximizing the KNN classifier accuracy and 18 features maximize the accuracy of the LDA classifier (see Figure  5 ). For the PLAID dataset, 25 features allow maximizing the KNN classifier accuracy and 33 features maximize the LDA classifier accuracy (see Figure  6 ). The low accuracy reached by the LDA classifier in the PLAID dataset can be explained by the unbalanced training sets (where one or several classes outnumber the other classes)  [48]. Indeed, LDA is known to not provide good performances in this setting since classification is generally biased towards the majority classes. It is observed that for the LDA classifier, the accuracies less rapidly reach a plateau than for the KNN.
Classification Test Procedure The evaluation of the classification performances uses an 8-fold cross validation methodology, which randomly splits the dataset into eight equal partitions, which are individually tested using the seven remaining partitions for training. This process is repeated eight times, until all subsamples have been used for cross validation  [55]. The number of folds was arbitrarily set to 8 so that 12. 5% of the studied dataset corresponds to the test set and the remaining 87. 5% to the training set. The final metrics for classification performances were then computed by merging the results of each partition. Our results are expressed in terms of the classical classification metrics used for NILM-Accuracy (Acc), F Measure (F M ), Recall (Rec) and Precision (Pre)  [40, 47] -which are deduced from the computed confusion matrices.
Self-Database Results Sections 5. 3. 1 and 5. 3. 2 present the classification success rate as a function of the provided subset of selected features used to describe each HEA. Overall results using our new proposed dataset are summarized in Table  4  for which the details are provided in Table  5. The results obtained using the PLAID dataset are summarized in Table  6  where the details are presented in Table  7. The confusion matrices of the best methods are also presented in Appendix A. We also compare the results with the active and reactive powers (P,Q) which are the usual features proposed in the NILM literature  [56]. The results show the clear improvement provided by the FS methods on each evaluated dataset. In addition, to study how noise influences our training, we have trained the studied classifiers using the selected features and Data Augmentation (DA)  [57].
For this, both studied datasets are 100 % augmented by adding a white Gaussian noise to the current signals of each HEA class, to obtain an Signal to Noise Ratio (SNR) = 20 dB (defined as 10 log 10 ||x|| 2 ||b|| 2 , with x the original signal amplitude and b the noise signal). This leads to new augmented datasets containing noisy current signals, from which we compute the 34 features meeting the additive criterion. Then, for each original dataset, we apply cross-validation for classification evaluation using the selected features in Section 4. 2 and the classification methods used in Section 5. The experiment setup also consists of an 8-fold cross-validation experiment, where the original datasets were partitioned into eight. For each of the 8 simulations, 20% of each HEA class of the noisy generated dataset was added to the training set.
Proposed Dataset Table  5  shows that the RF classifier outperforms all the other classifiers. This is consistent with the findings of X. Wu et al. in  [53] , where an accuracy equal to 98. 0% was found using eight steady-state features (which do not meet the additive criterion). These authors showed the advantages of RF classifier over KNN. In our experiment, RF classifier obtains the best recognition rate equal to 99. 18% with the features selected by the MI method and DA, and 98. 15% of accuracy when combined with LDA feature selection method without DA. This leads to a ratio (Acc/# feat. ) of 7. 01 and a computational time that is very low. It can be observed that the classifier performances are also better when data is artificially augmented during training. The confusion matrix depicted in Figure  A1  shows that 20% of tested individuals that belong to class index 4 "Fan-Coala level 1" are classified as class index 5 "Fan -Coala Level 2" and 10% of the tested individuals belonging to class index 1 "Electric mixer Moulinex" are classified as class index 7 "Fan-Coala Level 3".
Interestingly, the performance of the DNN method is improved by a suitable choice of relevant descriptors as confirmed by the usage of the MI and the DNN featurs selection methods. Indeed, DNN classifier usually obtains the best results when using all the considered features. This point is of interest to develop new strategies to improve the training efficiency of DNN when used on a small training dataset. Finally, it can be observed that the results obtained with the DNN classifier are lower than those obtained for the PLAID dataset in Table  7. This can be explained by the small size of the training dataset. Indeed, DNN is known to require a large number of data to efficiently be trained. It can also be observed that for most of the classifiers, data augmentation by the addition of white Gaussian noise can significantly improve the results.
PLAID Dataset In Table  7 , we can notice the improvement brought by FS approaches combined with the KNN classifier. Indeed, the obtained ratios (Acc/# feat. ) are all greater, which denotes the fact that KNN classifier needs a small number of features to reach excellent accuracy. The best ratio (Acc/# feat. ) of 47. 29 is obtained when using KNN with P, Q features, which are usually considered for HEAs' identification in the NILM literature, but the reached accuracy is only of 94. 58 %. The best accuracy of 99. 19% is reached for only 25 features selected by the KNN-based sequential forward-FS method with and without data augmentation (according to the confusion matrix depicted in Figure  A2 , 10% of the tested individuals belonging to class index 7 "Incandescent light bulb-Electrix-soft white" are classified as class index 8 "Incandescent light bulb-Philips Duramax").
However, an accuracy of 99. 13 % with a very good ratio Acc # f eat = 4. 96 is obtained when considering the subset of 20 features selected by the MI method with the KNN classifier. As we seek to achieve the best identification rates (close to 99 % of accuracy) for the smallest number of selected features, this combination classifier/ selected features is a good trade-off. This allows the KNN classifier to slightly exceed the performances reached by the RF classifier with the 20 features selected by the MI method (98. 91 % of accuracy). In contrast to our dataset, the high number of individuals (n = 36 720) eases the DNN to learn the features from the dataset and to figure out that an important number of features is reliable and should be used. Our results outperform the previous ones reported in  [58]  for the PLAID dataset using the VI trajectories features, where an F-measure of F M ≈ 77% is given.
This validates the efficiency of our approach consisting in carefully selecting features before classification. Combining RF classifier with features selected by the KNN-based sequential forward FS method also allows us to exceed the performances obtained in  [18] , where authors also used an RF classifier applied on PLAID dataset using an optimal subset of 20 steady-state and transient features (selected through a systematic feature elimination process) and were able to reach an accuracy of 93. 2%. The performances obtained by the LDA are the worst ones. As mentioned, this can be explained by the fact that the LDA classifier struggles when the number of individuals is very large, resulting in individuals overlapping between classes. In almost all the cases, data augmentation improves or slightly modifies the classification performance for all methods (exception for the KNN classifier).
Transfer Learning Results Now, we propose evaluating if the features selected from a dataset are able to be transferred to another dataset. For this, a cross-learning strategy is adopted for both studied datasets. The goal is to study to what extent the features selected for a particular dataset are invariant across HEAs and can be used to get good classification performances in another dataset. Indeed, as several common features are selected from each dataset separately, we assume that they convey common information that can be transferred from one dataset to another. This approach allows us to reduce the number of training samples from unknown HEAs. First, the subsets of selected features from the proposed dataset are tested using the several classifiers presented previously and applied to the PLAID dataset.
The results are presented in Table  8. Very good results are obtained with the KNN, the DNN, and the RF classifiers with the different subsets of selected features. The best ones are obtained with the KNN classifier and particularly when combined to the MI feature selection method, which allows us to obtain the best performances with only 20 features. Figure  A3  shows the tested individuals that were misclassified, such as the following: 10% of the individuals belonging to class index 7 "Incandescent bulb light -Electrix soft white" were classified as class index 8 "Incandescent light bulb-Philips Duramax" or 10% of the individuals in class index 39 "Laptop-HP-C24" were classified as class index 40 "Laptop-Apple macbook air". Second, the subsets of selected features from the PLAID dataset were tested using the several classifiers presented previously and applied to the proposed dataset.
The results are presented in Table  9. Very good results were obtained with the RF and the LDA classifiers with the different subsets of selected features. An accuracy of 98. 77% was obtained when combining the RF classifier to the subset of features selected with the LDA sequential forward-FS method. The confusion matrix in Figure  A4  shows that 50% of the individuals belonging to class index 5 "Fan-Coala Level 2" were classified as class index 4 "Fan-Coala Level 1", and 50% of the individuals that belong to class index 53 "Washing machine-LG state (b)" were classified as class index 58 "Washing machine-LG state (g)". Through cross transfer learning, we show that in both situations, the features selected from another dataset improve the classification rate. There is therefore transfer of knowledge on the discriminating "power" of the selected features.
Conclusions In this paper, we addressed one of the main challenges of the NILM problem consisting in the HEA identification from electrical measurements. To this end, we covered a broad sweep of existing supervised FS and classification methods to show the efficiency of this approach for identifying distinct HEAs using the suitable set of relevant features. As a first contribution, in addition to a novel publicly available dataset, we introduced a comparative evaluation of a large number of methods in an event-based NILM context, involving all the possible combinations of these techniques applied on two distinct annotated HEA datasets where each HEA signature made of relevant features is extracted from different categories and manufacturers. Second, thanks to our proposed data augmentation and feature selection, we have improved the best HEA identification results on the PLAID dataset by obtaining a resulting classification rate above 99%.
To our knowledge, this result outperforms the best available results obtained with the PLAID dataset using state-of-the-art methods. Furthermore, in this regard, validating our solution using two datasets has helped in (i) showing its high performance despite the data collection procedure being different and (ii) proving its capability to give very good results even if HEAs are from different categories and manufacturers. Moreover, our results show that the number of extracted features can significantly be reduced to efficiently perform HEAs recognition. A cross transfer learning strategy was adopted by using the subsets of features selected by FS approaches applied to our dataset to classify HEAs of the PLAID dataset and conversely. Very good results were obtained, which confirms that the features selected with one dataset can be transferred to another one.