Load classification method, device and equipment considering low-quality classifier dynamic selection
By acquiring feature vectors of low-quality classifiers and using an LQC discriminator to evaluate the availability of base classifiers, the Bagging ensemble model is dynamically optimized. This solves the base classifier redundancy problem, improves the accuracy and efficiency of load classification, and enhances the model's adaptability and resource utilization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INST OF ECONOMIC & TECH STATE GRID HEBEI ELECTRIC POWER
- Filing Date
- 2025-11-03
- Publication Date
- 2026-06-02
Smart Images

Figure CN122132939A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power grid technology, and in particular to a load classification method, apparatus, and equipment that takes into account the dynamic selection of low-quality classifiers. Background Technology
[0002] Refined user load modeling is one of the core technologies for power system analysis and optimization. Its core purpose is to accurately characterize the differences in time, space, and electricity consumption characteristics among different types of users, providing data support and decision-making basis for the planning, operation, dispatch, and user-side management of the power system throughout its entire life cycle, ultimately achieving safe, economical, efficient, and low-carbon operation of the power system. With the development of smart grids and electricity markets, refined user load modeling, as the foundation of power system optimization, is receiving increasing attention.
[0003] In existing technologies, Bagging ensemble load classification models are commonly used for load classification. Due to their good algorithmic stability, improved accuracy, and universality, Bagging ensemble load classification models have become the mainstream framework for processing diverse power data such as user-side load. However, since the core of Bagging lies in combining weak base classifiers to form a strong classifier, the redundancy problem among the base classifiers has become a key bottleneck restricting the performance of the ensemble model. Redundancy not only causes the model to fall into an inefficient state of "repetitive learning," increasing computational resource consumption and training time, but also weakens the core advantage of ensemble learning—"multi-view error correction"—ultimately causing the model's load classification accuracy to stagnate in complex scenarios, affecting both the accuracy and efficiency of load classification. Summary of the Invention
[0004] This invention provides a load classification method, apparatus, and device that considers dynamic selection of low-quality classifiers, in order to solve the problem of redundant base classifiers in the existing Bagging ensemble load classification model, which affects the accuracy and efficiency of load classification.
[0005] In a first aspect, embodiments of the present invention provide a load classification method that considers dynamic selection of low-quality classifiers, including: Obtain the payload data to be classified and determine the target low-quality classifier feature vector of the payload data in the base classifier pool of the Bagging ensemble model; Input the feature vector of the target low-quality classifier into the trained LQC discriminator to obtain the availability of each base classifier in the base classifier pool; Based on the availability of each base classifier in the base classifier pool, the Bagging ensemble model is updated to obtain the updated Bagging ensemble model; Input the load data to be classified into the updated Bagging ensemble model to obtain the load classification results.
[0006] Secondly, embodiments of the present invention provide a load classification device that considers dynamic selection of low-quality classifiers, comprising: The feature extraction module is used to acquire the payload data to be classified and determine the target low-quality classifier feature vector of the payload data in the base classifier pool of the Bagging ensemble model. The LQC discriminant module is used to input the feature vector of the target low-quality classifier into the trained LQC discriminant to obtain the availability of each base classifier in the base classifier pool. The model update module is used to update the Bagging ensemble model based on the availability of each base classifier in the base classifier pool, so as to obtain the updated Bagging ensemble model. The results output module is used to input the load data to be classified into the updated Bagging ensemble model to obtain the load classification results.
[0007] Thirdly, embodiments of the present invention provide an electronic device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the load classification method considering dynamic selection of low-quality classifiers as described in the first aspect above or any possible implementation of the first aspect.
[0008] This invention provides a load classification method, apparatus, and device that considers dynamic selection of low-quality classifiers. The load classification method includes: acquiring load data to be classified and determining the target low-quality classifier feature vectors in the base classifier pool of the Bagging ensemble model; inputting the target low-quality classifier feature vectors into a trained LQC discriminator to obtain the availability of each base classifier in the base classifier pool; updating the Bagging ensemble model based on the availability of each base classifier in the base classifier pool to obtain an updated Bagging ensemble model; and inputting the load data to be classified into the updated Bagging ensemble model to obtain the load classification result. This invention dynamically adjusts the base classifiers in the model based on the characteristics of the load data to be classified, avoiding classifier redundancy, effectively improving the accuracy of load classification, and ensuring classification efficiency. Attached Figure Description
[0009] Figure 1 This is a flowchart illustrating the implementation of a load classification method considering dynamic selection of low-quality classifiers, provided by an embodiment of the present invention. Figure 2 This is a schematic diagram illustrating the impact of the number of base classifiers on classification accuracy, provided in an embodiment of the present invention. Figure 3 This is a schematic diagram illustrating the influence of the optimal number of clusters provided in the embodiments of the present invention; Figure 4This is the confusion matrix of the classification results of each classification algorithm provided in the embodiments of the present invention on the test set; Figure 5 This is a schematic diagram of the classification results of various load curve data provided in the embodiments of the present invention; Figure 6 This is a schematic diagram of the load classification device considering dynamic selection of low-quality classifiers provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0010] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0011] See Figure 1 The document illustrates a flowchart of the implementation of a load classification method considering dynamic selection of low-quality classifiers, as provided in an embodiment of the present invention. Details are as follows: The above-mentioned load classification methods that consider dynamic selection of low-quality classifiers include: S101: Obtain the payload data to be classified and determine the target low-quality classifier feature vector of the payload data in the base classifier pool of the Bagging ensemble model; Bagging (Bootstrap Aggregating) is a classic ensemble learning method. Its core idea is to train multiple independent base classifiers in parallel and combine their results by voting (for classification tasks) or averaging (for regression tasks) to improve the model's generalization ability and stability.
[0012] This application analyzes the classification performance of each base classifier in the Bagging ensemble model on the data and extracts a quantitative indicator reflecting the classifier performance—the feature vector of the target low-quality classifier.
[0013] For example, the feature vector of a low-quality classifier may include a subset of the hard classification results of each base classifier for the data, a subset of the posterior probability classification results, a subset of the local classification accuracy, a subset of the output distribution, and a subset of the classifier confidence. The specific calculation process is detailed in the first formula and will not be elaborated further here.
[0014] S102: Input the feature vector of the target low-quality classifier into the trained LQC discriminator to obtain the availability of each base classifier in the base classifier pool; The LQC (Low-Quality Classifier Discriminator) is used to evaluate the "usability" of each base classifier in a Bagging ensemble model, providing a basis for subsequent selection of high-quality classifiers. By using a pre-trained LQC discriminator, the feature vectors of target low-quality classifiers are evaluated, resulting in a "usability" score for each base classifier, which measures the suitability of each base classifier for the current data.
[0015] S103: Based on the availability of each base classifier in the base classifier pool, update the Bagging ensemble model to obtain the updated Bagging ensemble model; By selecting base classifiers based on availability scores, high-availability models are retained, while low-availability models are eliminated or weakened, thus achieving dynamic optimization of the Bagging ensemble model.
[0016] S104: Input the load data to be classified into the updated Bagging ensemble model to obtain the load classification results.
[0017] The updated ensemble model is used to process the data to be classified, and the final classification result is obtained through the collaborative decision-making of high-quality base classifiers.
[0018] This application dynamically adjusts the model structure based on different load data characteristics, eliminating low-quality classifiers and effectively avoiding the interference of poor decisions on the overall results. This is particularly effective when load data distribution is complex or outliers exist. Simultaneously, it reduces the number of base classifiers involved in the decision-making process, lowering computational costs while maintaining accuracy. By changing the classifier quality evaluation from static to dynamic, the ensemble model can better adapt to the volatility and diversity of actual load data, solving the problem of insufficient robustness to data changes in traditional bagging.
[0019] In one possible implementation, the above method may further include: S105: Obtain the first training sample set ; S106: Based on the first training sample set Generate a base classifier pool.
[0020] This application is also based on the first training sample set. Build a pool of base classifiers to suit the current application scenario.
[0021] In one possible implementation, S106 may include: S1061: Transfer the first training sample set The training samples are divided into multiple daily load training sample subsets; the number of daily load training sample subsets is the same as the number of base classifiers. S1062: Establish multiple initial classifiers, and train each initial classifier using a subset of training samples from each daily load to obtain multiple base classifiers, forming a base classifier pool.
[0022] This application will use the first training sample set It is divided into multiple subsets, each used to train a different initial classifier.
[0023] For example, the Bootstrap sampling method can be used to sample from... Multiple subsets were obtained by sampling from the middle.
[0024] In one possible implementation, the base classifier can be a BPNN model.
[0025] Backpropagation Neural Networks (BPNNs) are multi-layer neural networks trained using the backpropagation algorithm. They possess powerful nonlinear fitting capabilities, enabling them to capture complex feature relationships in load data (such as implicit relationships between load values and factors like time, weather, and user type). Using BPNNs as base classifiers, nonlinear patterns in daily load datasets (such as sudden peak electricity consumption and stepped load changes) can be effectively learned by BPNNs, which can automatically extract deep features from load data without requiring manual feature engineering. The BPNN model leverages its powerful nonlinear fitting capabilities to improve the accuracy of a single model, and by combining it with mechanisms such as "daily load subset training" and "dynamic selection," it addresses the issues of insufficient generalization ability and high computational cost associated with standalone BPNNs.
[0026] In one possible implementation, the above method may further include: S107: Obtain the second training sample set ; Among them, the second training sample set Unlike the first training sample set .
[0027] S108: Based on the second training sample set And base classifier pool, determine the LQC discriminator label sample set; The second training sample set Input the base classifier pool to obtain the classification results of each base classifier, and then form the LQC discriminator label sample set.
[0028] S109: The basic LQC discriminator is trained using the LQC discriminator labeled sample set to obtain the trained LQC discriminator.
[0029] Using the labeled sample set as training data, a basic LQC discriminator (such as logistic regression, lightweight neural network, etc.) is trained to learn the mapping relationship of "base classifier feature vector → quality label", and finally a model that can accurately evaluate the usability of the base classifier is obtained.
[0030] It should be noted that the LQC discriminator label sample set can be divided into a training set and a validation set. The training set is used to train the basic LQC discriminator, and the validation set is used to validate the trained LQC discriminator. The specifics will not be elaborated here.
[0031] When the characteristics of the load data change significantly over time, the second training sample set can be updated. Retrain the LQC discriminator to make its evaluation criteria up-to-date.
[0032] In one possible implementation, S108 may include: S1081: For the second training sample set If any sample in the base classifier pool has a consensus rate for classifying that sample that is lower than a preset threshold, then that sample is added to the LQC sample set. ; For the second training sample set For each sample in the set, the "consensus" (such as majority vote agreement rate, classification result entropy value, etc.) of the base classifier pool is calculated for its classification results. When the consensus is lower than a preset threshold, it indicates that there is a classification dispute for the sample (significant disagreement among the base classifiers), and the sample is included in the LQC sample set. This selection logic is based on the idea that "controversial samples are more likely to expose differences in the quality of base classifiers"—on simple samples, high-quality and low-quality classifiers may perform similarly; however, on complex / ambiguous samples, the performance gap between the two will be significantly amplified.
[0033] S1082: For LQC sample set For any sample in the pool, determine the set of low-quality classifier feature vectors of the base classifier pool for that sample, and obtain the LQC label of that sample. The low-quality classifier feature vectors and the LQC label of that sample form the label sample corresponding to that sample. S1083: LQC Sample Set The label samples corresponding to each sample in the dataset form the LQC discriminator label sample set.
[0034] LQC Sample Set Each sample in the dataset has an LQC label. The low-quality classifier feature vector of the sample and the LQC label of the sample form the label sample corresponding to the sample, forming the LQC discriminator label sample set.
[0035] In one possible implementation, S1082 may include: 1. Based on the first formula, determine the subset of hard classification results, subset of posterior probability classification results, subset of local classification accuracy, subset of output distribution, and subset of classifier confidence for this sample; 2. The subsets of hard classification results, posterior probability classification results, local classification accuracy, output distribution, and classifier confidence are used to form the low-quality classifier feature vector set of the base classifier pool for this sample. The first formula may include:
[0036]
[0037]
[0038]
[0039]
[0040]
[0041] in, For the subset of hard classification results, For the first sample The nearest neighbor samples, For the first One base classifier, for exist The classification results in The number of base classifiers; This is a subset of the posterior probability classification results; for through The probability of belonging to a label category after a decision; A subset of local classification accuracy; To output a subset of the distribution, The output distribution feature vector is closest to this sample. A sample set, for The first in One element; For the classifier confidence subset, for neuron activation functions, for The network weights, for Threshold parameter, and They are respectively arrive The maximum and minimum values of the decision boundary distance; For this sample, for Pattern category labels.
[0042] (1) adaptation domain , The K-nearest neighbors algorithm (KNN) was used on the LQC sample set. Calculated in, and expressed as of The set of nearest neighbor samples. A subset of hard classification results. for 3D feature vectors Each nearest neighbor sample in When the classification is correct, the corresponding LQCFS value is 1; otherwise, it is 0. Represented as:
[0043] (2) Calculation of nearest neighbor samples exist The class decision probability in the data is between 0 and 1, and the posterior probability classification result subset is... for 3D eigenvectors. Represented as:
[0044] (3) Local classification accuracy subset Defined as of nearest neighbor samples exist The classification accuracy in the data ranges from 0 to 1. It is a 1-dimensional feature. Represented as:
[0045] (4) Based on The classification results among all base classifiers are defined. The output distribution of is denoted as . :
[0046] Calculate the LQC sample set The output distributions of all samples constitute a set. The KNN algorithm is used for search. The output distribution feature vector is located between the samples. Recent Sample , constitute the sample set , Represented as:
[0047] Then output distribution subset for 3D eigenvectors.
[0048] calculate exist If the classification result is correct, The feature value for the corresponding dimension is 1, and the value for the opposite dimension is 0. Represented as:
[0049] (5) Classifier confidence subset Defined as arrive The distance to the decision boundary is normalized to between 0 and 1 using the minimum-maximum normalization method. It is a 1-dimensional feature. Represented as:
[0050] in, for The activation function for neurons can be the sigmoid function.
[0051] The above five LQCFS subset elements together constitute the low-quality classifier feature vector of a single base classifier for this sample. , Represented as:
[0052] based on A base classifier pool can be constructed for the LQC sample set. low-quality classifier feature vector set , Represented as:
[0053] in, for The number of samples in the middle.
[0054] In one possible implementation, the above method may further include: S1010: Obtain daily load data from multiple users, and cluster the daily load data of multiple users to obtain multiple clusters; S1011: For any cluster, determine the data that is closest to the cluster center of the cluster, and use the data that is closest to the cluster center of the cluster as training samples, and add it to the user daily load training sample set; S1012: Divide the user daily load training sample set into the first training sample set according to a preset ratio. Second training sample set .
[0055] Clustering is performed based on the similarity of daily user load data, grouping user data with similar electricity consumption patterns into the same cluster. Utilizing the idea of "like attracts like," data within the same cluster are considered to have similar characteristics and patterns. The sample with the smallest feature space distance to all other samples in its cluster is considered the closest to the cluster center. Real data closest to the cluster center is selected from actual samples, ensuring that the selected samples well represent the characteristics of the entire cluster, avoiding the influence of extreme values or outliers on the model, reducing the amount of training data, and improving training efficiency. Finally, the selected representative samples are proportionally divided into two subsets (the first training sample set). Second training sample set These are used to train the LQC discriminator and the generator base classifier pool, respectively, avoiding bias caused by sample reuse and ensuring that both core components can be trained in a targeted manner, thereby improving the classification reliability and generalization ability of the entire ensemble learning system.
[0056] It should be noted that the user daily load training sample set can also be divided into sets other than the first training sample set. Second training sample set A third training sample set is used to validate the trained LQC discriminator.
[0057] In one possible implementation, S1011 may include: 1. For any data point in the cluster, use the second formula to determine the sum of the feature space distances between the data point and other data points in the cluster; 2. The data corresponding to the smallest sum of feature spatial distances among all feature spatial distances is taken as the data closest to the cluster center of the cluster. The second formula may include:
[0058]
[0059] in, and They are the first in the cluster. The data and the first One data point; and They are respectively and The Dimensional attribute values; For data dimensions, For dimension Attribute weights; The first in the cluster The data and the first Distance metric between data points The first in the cluster The sum of the feature space distances between each data point and other data points.
[0060] This application uses Esim distance as the distance metric for clustering, selecting data closest to the cluster center to ensure the actual existence and interpretability of the selected samples. Simultaneously, it preserves the overall characteristic distribution of the cluster to the greatest extent possible, avoiding the influence of noise and other factors.
[0061] The following detailed description of the load classification method considering dynamic selection of low-quality classifiers, with reference to specific embodiments, provides a detailed explanation.
[0062] The above method was executed on a PC with an Intel(R) Core i5-7100 CPU @3.90GHz, 40GB RAM, and Windows 11 operating system. The power data required for the example were the Electrical Grid Stability Simulated Data Set (EGSSD) released by the UCI Data Platform in 2018 and the Electricity Load Diagrams Data Set (ELDD) released in 2015, which contained measured electricity consumption data from 370 users between 2011 and 2014. Basic information about the datasets is shown in Table 1.
[0063] Table 1. Basic Information of the Dataset
[0064] Using recall Precision , value, The value is used as an evaluation metric for binary classification in standard datasets. This indicates the percentage of positive samples that are correctly classified. This represents the true proportion of positive samples among the samples classified as positive. This represents the geometric mean of the classification accuracy for positive and negative samples. It is used to evaluate the classifier's bias towards positive and negative classes. The closer this value is to the classification accuracy (ACC) of the sample set, the less the model training is affected by the imbalance of sample classes, and the better the model's learning effect. yes and The harmonic mean of the classifier is used to evaluate the degree of confusion between positive and negative classes. A larger value indicates a stronger ability of the classification model to perceive the boundary between positive and negative samples, and thus a more powerful classification model. However, for multi-class loading classification tests, the above indicators are not applicable; therefore, the confusion matrix is used as a method to evaluate classification performance.
[0065] 1. Standard Sample Set Classification Experiment The proposed algorithm's performance was tested using a power grid stability simulation dataset. This dataset is a commonly used standard dataset in classification testing, providing an objective evaluation of the algorithm's classification performance. The number of base classifiers is related to the amount of data and information richness of the sample set to be classified. To compare the performance of different ensemble classification algorithms, a base classifier pool needs to be trained. The size of the base classifiers is determined by the number of classes required to achieve saturation in the test set classification accuracy; in this example, 10 base classifiers are used. Figure 2 As shown.
[0066] The EGSSD dataset is divided into a meta-training set in a 4:1 ratio. and test set Two pieces. The number of training samples for the two classes were 5104 and 2896, respectively. During the experiment, for MSDE-BPNN, the meta-training set was... First, divide them into 3:1 ratios. and Two subsets, for testing purposes Then from Selected from [the list]. Since each test sample needs to be based on [the relevant data]... Constructing the feature vector of its low-quality classifier, and comprehensively considering both algorithm efficiency and classification performance, setting... The number of samples is 1 / 4 of it.
[0067] Table 2. EGSSD Test Set Classification Results
[0068] Table 2 shows that the combined decision-making of the BPNN classifier through ensemble learning significantly improves the classification performance compared to a single classifier, with improvements across all evaluation metrics. The Bagging-BPNN model combines the classification characteristics of all base classifiers, sharing a single decision strategy for all test samples, resulting in significant gains in classification performance for all categories of test samples. The OSE strategy aims to minimize base classifier redundancy, so OSE-BPNN does not show a significant improvement in classification performance compared to the Bagging-BPNN model, with an Acc increase of 0.08%. However, with the same base classifier pool size, the combination of base classifiers selected by the OSE strategy has a greater decision-making advantage. The Acc of this application is 1.25% and 1.10% higher than that of Bagging-BPNN and OSE-BPNN, respectively. and Compared to Bagging-BPNN, the performance improved by 1.56% and 0.96%, respectively. This demonstrates that the full combination strategy of base classifiers is not optimal for classification tasks. Furthermore, static selection ensemble strategies such as OSE are not necessarily optimal for classifying individual samples, resulting in a loss of performance gains for the entire dataset. This application addresses this by constructing a "task expert" using low-quality classifiers, providing a customized subset of base classifiers for each sample based on "expert experience," effectively compensating for the shortcomings of OSE. Evaluation metrics show that the method proposed in this application has stronger classification capabilities than OSE-BPNN.
[0069] For the ensemble learning strategies OSE and LQCDS, the training performance of the final classification model is limited by the size of the base classifier pool. In the experiments above, the number of base classifiers was set as the baseline parameter for all ensemble learning algorithms when the classification performance of Bagging ensemble learning reached saturation. However, under this parameter, due to the redundancy problem of base classifiers, the performance gain of the LQCDS strategy for the BPNN classification task may not have reached its limit. Therefore, with the ratio of training set to test set remaining constant, the size of the base classifier pool was successively set to 10, 20, 30, 40, and 50 to test the difference in classification accuracy between Bagging, OSE, and LQCDS algorithms. The experiment was repeated five times, and the classification accuracy was taken as the average of the five trials. The results are shown in Table 3.
[0070] Table 3. Classification accuracy of EGSSD test set with different base classifier pool sizes.
[0071] As shown above, with the increase in the number of base classifiers, the classification accuracy of OSE-BPNN and this application still has room for improvement. When the performance of the Bagging ensemble reaches saturation, the sum of the dissimilarity of the base classifiers in the pool does not reach its maximum, resulting in insufficient training material for the dynamic classifier in the LQCDS strategy, which limits the schedulable range of high-quality base classifiers in sample classification tasks. Therefore, the size of the base classifier pool can be determined based on the maximum dissimilarity that the actual base classifier pool can achieve, which is also applicable to the static selection strategy of OSE.
[0072] 2. Daily load curve classification experiment First, the load dataset ELDD is preprocessed to remove load samples with large-scale missing data collection and to complete the small number of outliers using nearest neighbor interpolation. Second, daily load pattern category labels are obtained by combining Esim-based Spectral Clustering (ESC) and k-medoids clustering. Specifically, after Esim spectral clustering, the nearest load curve clusters to the cluster centers are extracted according to the k-medoids clustering approach, forming a labeled load curve sample set. The optimal number of clusters for daily load curves is determined by the silhouette coefficient (SC). Figure 3 As shown, the load was identified into 5 categories. Based on the k-medoids centroid clustering approach, a total of 16,620 load curves from the 5 categories were selected to construct a labeled load sample set.
[0073] Based on the method provided in this application, a base classifier pool and an LQC discriminator are trained using a labeled payload sample set. The size of the base classifier pool is set to 100 based on experimental experience. The payload dataset is then randomly divided into a meta-training set using stratified sampling at a 4:1 ratio. and test set Two parts. The number of training samples for each category were 7420:3004:568:640:1656, respectively. The BPNN consists of an input layer, hidden layers, and an output layer. The input layer has a feature dimension of 96; hidden layer 1 is a fully connected layer with 96 neurons and uses the Linear Rectification (ReLU) function as its transfer function; hidden layer 2 is a fully connected layer with 24 neurons and uses the ReLU function as its transfer function; and the output layer has a dimension of 5 and uses the sigmoid function as its transfer function. The training sample set was segmented according to the sample splitting ratio used in the EGSSD experiment. , to obtain the corresponding and Then, 100 samples were obtained again using stratified sampling. Using a sample subset of equal size, 100 BPNN classifiers were trained, and the number of training iterations was determined using early stopping. After testing, the classification results of each algorithm on the test set were represented as a confusion matrix, as shown below. Figure 4 As shown, the classification accuracy of the single BPNN classification model is 0.9574, the classification accuracy of the Bagging-BPNN classification model is 0.9718, the classification accuracy of the OSE-BPNN classification model is 0.9784, and the classification accuracy of this application is 0.9851.
[0074] As can be seen from the above, the load classification method considering dynamic selection of low-quality classifiers provided in this application is effective and superior in load classification applications. The classification results for various load curves are as follows: Figure 5 As shown.
[0075] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0076] The following are device embodiments of the present invention. For details not described in detail, please refer to the corresponding method embodiments described above.
[0077] Figure 6 The diagram shows a schematic representation of a load classification device considering dynamic selection of low-quality classifiers according to an embodiment of the present invention. For ease of explanation, only the parts relevant to the embodiment of the present invention are shown, and are described in detail below: like Figure 6 As shown, the load classification device considering dynamic selection of low-quality classifiers includes: The feature extraction module 21 is used to acquire the load data to be classified and determine the target low-quality classifier feature vector of the load data to be classified in the base classifier pool of the Bagging ensemble model. LQC discriminant module 22 is used to input the feature vector of the target low-quality classifier into the trained LQC discriminator to obtain the availability of each base classifier in the base classifier pool. The model update module 23 is used to update the Bagging ensemble model based on the availability of each base classifier in the base classifier pool, so as to obtain the updated Bagging ensemble model. The output module 24 is used to input the load data to be classified into the updated Bagging ensemble model to obtain the load classification results.
[0078] In one possible implementation, the above-described apparatus may further include: The first sample acquisition module is used to acquire the first training sample set; The base classifier pool generation module is used to generate a base classifier pool based on the first training sample set.
[0079] In one possible implementation, the base classifier pool generation module may include: A subset partitioning unit is used to divide the first training sample set into multiple daily load training sample subsets; wherein the number of daily load training sample subsets is the same as the number of base classifiers; The base classifier training unit is used to establish multiple initial classifiers and train each initial classifier using a subset of training samples from each daily load, thereby obtaining multiple base classifiers and forming a base classifier pool.
[0080] In one possible implementation, the above-described apparatus may further include: The second sample acquisition module is used to acquire the second training sample set; The LQC discriminator label sample set formation module is used to determine the LQC discriminator label sample set based on the second training sample set and the base classifier pool. The LQC discriminator training module is used to train the basic LQC discriminator using the LQC discriminator label sample set to obtain the trained LQC discriminator.
[0081] In one possible implementation, the LQC discriminator label sample set formation module may include: The sample extraction unit is used to add any sample in the second training sample set to the LQC sample set if the consensus of the base classifier pool for classifying the sample is lower than a preset threshold. The label sample generation unit is used to determine the set of low-quality classifier feature vectors of the base classifier pool for any sample in the LQC sample set, and obtain the LQC label of the sample. The low-quality classifier feature vectors and the LQC label of the sample form the label sample corresponding to the sample. The sample set output unit is used to form the label sample set of the LQC discriminator by taking the label samples corresponding to each sample in the LQC sample set.
[0082] In one possible implementation, the label sample generation unit can be specifically used for: 1. Based on the first formula, determine the subset of hard classification results, subset of posterior probability classification results, subset of local classification accuracy, subset of output distribution, and subset of classifier confidence for this sample; 2. The subsets of hard classification results, posterior probability classification results, local classification accuracy, output distribution, and classifier confidence are used to form the low-quality classifier feature vector set of the base classifier pool for this sample. The first formula may include:
[0083]
[0084]
[0085]
[0086]
[0087]
[0088] in, For the subset of hard classification results, For the first sample The nearest neighbor samples, For the first One base classifier, for exist The classification results in The number of base classifiers; This is a subset of the posterior probability classification results; for through The probability of belonging to a label category after a decision; A subset of local classification accuracy; To output a subset of the distribution, The output distribution feature vector is closest to this sample. A sample set, for The first in One element; For the classifier confidence subset, for neuron activation functions, for The network weights, for Threshold parameter, and They are respectively arrive The maximum and minimum values of the decision boundary distance; For this sample, for Pattern category labels.
[0089] In one possible implementation, the above-described apparatus may further include: The data acquisition module is used to acquire daily load data from multiple users, and to cluster the daily load data of multiple users to obtain multiple clusters; The data filtering module is used to identify the data in any given cluster that is closest to the cluster center, and to add the data closest to the cluster center as training samples to the user's daily load training sample set. The training sample set formation module is used to divide the user daily load training sample set into a first training sample set and a second training sample set according to a preset ratio.
[0090] In one possible implementation, the data filtering module can be specifically used for: 1. For any data point in the cluster, use the second formula to determine the sum of the feature space distances between the data point and other data points in the cluster; 2. The data corresponding to the smallest sum of feature spatial distances among all feature spatial distances is taken as the data closest to the cluster center of the cluster. The second formula may include:
[0091]
[0092] in, and They are the first in the cluster. The data and the first One data point; and They are respectively and The Dimensional attribute values; For data dimensions, For dimension Attribute weights; The first in the cluster The data and the first Distance metric between data points The first in the cluster The sum of the feature space distances between each data point and other data points.
[0093] Figure 7 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. For example... Figure 7 As shown, the electronic device 3 of this embodiment includes a processor 30 and a memory 31. The memory 31 stores a computer program 32. When the processor 30 executes the computer program 32, it implements the steps in the various method embodiments described above. Alternatively, when the processor 30 executes the computer program 32, it implements the functions of each module / unit in the various device embodiments described above.
[0094] For example, computer program 32 may be divided into one or more modules / units, which are stored in memory 31 and executed by processor 30 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 32 in electronic device 3.
[0095] Electronic device 3 may include, but is not limited to, processor 30 and memory 31. Those skilled in the art will understand that... Figure 7 This is merely an example of electronic device 3 and does not constitute a limitation on electronic device 3. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 3 may also include input / output devices, network access devices, buses, etc.
[0096] For the sake of simplicity and clarity, only the above-described functional modules / units are used as examples. In practical applications, the functions described above can be assigned to different functional modules / units as needed. These modules / units can be implemented in hardware, software, or a combination of both.
[0097] In the above embodiments, the descriptions of each embodiment have their own emphasis. Parts not detailed or described in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Unless otherwise specified or in conflict with logic, the terminology and / or descriptions between different embodiments are consistent and can be referenced interchangeably. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.
[0098] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A load classification method considering dynamic selection of low-quality classifiers, characterized in that, include: Obtain the load data to be classified, and determine the target low-quality classifier feature vector of the base classifier pool in the Bagging ensemble model for the load data to be classified; The feature vector of the target low-quality classifier is input into the trained LQC discriminator to obtain the availability of each base classifier in the base classifier pool. Based on the availability of each base classifier in the base classifier pool, the Bagging ensemble model is updated to obtain the updated Bagging ensemble model; The load data to be classified is input into the updated Bagging ensemble model to obtain the load classification result.
2. The load classification method considering dynamic selection of low-quality classifiers according to claim 1, characterized in that, The method further includes: Obtain the first training sample set; The base classifier pool is generated based on the first training sample set.
3. The load classification method considering dynamic selection of low-quality classifiers according to claim 2, characterized in that, The step of generating the base classifier pool based on the first training sample set includes: The first training sample set is divided into multiple daily load training sample subsets; wherein the number of the daily load training sample subsets is the same as the number of the base classifiers; Multiple initial classifiers are established, and each initial classifier is trained using a subset of training samples from each daily load, resulting in multiple base classifiers, forming the base classifier pool.
4. The load classification method considering dynamic selection of low-quality classifiers according to claim 2, characterized in that, The method further includes: Obtain the second training sample set; Based on the second training sample set and the base classifier pool, determine the LQC discriminator label sample set; The basic LQC discriminator is trained using the LQC discriminator label sample set to obtain the trained LQC discriminator.
5. The load classification method considering dynamic selection of low-quality classifiers according to claim 4, characterized in that, The step of determining the LQC discriminator label sample set based on the second training sample set and the base classifier pool includes: For any sample in the second training sample set, if the consensus of the base classifier pool on the classification result of the sample is lower than a preset threshold, then the sample is added to the LQC sample set. For any sample in the LQC sample set, determine the set of low-quality classifier feature vectors of the base classifier pool for that sample, and obtain the LQC label of the sample. The low-quality classifier feature vectors and the LQC label of the sample form the label sample corresponding to the sample. The label samples corresponding to each sample in the LQC sample set form the LQC discriminator label sample set.
6. The load classification method considering dynamic selection of low-quality classifiers according to claim 5, characterized in that, The step of determining the set of low-quality classifier feature vectors for this sample by the base classifier pool includes: Based on the first formula, the subsets of hard classification results, posterior probability classification results, local classification accuracy, output distribution, and classifier confidence for this sample are determined. The subset of hard classification results, the subset of posterior probability classification results, the subset of local classification accuracy, the subset of output distribution, and the subset of classifier confidence form the low-quality classifier feature vector set of the base classifier pool for this sample. The first formula includes: in, This is a subset of the hard classification results. For the first sample The nearest neighbor samples, For the first One base classifier, for exist The classification results in The number of base classifiers; This is a subset of the posterior probability classification results; for through The probability of belonging to a label category after a decision; This is a subset of the local classification accuracy. For the output distribution subset, The output distribution feature vector is closest to this sample. A sample set, for The first in One element; For the confidence subset of the classifier, for neuron activation functions, for The network weights, for Threshold parameter, and They are respectively arrive The maximum and minimum values of the decision boundary distance; For this sample, for Pattern category labels.
7. The load classification method considering dynamic selection of low-quality classifiers according to claim 4, characterized in that, The method further includes: Acquire daily load data from multiple users, and cluster the daily load data of the multiple users to obtain multiple clusters; For any given cluster, determine the data that is closest to the cluster center of that cluster, and use the data that is closest to the cluster center as a training sample to add to the user daily load training sample set; The user daily load training sample set is divided into the first training sample set and the second training sample set according to a preset ratio.
8. The load classification method considering dynamic selection of low-quality classifiers according to claim 7, characterized in that, The data used to determine the cluster center closest to the cluster in the cluster includes: For any data point in the cluster, the sum of the feature space distances between that data point and other data points in the cluster is determined by combining the second formula. The data corresponding to the smallest sum of feature spatial distances among all feature spatial distances is taken as the data that is closest to the cluster center of the cluster. The second formula includes: in, and They are the first in the cluster. The data and the first One data point; and They are respectively and The Dimensional attribute values; For data dimensions, For dimension Attribute weights; The first in the cluster The data and the first Distance metric between data points The first in the cluster The sum of the feature space distances between each data point and other data points.
9. A load classification device considering dynamic selection by a low-quality classifier, characterized in that, include: The feature extraction module is used to acquire the payload data to be classified and determine the target low-quality classifier feature vector of the base classifier pool in the Bagging ensemble model for the payload data to be classified. The LQC discriminant module is used to input the feature vector of the target low-quality classifier into the trained LQC discriminant to obtain the availability of each base classifier in the base classifier pool. The model update module is used to update the Bagging ensemble model based on the availability of each base classifier in the base classifier pool, so as to obtain the updated Bagging ensemble model. The result output module is used to input the load data to be classified into the updated Bagging ensemble model to obtain the load classification result.
10. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the load classification method considering dynamic selection of low-quality classifiers as described in any one of claims 1 to 8.