Classification model training method and device, classification method and device, electronic equipment and program product
By negatively correlated sample weights with the probability of correct classification during training, and by combining kernel mapping rules and gradient boosting algorithms to optimize feature weights, the bias problem of classification models in the case of class imbalance is solved, the focus on difficult-to-classify samples is improved, and the classification effect is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-24
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technologies apply the same level of focus to samples of all categories during training, which causes the classification model to favor the category with more samples when there is a class imbalance, resulting in limited learning performance for the category with fewer samples.
By negatively correlated sample weights with the probability of a sample being correctly classified, especially giving higher weights to difficult-to-classify samples and lower weights to easy-to-classify samples, and combining kernel mapping rules to differentiate between different types of features, the gradient boosting algorithm is used to determine the importance weights of features, and a swarm intelligence algorithm is used to optimize hyperparameters.
It improves the classification performance of the classification model for samples of various categories, especially for categories with a small number of samples but high classification difficulty, thereby improving the prediction accuracy of the classification model.
Smart Images

Figure CN121743876A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of machine learning, and in particular, to a classification model training method, a classification method, an apparatus, an electronic device, and a program product. BACKGROUND
[0002] Machine learning techniques have been widely applied in various data processing and classification tasks. In a classification task, a classification model is usually trained based on labeled training data, so that the classification model can learn the mapping relationship between data features and classification labels, and then make classification prediction on new data.
[0003] In practical applications, the data used for training can exhibit different distribution characteristics.
[0004] The content described in the background is only to facilitate the understanding of the related technology in the art, and is not regarded as recognition of the prior art. SUMMARY
[0005] Embodiments of the present disclosure aim to provide a classification model training method, a classification method, an apparatus, an electronic device, and a program product, which can give different degrees of focus to different samples in the training process, thereby improving the classification effect of the classification model on samples of various categories.
[0006] In a first aspect, a classification model training method is provided, comprising:
[0007] Obtaining training data, the training data comprising a plurality of training samples, each training sample comprising a plurality of features and a corresponding classification label;
[0008] Training the classification model based on a preset target optimization logic to obtain a trained classification model, wherein the target optimization logic comprises a prediction error term determined based on a sample weight, and the sample weight is negatively related to the likelihood of the sample being correctly classified.
[0009] In some embodiments, the sample weight and the likelihood of the sample being correctly classified are in an exponential decay relationship.
[0010] In some embodiments, the classification model comprises a plurality of binary classification sub-models corresponding to a plurality of classification categories.
[0011] In some embodiments, the training of the classification model based on the preset target optimization logic comprises differentiating processing different types of features of each training sample using a kernel mapping rule, wherein each binary classification sub-model has a respective kernel mapping rule.
[0012] In some embodiments, the differential processing of different types of features of each training sample using kernel mapping rules includes: processing the nonlinear features of each training sample using a first kernel mapping rule; processing the linear features of each training sample using a second kernel mapping rule; and mixing the mapping results of the first kernel mapping rule and the second kernel mapping rule to obtain a weighted mapping result.
[0013] In some embodiments, the method further includes: modeling the training data using a gradient boosting algorithm to obtain the information gain value of each feature as a prediction contribution; and determining the importance weight of each feature based on the prediction contribution; wherein, the differential processing of different types of features of each training sample using kernel mapping rules further includes: weighting the features of each training sample according to the importance weight of each feature.
[0014] In some embodiments, the step of inputting the training data into a classification model based on a preset target optimization logic for training to obtain a trained classification model includes: using a swarm intelligence algorithm to search for the optimal hyperparameters of the target optimization logic and / or the kernel mapping rule.
[0015] In a second aspect, a classification method is provided, including:
[0016] Obtain data to be classified, which includes multiple features;
[0017] The data to be classified is input into the classification model to obtain the classification result corresponding to the data to be classified. The classification model is trained using the method described in the first aspect.
[0018] In a third aspect, a classification model training device is provided, comprising:
[0019] The acquisition unit is configured to acquire training data, which includes multiple training samples, each training sample including multiple features and corresponding classification labels.
[0020] The training unit is configured to input the training data into a classification model based on a preset target optimization logic for training, thereby obtaining a trained classification model. The target optimization logic includes a prediction error term, which is determined based on sample weights. The sample weights are negatively correlated with the probability that a sample is correctly classified.
[0021] In a fourth aspect, embodiments of this disclosure provide a sorting apparatus, comprising:
[0022] An acquisition unit is configured to acquire data to be classified, wherein the data to be classified includes multiple features;
[0023] A classification unit is configured to input the data to be classified into a classification model to obtain a classification result corresponding to the data to be classified, wherein the classification model is trained using the training method according to the first aspect and / or by the training device according to the third aspect.
[0024] In a fifth aspect, an electronic device is provided, comprising: a processor and a memory storing a computer program, the processor being configured to implement the method as described in the first or second aspect when the computer program is executed.
[0025] In a sixth aspect, a program product is provided, comprising a computer program, wherein the computer program, when executed by a processor, implements the method as described in the first or second aspect.
[0026] The classification model training method in this embodiment trains the model by inputting training data into a classification model based on a preset target optimization logic. The target optimization logic includes a prediction error term, which is determined based on sample weights. The sample weights are negatively correlated with the probability of a sample being correctly classified. According to the scheme of this embodiment, by making the sample weights negatively correlated with the probability of a sample being correctly classified, the training process can be made to focus on different samples with varying degrees of specialization. Therefore, this embodiment enables the training process to focus more on difficult-to-classify samples, thereby improving the classification model's performance across all categories, especially for categories with a small number of samples but high classification difficulty.
[0027] In a further embodiment of this disclosure, by employing a least squares support vector machine model and constructing multiple binary classification sub-models, multi-classification tasks can be effectively handled. In a further embodiment, by utilizing kernel mapping rules to differentiate between different types of features, adaptation can be made to the different characteristics of nonlinear and linear features, thereby improving the effect of feature mapping.
[0028] Other optional features and technical effects of the embodiments of this disclosure are described in part below, and in part will be apparent from reading this document. Attached Figure Description
[0029] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings. The elements shown are not limited to the scale shown in the drawings, and the same or similar reference numerals in the drawings denote the same or similar elements, wherein:
[0030] Figure 1 An exemplary flowchart of a classification model training method according to an embodiment of the present disclosure is shown;
[0031] Figure 2 An exemplary flowchart of a classification model training method according to an embodiment of the present disclosure is shown;
[0032] Figure 3 An exemplary flowchart of a classification model training method according to an embodiment of the present disclosure is shown;
[0033] Figure 4 An exemplary flowchart of a classification method according to an embodiment of the present disclosure is shown;
[0034] Figure 5 An exemplary block diagram of a classification model training apparatus according to an embodiment of the present disclosure is shown;
[0035] Figure 6 An exemplary block diagram of a classification apparatus according to an embodiment of the present disclosure is shown;
[0036] Figure 7 An exemplary structural diagram of an electronic device that can implement the methods according to embodiments of the present disclosure is shown. Detailed Implementation
[0037] To make the objectives, technical solutions, and advantages of this disclosure clearer, the disclosure will be further described in detail below with reference to specific embodiments and accompanying drawings. Here, the illustrative embodiments and descriptions of this disclosure are used to explain this disclosure, but are not intended to limit this disclosure.
[0038] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0039] The user data, data acquisition, and / or use involved in the embodiments of this disclosure strictly comply with the laws, regulations, and industry standards of relevant countries and regions. The collection and acquisition of data involved in the embodiments of this disclosure are all done in advance by actively prompting or prominently displaying information to inform users and obtaining authorization, or by obtaining full authorization from all parties. The processing, manipulation, forwarding, and use of data involved in the embodiments of this disclosure are all carried out on the premise that the user or relevant party is fully informed and authorized. When implementing the embodiments of this disclosure, the types of data or information, scope of use, and usage scenarios that may be involved are informed to users or relevant parties and authorization is obtained through appropriate means. The specific methods of notification and authorization may vary according to actual circumstances, and this disclosure is not limited in this regard. The processing of personal information involved in the embodiments of this disclosure is carried out under the premise of having a legal basis (such as obtaining the consent of the personal information subject or being necessary for the performance of a contract), and is only processed within the prescribed or agreed scope. Sensitive personal information such as biometric information, medical and health information, financial account information, and precise location information involved in the embodiments of this disclosure are all processed under the premise of having a specific purpose and sufficient necessity, and with the separate authorization and consent of the user or relevant party. If, in some embodiments of this disclosure, the user or related party refuses to process personal information other than the information necessary for the basic functions, it will not affect the use of the basic functions of the embodiments of this disclosure.
[0040] The technical solutions of the embodiments of this disclosure will now be described in detail with reference to the accompanying drawings and specific examples.
[0041] As mentioned earlier, machine learning techniques have been widely used in various data processing and classification tasks. In practical applications, the data used for training may exhibit different distribution characteristics.
[0042] In some known classification model training schemes, each training sample is usually given the same level of focus, and the prediction error of all samples is included in the calculation of the objective function in the same way.
[0043] However, this disclosure recognizes that in real-world applications, training data often exhibits an imbalanced distribution, meaning that some classes have a larger number of samples while others have a smaller number. For example, in some classification scenarios, samples that meet certain class criteria may only account for a small percentage of the total sample size. In such an imbalanced situation, if all samples are given the same level of focus, the classification model may be biased towards the class with a larger number of samples during training, while the learning effect on the class with a smaller number of samples will be relatively limited.
[0044] To address this issue, this disclosure provides a classification model training scheme that can differentiate the focus on different samples during training. Specifically, this disclosure makes the sample weights negatively correlated with the probability of the sample being correctly classified, so that difficult-to-classify samples receive higher weights, while easily-classified samples receive lower weights. This allows the training process to focus more on difficult-to-classify samples, improving the classification model's performance across all categories. The classification model training scheme provided by this disclosure is applicable to scenarios such as information allocation, risk identification, and response prediction, as further described below.
[0045] Therefore, this disclosure proposes a classification model training method, and the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings.
[0046] refer to Figure 1 The classification model training method of this disclosure may include steps 110 to 120.
[0047] Step 110: Obtain training data.
[0048] The training data includes multiple training samples, each of which contains multiple features and corresponding classification labels.
[0049] In some embodiments of this disclosure, the training data may be the original dataset used to train a classification model. Each training sample in the training data may be represented as a feature vector, with each dimension of the feature vector corresponding to a different feature attribute. In some embodiments, the features of the training samples may include linear features and / or nonlinear features.
[0050] In some embodiments of this disclosure, classification labels are used to represent the category to which a training sample belongs. In binary classification tasks, the classification label can be either positive or negative. In some examples, a positive classification label indicates that the training sample belongs to the category corresponding to that label, and a negative classification label indicates that the training sample does not belong to the category corresponding to that label. In multi-class classification tasks, the classification label can be one of multiple categories. In some embodiments, each sample in the training data may also include sample labels corresponding to multiple features. Sample labels can represent the category to which a sample belongs and are used for subsequent classification model training. In some embodiments, sample labels can be constructed using a One-Hot encoding method, i.e., the sample label is a K-dimensional vector, where K is the number of categories, each dimension corresponds to one category, and a binary value is used to represent whether the sample belongs to that category. In other embodiments of this disclosure, sample labels can also be constructed using a multi-label encoding method. Specifically, the label can be represented as a K-dimensional vector, where K is the number of categories. In this vector, a value of 1 indicates that the sample belongs to the corresponding category, a value of 0 indicates that the sample does not belong to the corresponding category, and a value of -1 indicates that the sample is not labeled in the corresponding category (i.e., labeling information is missing). During model training, the part marked as -1 can be ignored, and only the labeled category information is used for training. In a specific example, there are 4 categories (K=4). A sample is determined to belong to category 3, but lacks labeling information in category 1. The label of this sample can be encoded as [-1, 0, 1, 0].
[0051] In some embodiments, after acquiring the training data, the training data may be preprocessed. By way of explanation and not limitation, preprocessing may include standardizing the features of each sample in the training data to eliminate the influence of different feature dimensions. In some embodiments, the standardization may take various forms, including but not limited to Z-score normalization, Min-Max normalization, etc. In a specific example, Z-score normalization or Min-Max normalization may be used to scale the feature values to the [0, 1] interval.
[0052] In some embodiments, the training data described above may be a representative subset of samples after sample selection processing, and / or step 110 may include performing sample selection processing. In these embodiments, the representativeness of each sample may be evaluated based on the distribution density and dispersion of the training data in the data space. In these embodiments, such a representative sample selection strategy may be referred to as the Global Representative Selection (GRS) strategy. Accordingly, the representative subset of samples determined by the GRS strategy can be used for subsequent model training.
[0053] Step 120: Input the training data into the classification model based on the preset target optimization logic to train the model and obtain the trained classification model.
[0054] The objective optimization logic includes a prediction error term, which is determined based on sample weights. These sample weights are negatively correlated with the probability of a sample being correctly classified. In some embodiments, the probability of a sample being correctly classified is expressed as the likelihood of correct classification.
[0055] In some embodiments of this disclosure, the classification model can be any machine learning model suitable for classification tasks. In some embodiments, the classification model can be a support vector machine model.
[0056] In some embodiments of this disclosure, the classification model is a least squares support vector machine (LSSVM) model.
[0057] In some embodiments of this disclosure, the classification model includes multiple binary sub-models corresponding to multiple classification categories.
[0058] In some embodiments disclosed herein, by way of explanation and not limitation, LSSVM is an improved form of Support Vector Machine (SVM). Its core improvement lies in transforming the inequality constraints in traditional SVM into equality constraints, thereby transforming the quadratic programming problem into solving a system of linear equations. Specifically, the LSSVM model includes multiple (e.g., K) binary classification sub-models corresponding to multiple (e.g., K) classification categories. In some embodiments, a one-versus-rest (OvR) strategy can be used to transform the multi-class problem into multiple binary classification problems. For K classification categories, K binary classification LSSVM sub-models are constructed, each sub-model corresponding to one classification category. The k-th sub-model is used to determine whether a sample belongs to the k-th classification category, i.e., "belonging to the k-th category" is considered positive, and "not belonging to the k-th category" is considered negative. In the prediction phase, the K sub-models independently judge the data to be classified, outputting K decision values. These decision values can be further converted into classification probabilities to determine the final classification result, as described below.
[0059] In embodiments of this disclosure, an initial LSSVM model is trained using an objective function. By way of explanation and not limitation, the objective function defines the optimization objective for model training, which may include a model complexity term and a prediction error term. The model complexity term controls the model's generalization ability to avoid overfitting; the prediction error term measures the deviation between the model's predicted values and the true labels. In some embodiments of this disclosure, objective optimization logic is used to guide the training process of the classification model. In some embodiments of this disclosure, the objective optimization logic can be represented as an objective function, which defines the optimization objective for model training and may include a model complexity term and a prediction error term; the model complexity term controls the model's generalization ability to avoid overfitting; the prediction error term measures the deviation between the model's predicted values and the true labels. The training process can adjust the model parameters by minimizing the objective function.
[0060] In some embodiments of this disclosure, the target optimization logic includes a prediction error term, which is determined based on sample weights, wherein the sample weights are negatively correlated with the probability that a sample is correctly classified. In some embodiments, the probability that a sample is correctly classified may also be expressed as the prediction confidence of the sample. In some embodiments, the negative correlation with the probability that a sample is correctly classified is manifested in that the sample weights corresponding to difficult-to-classify samples in the training data are higher than the sample weights corresponding to easy-to-classify samples. In embodiments of this disclosure, the difficult-to-classify or easy-to-classify samples relate to the degree of difficulty in correctly classifying the sample.
[0061] In some embodiments of this disclosure, the probability of a sample being correctly classified is expressed as the likelihood of correct classification. Since sample weights are negatively correlated with the probability of correct classification, samples with a high probability of correct classification (i.e., easily classified samples) have relatively low weights, and their contribution to the target optimization logic is relatively low; conversely, samples with a low probability of correct classification (i.e., difficult-to-classify samples) have relatively high weights, and their contribution to the target optimization logic is relatively high. This disclosure recognizes that the classification difficulty of different samples in the training data may vary. Some samples have obvious features, making them easy for the classification model to classify correctly; these samples can be called easily classified samples. Other samples have features that make them more difficult for the classification model to classify correctly; these samples can be called difficult-to-classify samples. As an explanation, and not a limitation, in traditional training methods, easily classified samples and difficult-to-classify samples often contribute the same amount to the objective function used for model training optimization. This objective function includes a prediction error loss term and a model complexity regularization term. In this case, since easily classified samples usually account for a higher proportion, the model training process may be dominated by easily classified samples, while the focus on difficult-to-classify samples may be relatively insufficient. In contrast, the training process of this disclosure embodiment can focus more on difficult-to-classify samples, improving the classification performance of the classification model on these samples. Accordingly, in this embodiment, the prediction error loss term is adjusted in a negative correlation with the difficulty of classifying the sample.
[0062] In a further embodiment, the sample weights exhibit an exponential decay relationship with the probability of a sample being correctly classified. By way of explanation and not limitation, exponential decay means that the sample weights decrease exponentially as the probability of a sample being correctly classified increases. Compared to linear decay, exponential decay allows the weights of high-probability samples to decrease more quickly, thus more effectively suppressing the influence of easily classified samples.
[0063] In a specific example of this disclosure, the basic objective function of the binary sub-model corresponding to the k-th classification category can be expressed as:
[0064]
[0065] The constraints are as follows:
[0066]
[0067] Where K is the total number of categories, Index for classification categories ( =1,2,...,K), each category This corresponds to a binary classifier; N is the total number of training samples, i is the sample index (i=1,2,...,N), and x iThis represents the feature vector of the i-th sample; Indicates whether the i-th sample belongs to the category. ; For the weight vector, This is the weight vector of the k-th binary classifier; For the error term, Let be the error term of the i-th sample in the k-th binary classifier; This refers to the operation of mapping kernel functions to a high-dimensional feature space; k For bias terms; This is the regularization penalty parameter, used to balance model complexity and error tolerance.
[0068] As an explanation, and not a limitation, the probability-sensitive weighting mechanism here manifests as focus loss, which can be used to address class imbalance. Specifically, for easily classified samples (i.e., samples with a high probability of being correctly classified), their weight in the objective function is reduced; for difficult-to-classify samples (i.e., samples with a low probability of being correctly classified), their weight in the objective function is increased. Through this mechanism, the model can focus more on those difficult-to-classify samples during training, especially the boundary samples in the minority class, thereby improving the prediction accuracy for the minority class.
[0069] In practice, training data often suffers from class imbalance. For example, in multi-class classification scenarios, the number of samples in different classes may differ significantly, resulting in some classes having far fewer positive samples than negative samples. If a standard objective function is used directly for training, the model will tend to favor the majority class (the class with the largest sample size), leading to lower prediction accuracy for the minority class. Therefore, introducing a sample weighting mechanism based on the negative correlation (more specifically, an exponentially decaying relationship) between the probability of a sample being correctly classified can effectively solve this problem.
[0070] In a more specific embodiment, a probability-sensitive weight can be introduced into the error term. In one example, the probability-sensitive weight is a probability-sensitive weight, resulting in a prediction error term that is negatively correlated with (more specifically, exponentially decaying) the probability that the sample is correctly classified.
[0071] In a specific example, the weighted error term of the i-th sample in the k-th binary sub-model It can be expressed by the following formula:
[0072]
[0073] Where, x i This represents the feature vector of the i-th sample. For sample x iThe probability of being correctly classified by the k-th binary sub-model; β is the decay factor.
[0074] In some embodiments, β ranges from 1 to 5. By way of explanation and not limitation, a larger β value indicates a higher degree of focus on hard-to-classify samples, that is, a greater weight amplification of hard-to-classify samples.
[0075] In this embodiment of the disclosure, the "exponential decay relationship" means that the sample weight decreases exponentially as the probability of the sample being correctly classified increases. Specifically, the higher the probability p-value of the sample being correctly classified (the easier it is for the sample to be correctly classified), the higher the probability-sensitive weight (1-p). β The smaller the value, the more exponentially it decays.
[0076] In a specific example, if a sample has a probability of being correctly classified under the current model of 0.9 (meaning the sample is easy to classify), and β=2, then the weight of the sample is (1-0.9). 2 =0.01, meaning the sample's contribution to the error term is significantly reduced. Conversely, if the probability of a sample being correctly classified is 0.3 (indicating the sample is difficult to classify), then the sample's weight is (1-0.3). 2 =0.49, thus having a higher weight, making the model more focused on the difficult-to-classify sample during training.
[0077] In some embodiments of this disclosure, by incorporating the aforementioned probability-sensitive weights into the prediction error term of the objective function, an improved objective function can be obtained:
[0078]
[0079] As an explanation rather than a limitation, the improved objective function can effectively suppress the loss contribution of easily classified samples, allowing the model to focus on optimizing difficult-to-classify samples and minority class samples, thereby solving the class imbalance problem and improving the prediction accuracy of difficult-to-classify samples.
[0080] In some embodiments, the step of inputting training data into a classification model based on a preset target optimization logic for training includes: using kernel mapping rules to differentiate features of different types for each training sample, wherein each binary classification sub-model has its own kernel mapping rule. In some embodiments of this disclosure, the LSSVM classification model includes kernel mapping rules, which are used to differentiate features of different types.
[0081] As an explanation, and not a limitation, the LSSVM classification model itself includes kernel mapping rules, and the classification model comprises multiple binary sub-models corresponding to multiple classification categories. Therefore, each binary sub-model uses the same kernel mapping rule infrastructure. However, due to differences in the sample distribution faced by different binary sub-models or differences in the training process, the weighted mapping results may differ. Consequently, each sub-model will also exhibit differences in parameters such as the importance weights of features for each training sample; for example, the weighted importance weights of features may vary among the binary sub-models.
[0082] In some embodiments, the kernel mapping rule is a hybrid kernel mapping rule, wherein the hybrid kernel mapping rule processes features in the following manner: performing a first kernel mapping process on nonlinear features; performing a second kernel mapping process on linear features; and performing a hybrid process on the nonlinear features processed by the first kernel mapping and the linear features processed by the second kernel mapping. In one specific embodiment, the first kernel mapping rule is a radial basis function (RBF), and the second kernel mapping rule is a polynomial kernel function.
[0083] By way of explanation and not limitation, kernel mapping rules are a core component of support vector machines (SVMs). Their function is to map samples in the input space to a high-dimensional feature space, making linearly inseparable data in the original input space linearly separable in the high-dimensional space. In the embodiments of this disclosure, a hybrid kernel mapping rule capable of handling nonlinear and linear features is used, improving computational efficiency while maintaining effective sample mapping. For example, for nonlinear features (such as complex behavioral patterns, nonlinear rating features, etc.), a first kernel mapping rule (such as a radial basis function kernel) can effectively capture their nonlinear relationships; for linear features (such as ordered numerical features), a second kernel mapping rule (such as a polynomial kernel function) can model their linear or low-order nonlinear relationships while maintaining computational efficiency.
[0084] In some embodiments, the first kernel mapping rule and / or the second kernel mapping rule include an importance-weighted combination of their respective features; and the importance weights of each feature in the first kernel mapping rule and / or the second kernel mapping rule can be determined based on the prediction contribution (such as information gain).
[0085] In some embodiments, the features processed by the first kernel mapping rule and / or the second kernel mapping rule are dimensionality-reduced features filtered based on predicted contribution (such as information gain).
[0086] refer to Figure 2 In some embodiments, the method further includes the following steps 210 to 230:
[0087] Step 210: Determine the predictive contribution of each feature based on the training data.
[0088] In some embodiments of this disclosure, the prediction contribution can be used to measure the role or degree of contribution of each feature to the final prediction result of the classification model.
[0089] In some embodiments of this disclosure, step 210 may include: modeling the training data using a gradient boosting algorithm to obtain the information gain value of each feature as the prediction contribution. In these embodiments, the gradient boosting algorithm can be used to determine the prediction contribution of each feature. By way of explanation and not limitation, the gradient boosting algorithm is an ensemble learning method that can effectively evaluate the contribution of each feature to the prediction result.
[0090] In one specific embodiment of this disclosure, the LightGBM (Lightweight Gradient Boosting Machine) algorithm can be used for multi-class classification modeling, thereby calculating and outputting the predicted contribution to determine feature importance. By way of explanation and not limitation, LightGBM is an improved version of the traditional gradient boosting algorithm, which improves computational efficiency through techniques such as histogram algorithms, mutually exclusive feature bundling, and leaf-first growth strategies.
[0091] In some embodiments of this disclosure, the prediction contribution is information gain, which is based on feature splitting and used to quantify the direct improvement of a feature on model performance. Therefore, the information gain value for each feature can be calculated and output, reflecting the prediction contribution of the corresponding feature; the higher the information gain value, the greater the contribution of the feature to the prediction result. In other embodiments of this disclosure, other types of gradient boosting algorithms, such as conventional gradient boosting or XGBoost (extreme gradient boosting), can also be used to determine the prediction contribution of a feature, and the use of other types of prediction contributions falls within the scope of this disclosure.
[0092] Accordingly, the predicted contribution (e.g., information gain) determined by the above method in the embodiments of this disclosure can be used for kernel mapping rule parameter optimization and feature selection.
[0093] Step 220: Determine the importance weights of each feature in the kernel mapping rule of the classification model based on the predicted contribution.
[0094] In some embodiments, importance weights can be assigned to each feature in the kernel mapping rule of a classification model (such as an LSSVM model) based on the predicted contribution. In embodiments of this disclosure, the kernel mapping rule can take the form of a hybrid kernel mapping rule including multiple sub-kernel mapping rules, and may include a weighted combination of the importance of features from each sub-kernel mapping rule. In a preferred embodiment of this disclosure, the kernel mapping rule used is a hybrid kernel mapping rule, which includes a hybrid processing of a first kernel mapping rule for handling nonlinear features and a second kernel mapping rule for handling linear features. Accordingly, first and / or second importance weights for each feature of the first kernel mapping rule and / or the second kernel mapping rule can be determined based on the predicted contribution (such as information gain).
[0095] Step 230: Filter out features whose prediction contribution is lower than a preset threshold, and use the filtered features as the features processed by the kernel mapping rule of the classification model.
[0096] In some embodiments of this disclosure, an optional step 230 may also be included, which may filter the features of the input classification model, more specifically the features used for kernel mapping rules (e.g., the first kernel mapping rule and / or the second kernel mapping rule), thereby filtering out redundant features with low prediction contribution, such as information gain below a preset threshold, in order to reduce noise interference and the risk of dimensionality explosion of kernel mapping rules.
[0097] In some embodiments of this disclosure, a preset threshold for the predicted contribution can be set as needed, and features with a predicted contribution lower than this threshold are identified as redundant features and filtered out. In a specific example, the predicted contribution uses a gain value, and the preset threshold is set to 0.05, i.e., features with a gain less than 0.05 are filtered out. It is understood that the above-mentioned preset threshold can be adjusted according to the actual application scenario and data characteristics, and this disclosure does not impose any limitations on it.
[0098] In some specific examples, the features of the training data can be represented as an N×D matrix, where N is the number of samples and D is the feature dimension. In this embodiment, the original N×D feature matrix after filtering can be reduced to an N×M matrix, where N is the number of samples, M is the number of input features retained after removing redundant features, and M < D. Therefore, this dimensionality reduction not only reduces computational complexity but also improves the model's training efficiency and prediction accuracy.
[0099] The method of differentiating different types of features of each training sample using kernel mapping rules further includes: weighting the features of each training sample according to the importance weight of each feature. In some embodiments of this disclosure, the weighting process may include: multiplying each feature by its corresponding importance weight during the calculation of the kernel mapping rules.
[0100] refer toFigure 3 In some embodiments, the step of differentiating different types of features of each training sample using kernel mapping rules may include the following steps 310 to 330:
[0101] Step 310: Process the nonlinear features of each training sample using the first kernel mapping rule;
[0102] In some embodiments, the first kernel mapping rule is a radial basis kernel mapping rule.
[0103] In a specific example, when the first kernel function is a radial basis function (RBF), the radial basis function... It can be represented as:
[0104]
[0105] Where F is the number of nonlinear features; Features Importance weights (as described in step 220 above, can be determined based on the predictive contribution of the features); and Representing samples respectively and The A nonlinear eigenvalue, η f The importance weight of the f-th nonlinear feature; Kernel function weights; Indicates sample and The squared Euclidean distance over the f-th feature.
[0106] In this specific example, the aforementioned nonlinear feature could also be a feature filtered based on predicted contribution.
[0107] As an explanation, the radial basis function (RBF) is suitable for nonlinear features. Based on radial symmetry, it solves the problem of linear inseparability in low-dimensional space by calculating the Euclidean distance between input vectors and mapping it to a higher-dimensional space. While the first kernel function described above is the RBF, other forms of first kernel functions for handling nonlinear features can be considered.
[0108] Step 320: Process the linear features of each training sample using the second kernel mapping rule;
[0109] In some embodiments, the second kernel mapping rule is a polynomial kernel mapping rule.
[0110] In a specific example, when the second kernel function is a polynomial kernel function, the polynomial kernel function It can be represented as:
[0111]
[0112] Where M is the total number of features and MF is the number of linear features; The importance weights for feature h; Indicates sample x i With sample x j The inner product of the eigenvectors; For constant terms; Let be the order of the polynomial.
[0113] In this specific example, the linear feature example mentioned above is also a feature filtered based on predicted contribution.
[0114] As an explanation, the polynomial kernel function is suitable for low-dimensional ordered features, as it can model polynomial relationships between features while reducing computational overhead. Although the second kernel function was described above as a polynomial kernel function, it is conceivable that other forms of second kernel functions can be used to process linear features.
[0115] Step 330: Mix the mapping results of the first kernel mapping rule and the second kernel mapping rule.
[0116] Accordingly, in this specific example, a hybrid kernel function can be used for hybrid weighting, and the hybrid kernel function can be expressed as:
[0117]
[0118] in, For polynomial kernel functions, For radial basis kernel functions, These are mixed weight parameters.
[0119] Furthermore, in some embodiments, the differential processing of different types of features of each training sample using kernel mapping rules also includes: weighting the features of each training sample according to the importance weights of each feature, such as the importance weights shown in the aforementioned specific examples. , .
[0120] In some embodiments, the step of inputting training data into a classification model based on a preset target optimization logic to obtain a trained classification model includes: using a swarm intelligence algorithm to search for the optimal hyperparameters of the model, such as the optimal hyperparameters of the target optimization logic and / or kernel mapping rules.
[0121] In some embodiments of this disclosure, the optimal hyperparameters include at least one of the following: regularization penalty parameter C, decay factor β, kernel mapping bandwidth parameter γ, polynomial order d, and mixed weight parameter θ.
[0122] As an explanation, hyperparameters are parameters that need to be pre-set before model training, and their values affect the training effect of the model. In traditional methods, the selection of hyperparameters usually requires a lot of manual experimentation and empirical adjustment. The embodiments of this disclosure utilize swarm intelligence algorithms for automated search, which can find the optimal or near-optimal combination of hyperparameters in the hyperparameter space, thereby improving the performance of the model.
[0123] Preferably, the swarm intelligence algorithm includes the Grey Wolf Optimization (GWO) algorithm, which simulates the social hierarchy and hunting behavior of grey wolves. In the GWO algorithm, candidate parameter combinations are treated as individuals within the wolf pack, and are ranked according to their fitness (e.g., the model's performance on the validation set). The highest-ranking wolves (α, β, δ wolves) guide other wolves to update their positions, thereby gradually moving the entire wolf pack closer to the optimal solution.
[0124] In one specific embodiment, when using the GWO algorithm, the search process may include:
[0125] 1) Initialization: Randomly generate a gray wolf population, with each wolf representing a set of hyperparameter combinations (C, β, γ, d, θ). The population size can be set as needed, for example, from 20 to 50.
[0126] 2) Fitness Evaluation: For each set of hyperparameters, an LSSVM model is trained using the training data, and the model performance is evaluated on the validation set. In some embodiments, the fitness function may use metrics such as the mean squared error of cross-validation (RMSE), classification accuracy, and F1 score. For explanation, a higher fitness value indicates a better set of hyperparameters.
[0127] 3) Hunting Mechanism: Based on fitness ranking, the top three wolves are selected as α, β, and δ wolves (lead wolves). Other wolves (ω wolves) update their positions based on the positions of these three leader wolves, i.e., adjusting their hyperparameter values. The position update formula simulates the encirclement and pursuit behavior of the wolf pack.
[0128] 4) Iterative optimization: Repeat steps 2 and 3, and after multiple iterations (e.g., 50 to 200 rounds), the wolf pack gradually converges to the optimal hyperparameter combination.
[0129] 5) Convergence condition: When the maximum number of iterations is reached, or the fitness change is less than the preset threshold, the algorithm stops and outputs the current optimal combination of hyperparameters.
[0130] In a specific example, the Grey Wolf Optimization Algorithm is used to search for hyperparameters, with a population size of 30 and a maximum number of iterations of 100. The parameter search range is: C∈[0.1, 100], β∈[1, 5], γ∈[0.001, 10], d∈[1, 5], θ∈[0, 1]. The fitness function is the average F1 score from 5-fold cross-validation. After 100 iterations, the algorithm converges to a set of optimal hyperparameters: C=10.5, β=2.3, γ=0.85, d=3, θ=0.6.
[0131] As an explanation, the Particle Swarm Optimization (PSO) algorithm simulates the collective behavior of flocks of birds or schools of fish. Each particle represents a candidate combination of parameters, and the particle moves in the search space, its velocity and position influenced by both its historical best position and the global best position, thus achieving the search for the optimal solution. The process of searching for optimal hyperparameters based on the PSO algorithm will not be elaborated here.
[0132] As an explanation, the genetic algorithm (GA) simulates the selection, crossover, and mutation mechanisms in biological evolution. Candidate parameter combinations are encoded as chromosomes, and through operations such as selecting superior individuals, generating new individuals through crossover, and increasing diversity through random mutation, the population evolves generation by generation, eventually converging to the optimal or near-optimal solution. The process of searching for optimal hyperparameters based on the genetic algorithm will not be elaborated here.
[0133] Here, through the automated search of swarm intelligence algorithms, high-quality hyperparameter combinations can be found within a reasonable time, significantly improving model performance while avoiding the subjectivity and inefficiency of manual parameter tuning.
[0134] The classification model training method and classification method provided in this disclosure can be applied to various classification scenarios. The following will describe several specific application scenarios.
[0135] In some embodiments of this disclosure, classification labels correspond to matching categories, and classification models are used to determine the matching category between information and candidate recipients.
[0136] In this application scenario, classification model training methods can be used to train an information matching model. Specifically, training data can include features of historical information and corresponding matching result labels. The trained information matching model can be used to determine the degree of matching between new information and each candidate receiver, thereby assigning the information to the most suitable receiver.
[0137] In an interpretive and not restrictive sense, in the information allocation scenario, information can be the application information of a resource applicant, candidate recipients can be multiple resource providers, and matching categories can indicate the degree of matching between the information and each resource provider (e.g., high match, low match). In this scenario, resources can be various forms of allocable resources such as digital assets, digital virtual resources, and service quotas.
[0138] In a specific example of this application scenario, a binary sub-model can be built for each candidate receiver. This sub-model is used to determine whether the information matches the candidate receiver. Thus, for K candidate receivers, K binary sub-models can be built, forming a one-vs-rest multi-classification structure.
[0139] In this application scenario, the class imbalance problem manifests as follows: for each binary sub-model, the proportion of information actually received (positive class) by the candidate receiver is usually much smaller than the proportion of information not received (negative class). This embodiment of the present disclosure, through an adaptive sample weighting mechanism, enables the training process to focus more on positive class samples, thereby improving the binary sub-model's ability to identify positive class samples.
[0140] In this application scenario, the features in the training data can include: user-related features (such as resource requesters): basic user information (such as age, gender, region, occupation, etc.), resource usage risk-related information (such as resource usage risk score, historical resource acquisition records, etc.), behavioral features (such as platform usage frequency, browsing behavior, etc.), and resource reserve status (such as income level, asset status, etc.). In some embodiments, in the resource matching information allocation scenario, user features can also include information related to the resource demand, such as resource acquisition quantity, resource acquisition period, and resource return capability.
[0141] In this application scenario, hybrid kernel mapping rules can be used to differentiate between different types of features. For example, historical behavior features and interaction features may exhibit complex nonlinear relationships, making radial basis kernel functions suitable; while basic attribute features and category features may exhibit relatively simple linear relationships, making multinomial kernel functions suitable.
[0142] In this application scenario, swarm intelligence algorithms (such as the Grey Wolf Optimization Algorithm) can be used to optimize the model's hyperparameters. Specifically, regularization penalty parameters, decay factors, kernel mapping parameters, etc., can be used as hyperparameters to be optimized. The optimal combination of hyperparameters can be searched using swarm intelligence algorithms to improve the overall performance of the information matching model.
[0143] Therefore, in information matching and classification application scenarios, the embodiments of this disclosure can construct a targeted classification model for each candidate recipient and solve the class imbalance problem through an adaptive sample weighting mechanism, thereby improving the accuracy of information matching with recipients and optimizing the efficiency of information allocation.
[0144] In some embodiments of this disclosure, the classification labels correspond to risk level categories, and the classification model is used to classify the target object according to its risk level.
[0145] In this application scenario, the classification model training method can be used to train a risk classification model. Specifically, the training data can include feature information of historical target objects and their corresponding risk level labels. The trained risk classification model can then be used to predict the risk level of new target objects.
[0146] In the context of resource allocation, and not as a limitation, the target entity can be the resource applicant, and the risk level can be the resource applicant's risk level in resource usage. In this scenario, resources can be various forms of allocable resources, such as digital assets, digital virtual resources, points, quotas, etc. The resource applicant can be an individual or entity requesting access to resources. The risk level is used to assess the likelihood that the resource applicant will use or return the resources as agreed upon after obtaining them.
[0147] In a specific example of this application scenario, the risk level can include two categories: low risk and high risk. The low-risk category corresponds to resource applicants who use or return resources normally as agreed; the high-risk category corresponds to resource applicants who have a risk of default or abnormal use.
[0148] In this application scenario, the class imbalance problem is particularly prominent. For illustrative purposes, and not restrictive, in actual resource allocation operations, most resource requesters belong to the low-risk category, while the proportion of high-risk resource requesters is relatively small. If known training methods are used to give each sample the same level of focus, the trained classification model may be biased towards predicting the low-risk category, with relatively weaker ability to identify the high-risk category.
[0149] This embodiment of the disclosure achieves a higher degree of focus on high-risk category samples during training by negatively correlated sample weights with the probability of a sample being correctly classified. Specifically, high-risk category samples, due to their smaller proportion, typically have a lower probability of being correctly classified in the early stages of training, thus receiving higher sample weights. This allows the training process to focus more on these difficult-to-classify samples. Consequently, the trained risk classification model can better identify high-risk category resource applicants, improving the accuracy of risk management.
[0150] In this application scenario, the features in the training data can include: basic attribute features of the resource applicant, such as the region, registration duration, and activity level; historical behavior features of the resource applicant, such as historical resource usage records, resource return status, and activity participation; related features of the resource applicant, such as the risk status of related objects and social network features; and relevant features of the resource application, such as the type of resource applied for, the number of resources, and the application frequency.
[0151] In this application scenario, features can include both nonlinear and linear features. For example, historical behavioral features may exhibit a complex nonlinear relationship with risk levels, making them suitable for processing using a first kernel mapping rule (such as a radial basis function); while basic attribute features may exhibit a relatively simple linear relationship with risk levels, making them suitable for processing using a second kernel mapping rule (such as a polynomial kernel function). By using a hybrid processing approach, information from both types of features can be effectively utilized simultaneously.
[0152] Therefore, in risk level classification application scenarios, the embodiments of this disclosure can effectively solve the problem of category imbalance, improve the identification accuracy of a few categories (high-risk categories), thereby helping resource providers to more accurately assess the risk status of resource applicants and reduce the risk of default in resource allocation.
[0153] In some embodiments of this disclosure, classification labels correspond to response predictions, and classification models are used to predict the category of a target object's response to a specific event. In some embodiments, response predictions may include, for example, marketing feedback on services or products.
[0154] In this application scenario, classification model training methods can be used to train response prediction models. Specifically, training data can include feature information of historical target objects and corresponding response labels (such as whether a response is received, response type, etc.). The trained response prediction model can then be used to predict responses to new target objects.
[0155] In a marketing context, the target audience can be potential customers, the specific event can be a marketing campaign, and the response category can be how customers respond to the marketing campaign (such as whether they buy, click, or convert).
[0156] In a specific example of this application scenario, the response category can include two categories: "will respond" and "will not respond". The "will respond" category corresponds to the target audience that will respond positively to the marketing campaign (such as purchasing, registering, converting, etc.); the "will not respond" category corresponds to the target audience that will not respond positively to the marketing campaign.
[0157] In this application scenario, the class imbalance problem also exists. As an explanation, and not a limitation, in actual marketing campaigns, most target audiences will not respond positively to the campaign, while the proportion of those who will respond is relatively small. If some known training methods are used, the resulting response prediction model may be biased towards predicting the "no response" category, with relatively weak ability to identify the "response" category, leading to a waste of marketing resources.
[0158] This embodiment of the disclosure achieves a higher degree of focus on samples in the "will respond" category during training by negatively correlated sample weights with the probability of a sample being correctly classified. Consequently, the trained response prediction model can more accurately identify target audiences who may respond to marketing campaigns, improving marketing precision and conversion rates.
[0159] In this application scenario, the features in the training data can include: demographic features of the target audience, such as age group, gender, and geographic location; behavioral features of the target audience, such as historical purchasing behavior, browsing behavior, and interaction behavior; preference features of the target audience, such as category preference, price sensitivity, and channel preference; and relevant features of the marketing campaign, such as campaign type, discount level, and distribution channels.
[0160] In this application scenario, gradient boosting algorithms (such as the LightGBM algorithm) can be used to model the training data, obtain the information gain value of each feature as the prediction contribution, and determine the importance weight of each feature based on the prediction contribution. This allows for the identification of the most valuable features for response prediction, providing guidance for subsequent feature engineering and model optimization.
[0161] Therefore, in response prediction classification application scenarios, the embodiments of this disclosure can effectively solve the class imbalance problem, improve the recognition accuracy of a few categories ("response" category), thereby helping marketing decisions to be more accurate and improving the return on investment of marketing activities.
[0162] Those skilled in the art will understand that the classification model training method and classification method provided in the embodiments of this disclosure can also be applied to other classification scenarios with class imbalance problems, including but not limited to: fraud detection: identifying fraudulent behavior in transactions, where fraudulent samples usually account for a small proportion; anomaly detection: identifying abnormal states in system operation, where abnormal states usually account for a small proportion; medical diagnosis: identifying positive cases of diseases, where positive cases account for a small proportion in certain diseases; fault prediction: predicting the fault state of equipment, where fault states usually account for a small proportion; content moderation: identifying illegal content, where illegal content usually accounts for a small proportion.
[0163] In the above application scenarios, by making the sample weights negatively correlated with the probability of the sample being correctly classified, the training process can be made to focus more on samples of the minority categories, thereby improving the classification model's ability to identify the minority categories.
[0164] In the classification model training method of this disclosure, by negatively correlated sample weights with the probability of a sample being correctly classified, a differentiated focus can be applied to different samples during training. Specifically, for easily classified samples with a high probability of being correctly classified, their sample weights are relatively low, and the training process focuses less on these samples; conversely, for difficult-to-classify samples with a low probability of being correctly classified, their sample weights are relatively high, and the training process focuses more on these samples. Therefore, this disclosure enables the training process to focus more on difficult-to-classify samples, thereby improving the classification model's performance across different categories.
[0165] Therefore, this disclosure, through a machine learning classification model, mines and analyzes the inherent correlations in the training data that conform to the natural laws of imbalanced classification tasks. It employs techniques such as introducing a weight mechanism negatively correlated with the probability of a sample being correctly classified into the prediction error term of the target optimization logic, and performing differentiated kernel mapping on nonlinear and linear features. These techniques solve the technical problem of improving the reliability of classification model training in imbalanced classification tasks, and achieve the technical effects of making the training process more focused on difficult-to-classify samples and minority class samples, improving the quality of classification boundaries through differentiated feature kernel mapping, and effectively solving the problem of imbalanced class distribution. In information allocation scenarios, the above technical solutions enable small sample candidate receivers to obtain reasonable matching opportunities; in risk identification scenarios, the above technical solutions significantly improve the detection recall rate of minority class risk transactions; and in response prediction scenarios, the above technical solutions enhance the ability to identify high-response objects, thereby improving prediction accuracy.
[0166] refer to Figure 4 This disclosure provides a classification method, which may include steps 410 to 420:
[0167] Step 410: Obtain the data to be classified, which includes multiple features.
[0168] In some embodiments of this disclosure, the data to be classified may be new data for which classification prediction is required. The feature structure of the data to be classified corresponds to the feature structure of the training samples in the training data.
[0169] In some embodiments of this disclosure, step 410 may include: receiving data to be classified; performing the same preprocessing operations on the data to be classified as on the training data, including feature normalization and / or feature encoding.
[0170] Step 420: Input the data to be classified into the classification model to obtain the classification result corresponding to the data to be classified. The classification model is trained using the aforementioned classification model training method.
[0171] In some embodiments of this disclosure, step 420 may include: inputting the preprocessed data to be classified into a trained classification model; and obtaining the output of the classification model as the classification result.
[0172] In some embodiments of this disclosure, when the classification model is a least squares support vector machine model that includes multiple binary sub-models, step 420 may include: inputting the data to be classified into each binary sub-model respectively; obtaining the output decision value of each binary sub-model; and determining the final classification result based on the output decision value of each binary sub-model.
[0173] In one specific example, the classification category corresponding to the binary sub-model with the largest output decision value can be selected as the final classification result. In another embodiment, the output decision values of each binary sub-model can be converted into probability values, and the category with the largest probability value can be selected as the final classification result.
[0174] In some embodiments of this disclosure, the raw decision values output by the classification model can be obtained, and a probability calibration function can be used to map the raw decision values to probability prediction values to obtain the likelihood that a sample is correctly classified. In some embodiments, the classification model can integrate such mapping functionality, which falls within the scope of this disclosure.
[0175] In some embodiments of this disclosure, after user features are input into the allocation decision model, each binary classification sub-model can output the original decision value. , where k represents the k-th candidate receiver. The original decision values are obtained through a trained classification model.
[0176] In some embodiments of this disclosure, the probability calibration function is the Sigmoid function. Specifically, for the k-th binary sub-model, its corresponding assignment probability prediction value (matching degree) is... It can be represented as:
[0177]
[0178] in, is the original decision value output by the k-th binary sub-model for the user feature vector x; A and B are calibration parameters, which can be optimized based on the validation set through maximum likelihood estimation.
[0179] In other embodiments, the probability calibration function may also employ other probability calibration methods, all of which fall within the scope of this disclosure.
[0180] In some embodiments of this disclosure, the classification result may include a classification category and / or a classification probability. The classification category represents the category to which the data to be classified is assigned; the classification probability represents the probability value of the data belonging to each category.
[0181] Therefore, by using the classification model trained according to the aforementioned method for classification prediction, the embodiments of this disclosure can obtain more accurate classification results, especially for difficult-to-classify samples and minority class samples, the classification effect is significantly improved.
[0182] This disclosure provides a classification model training apparatus. (See also...) Figure 5 The classification model training device 500 may include:
[0183] The acquisition unit 510 is configured to acquire training data, which includes multiple training samples, each of which includes multiple features and corresponding classification labels.
[0184] Training unit 520 is configured to input training data into a classification model based on a preset target optimization logic for training, thereby obtaining a trained classification model. The target optimization logic includes a prediction error term, which is determined based on sample weights. The sample weights are negatively correlated with the probability that a sample is correctly classified.
[0185] In some embodiments of this disclosure, training unit 520 may be configured such that sample weights decrease exponentially with the probability that a sample is correctly classified.
[0186] In some embodiments of this disclosure, the classification model is a least squares support vector machine (LSSVM) model, which includes multiple binary sub-models corresponding to multiple classification categories.
[0187] In some embodiments of this disclosure, the classification model training apparatus 500 may further include a kernel mapping processing unit (not shown in the figure), which is configured to perform differential processing on different types of features of each training sample using kernel mapping rules. In some embodiments of this disclosure, the kernel mapping processing unit may be configured to: process the nonlinear features of each training sample using a first kernel mapping rule; process the linear features of each training sample using a second kernel mapping rule; and perform mixed processing on the mapping results of the first kernel mapping rule and the second kernel mapping rule to obtain a weighted mapping result.
[0188] In some embodiments of this disclosure, the classification model training device 500 may further include a feature evaluation unit (not shown in the figure). The feature evaluation unit is configured to: model the training data using a gradient boosting algorithm to obtain the information gain value of each feature as the prediction contribution; and determine the importance weight of each feature based on the prediction contribution. Correspondingly, the kernel mapping processing unit may also be configured to perform weighted processing on the features of each training sample according to the importance weight of each feature. In some embodiments of this disclosure, the feature evaluation unit may be configured to use the LightGBM algorithm as the gradient boosting algorithm. In some embodiments of this disclosure, the feature evaluation unit may also be configured to filter out features whose prediction contribution is lower than a preset threshold.
[0189] In some embodiments of this disclosure, the classification model training device 500 may further include a hyperparameter optimization unit (not shown in the figure), which is configured to use a swarm intelligence algorithm to search for the optimal hyperparameters of the target optimization logic and / or kernel mapping rule. In some embodiments of this disclosure, the hyperparameter optimization unit may be configured to use at least one of the gray wolf optimization algorithm, particle swarm optimization algorithm, or genetic algorithm as a swarm intelligence algorithm.
[0190] refer to Figure 6 This disclosure provides a sorting device 600 that may include:
[0191] The data acquisition unit 610 is configured to acquire data to be classified, which includes multiple features.
[0192] The classification unit 620 is configured to input the data to be classified into the classification model to obtain the classification result corresponding to the data to be classified. The classification model is trained using the aforementioned classification model training method and / or the aforementioned training device.
[0193] In some embodiments of this disclosure, the data acquisition unit 610 may also be configured to preprocess the data to be classified, including feature standardization and / or feature encoding.
[0194] In some embodiments of this disclosure, the classification unit 620 may be configured to: input the data to be classified into each of the binary sub-models of the classification model; obtain the output decision values of each binary sub-model; and determine the final classification result based on the output decision values of each binary sub-model.
[0195] The apparatus, components, modules, units, and features described in the embodiments of this disclosure can be incorporated into the methods of the embodiments of this disclosure in a non-contradictory manner, and will not be repeated here. Conversely, the methods, steps, sub-steps, and features described in the embodiments of this disclosure can also be incorporated into the apparatus of the embodiments of this disclosure in a non-contradictory manner.
[0196] In embodiments of this disclosure, an electronic device may also be provided, including: a processor and a memory storing a computer program, the processor being configured to perform the method of any of the embodiments of this disclosure when running the computer program.
[0197] Figure 7 The illustration shows a method or electronic device 700 that can implement embodiments of the present disclosure. In some embodiments, it may include more or fewer electronic devices than illustrated. In some embodiments, it may be implemented using a single or multiple electronic devices. In some embodiments, it may be implemented using cloud-based or distributed electronic devices.
[0198] like Figure 7 As shown, the electronic device 700 includes a processor 701, which can perform various appropriate operations and processes based on programs and / or data stored in read-only memory (ROM) 702 or programs and / or data loaded from storage portion 708 into random access memory (RAM) 703. The processor 701 can be a multi-core processor or may contain multiple processors. In some embodiments, the processor 701 may include a general-purpose main processor and one or more special coprocessors, such as a graphics processing unit (GPU), a neural network processor (NPU), a digital signal processor (DSP), etc. The RAM 703 also stores various programs and data required for the operation of the electronic device 700. The processor 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0199] The processor and memory described above are used together to execute a program stored in the memory. When the program is executed by a computer, it can implement the steps or functions of the methods described in the above embodiments.
[0200] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, mouse, touchscreen, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed. Figure 7 The diagram only shows a portion of the components and does not imply that the computer system 700 includes only a portion of the components. Figure 7 The components shown.
[0201] The systems, devices, modules, or units described in the above embodiments can be implemented by a computer or its associated components. The computer may be, for example, a mobile terminal, smartphone, personal computer, laptop computer, in-vehicle human-machine interface device, personal digital assistant, media player, navigation device, game console, tablet computer, wearable device, smart TV, Internet of Things system, smart home, industrial computer, server, or a combination thereof.
[0202] Although not shown, in embodiments of this disclosure, a program product is provided, the program product comprising a computer program configured to be run to implement the methods of any embodiment of this disclosure.
[0203] Although not shown, in embodiments of this disclosure, a storage medium is provided storing a computer program configured to be executed to implement the methods of any of the embodiments of this disclosure.
[0204] Storage media in embodiments of this disclosure include articles that are permanent and non-permanent, removable and non-removable, capable of storing information by any method or technology. Examples of storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0205] The methods, programs, systems, apparatuses, etc., of the embodiments of this disclosure can be executed or implemented in a single or multiple networked computers, or practiced in a distributed computing environment. In the embodiments of this specification, in these distributed computing environments, tasks can be performed by remote processing devices connected via a communication network.
[0206] Those skilled in the art will understand that the embodiments described in this specification can be provided as methods, systems, or computer program products. Therefore, those skilled in the art will realize that the functional modules / units or controllers and related method steps described in the above embodiments can be implemented in software, hardware, or a combination of both.
[0207] Unless explicitly stated otherwise, the actions or steps of the methods or procedures described in the embodiments of this disclosure do not necessarily have to be performed in a specific order and can still achieve the desired results. In some implementations, multitasking and parallel processing are also possible or may be advantageous.
[0208] This document describes several embodiments of the present disclosure; however, for the sake of brevity, the descriptions of the embodiments are not exhaustive, and identical or similar features or portions between the embodiments may be omitted. In this document, "one embodiment," "some embodiments," "example," "specific example," or "some examples" refers to at least one embodiment or example applicable to the present disclosure, but not all embodiments. The above terms do not necessarily refer to the same embodiment or example. Without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of the different embodiments or examples.
[0209] The exemplary systems and methods of this disclosure have been specifically shown and described with reference to the foregoing embodiments, and are merely examples of the best mode for implementing the systems and methods. Those skilled in the art will understand that various changes can be made to the embodiments of the systems and methods described herein without departing from the spirit and scope of this disclosure as defined in the appended claims when implementing the systems and / or methods.
Claims
1. A classification model training method, characterized in that, include: Acquire training data, which includes multiple training samples, each of which includes multiple features and corresponding classification labels; The training data is input into a classification model based on a preset target optimization logic for training to obtain a trained classification model. The target optimization logic includes a prediction error term, which is determined based on sample weights. The sample weights are negatively correlated with the probability that a sample is correctly classified.
2. The method according to claim 1, characterized in that, The sample weights decrease exponentially with the probability that the sample will be correctly classified.
3. The method according to claim 1 or 2, characterized in that, The classification model includes multiple binary sub-models corresponding to multiple classification categories.
4. The method according to claim 3, characterized in that, The step of inputting the training data into a classification model based on a preset target optimization logic for training includes: Differentiated processing of different types of features of each training sample is performed using kernel mapping rules, wherein each binary sub-model has its own kernel mapping rule.
5. The method according to claim 4, characterized in that, The differential processing of different types of features of each training sample using kernel mapping rules includes: The nonlinear features of each training sample are processed using the first kernel mapping rule; The linear features of each training sample are processed using the second kernel mapping rule; The mapping results of the first kernel mapping rule and the second kernel mapping rule are mixed to obtain a weighted mapping result.
6. The method according to claim 4, characterized in that, The method also includes: The training data is modeled using the gradient boosting algorithm to obtain the information gain value of each feature as its prediction contribution; and The importance weight of each feature is determined based on the predicted contribution. The method of using kernel mapping rules to differentiate the features of different types of training samples further includes: weighting the features of each training sample according to the importance weight of each feature.
7. The method according to claim 4, characterized in that, The step of inputting the training data into a classification model based on a preset target optimization logic for training, to obtain a trained classification model, includes: The optimal hyperparameters of the target optimization logic and / or the kernel mapping rule are obtained by using a swarm intelligence algorithm.
8. A classification method, characterized in that, include: Obtain data to be classified, which includes multiple features; The data to be classified is input into the classification model to obtain the classification result corresponding to the data to be classified. The classification model is trained using the method according to any one of claims 1 to 7.
9. A classification model training device, characterized in that, include: The acquisition unit is configured to acquire training data, which includes multiple training samples, each training sample including multiple features and corresponding classification labels. The training unit is configured to input the training data into a classification model based on a preset target optimization logic for training, thereby obtaining a trained classification model. The target optimization logic includes a prediction error term, which is determined based on sample weights. The sample weights are negatively correlated with the probability that a sample is correctly classified.
10. An electronic device, characterized in that, include: A processor and a memory storing a computer program, the processor being configured to implement the method as described in any one of claims 1 to 8 when the computer program is executed.
11. A program product comprising a computer program, wherein, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Classification model training method and device, storage medium and computer program product
CN120319321A
Classification model training method and device, electronic equipment and storage medium
CN121167394A