Classification threshold determination method and device of classification model, equipment and storage medium

By adaptively determining the threshold for each classification label, the misclassification problem caused by unreasonable classification threshold settings in the prior art is solved, and the accuracy of the classification model is improved.

CN119989143APending Publication Date: 2025-05-13SHENZHEN YISHIHUOLALA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510054532.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

When setting classification thresholds, the existing classification models lack personalized adjustments for different labels, resulting in misclassification of labels that are easy to learn, reducing the accuracy of classification tasks.

Method used

By obtaining test samples, using a preset classification model for classification processing, the classification results of each test sample and the probability values ​​of each label are obtained, and the adaptive threshold value of each label is calculated based on these probability values.

Benefits of technology

A reasonable threshold is realized for adaptive determination of each classification tag, which improves the accuracy of the classification model when performing classification tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119989143A_ABST
    Figure CN119989143A_ABST
Patent Text Reader

Abstract

The invention discloses a classification threshold determination method and device for a classification model, equipment and a storage medium, and relates to the technical field of artificial intelligence, and the method comprises the steps: obtaining a plurality of test samples; performing classification processing on each test sample by using a preset classification model to obtain a classification result corresponding to each test sample, the classification result comprising probability values of a plurality of classification labels, and the probability values being used for representing probabilities of the test samples belonging to the categories corresponding to the classification labels; and determining a classification threshold value corresponding to each classification label according to the probability value of each classification label in each classification result. According to the method, the classification threshold value corresponding to each classification label is determined according to the probability value of each classification label in each classification result output by the classification model, so that a reasonable threshold value is adaptively determined for each classification label, and the accuracy of executing a classification task by the classification model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method, device, equipment and storage medium for determining a classification threshold of a classification model. Background Art

[0002] In machine learning and deep learning, the classification model is a common model that is widely used in various industries, such as text classification, image classification, and other scenarios. Taking multi-label classification (one sample has multiple labels) as an example, in the training phase of the classification model, the classification model is trained based on the collected training samples. In the inference phase, the threshold of the classification probability is set, which is 0.5 by default. The inference sample is input into the classification model to obtain the probability of each label, and then the final result is determined based on the probability of each classification label and the corresponding threshold.

[0003] However, the choice of this threshold is entirely based on manual experience, and the default value is generally 0.5. However, during the training phase, the model learns differently for each label, that is, some labels are easy to learn, while others are more difficult to learn. The reasons for the difficulty in learning may include: the training samples of this label have some noise, or the classification of this label itself is difficult, or the number of training samples is relatively small, which will lead to different probability distributions of different labels. Therefore, it is unreasonable to set the threshold of all labels to 0.5. For labels that are easier to learn, the model has a more comprehensive grasp of this label, that is, if a sample belongs to this label, then the probability of it predicting that it belongs to the current label will generally be higher. If the calculation is still performed with a threshold of 0.5, some samples will be misclassified as the current label, resulting in a low accuracy rate for the classification model to perform the classification task. Summary of the invention

[0004] Based on this, it is necessary to provide a classification threshold determination method, device, equipment and storage medium for a classification model in response to the above technical problems, so as to solve at least one of the above technical problems.

[0005] The present invention provides a method for determining a classification threshold of a classification model, comprising:

[0006] Obtain several test samples;

[0007] Using a preset classification model to classify each of the test samples, and obtaining a classification result corresponding to each of the test samples, wherein the classification result includes probability values ​​of multiple classification labels, and the probability value is used to indicate the probability that the test sample belongs to the category corresponding to the classification label;

[0008] According to the probability value of each classification label in each classification result, the classification threshold corresponding to each classification label is determined.

[0009] Optionally, according to a classification threshold determination method for a classification model provided by the present invention, determining the classification threshold corresponding to each classification label according to the probability value of each classification label in each classification result includes:

[0010] Determine the category label for each test sample;

[0011] For any classification label: select each test sample whose category label matches the classification label;

[0012] Based on the classification results corresponding to each selected test sample, query each probability value corresponding to the classification label;

[0013] Determine a probability average value according to each probability value corresponding to the classification label;

[0014] The probability average is used as the classification threshold of the classification label.

[0015] Optionally, according to a classification threshold determination method of a classification model provided by the present invention, after determining the classification threshold corresponding to each classification label according to the probability value of each classification label in each classification result, the method further includes:

[0016] Obtain samples to be classified;

[0017] Using the classification model to classify the samples to be classified to obtain a target classification result;

[0018] The type of the sample to be classified belongs to is determined according to the predicted probability value of each classification label in the target classification result and the classification threshold.

[0019] Optionally, according to a classification threshold determination method for a classification model provided by the present invention, determining the type of the sample to be classified according to the predicted probability value of each classification label in the target classification result and the classification threshold, includes:

[0020] For multi-classification tasks:

[0021] According to the predicted probability values ​​of each classification label in the target classification result, select the target classification label with the largest predicted probability value;

[0022] Determine a classification threshold corresponding to the target classification label;

[0023] The target classification label is compared with the classification threshold to determine the type of the sample to be classified according to a first comparison result.

[0024] Optionally, according to a classification threshold determination method for a classification model provided by the present invention, determining the type of the sample to be classified according to the predicted probability value of each classification label in the target classification result and the classification threshold, includes:

[0025] For multi-label classification tasks:

[0026] The predicted probability value of each classification label in the target classification result and the corresponding classification threshold are compared respectively to determine the type of the sample to be classified according to the second comparison result.

[0027] Optionally, according to a classification threshold determination method of a classification model provided by the present invention, after determining the classification threshold corresponding to each classification label according to the probability value of each classification label in each classification result, the method further includes:

[0028] Determine the category labels of the test samples;

[0029] Based on the classification threshold corresponding to each of the classification labels, the classification results of each of the test samples and the category label, a model evaluation index corresponding to each of the classification thresholds is determined, wherein the model evaluation index is used to measure the performance of the classification model.

[0030] Optionally, according to a classification threshold determination method of a classification model provided by the present invention, before the method of classifying each of the test samples using a preset classification model to obtain a classification result corresponding to each of the test samples, the method further includes:

[0031] Acquire a number of samples to be trained, wherein the samples to be trained are associated with sample labels;

[0032] Input any of the samples to be trained into the initial model to obtain a prediction result output by the initial model;

[0033] Based on the prediction results and the sample labels, the initial model is trained to obtain the classification model.

[0034] Optionally, according to a method for determining a classification threshold of a classification model provided by the present invention,

[0035] The present invention also provides a classification threshold determination device for a classification model, comprising:

[0036] An acquisition module, used to acquire several test samples;

[0037] A classification module, used to classify each of the test samples using a preset classification model to obtain a classification result corresponding to each of the test samples, wherein the classification result includes probability values ​​of multiple classification labels, and the probability value is used to indicate the probability that the test sample belongs to the category corresponding to the classification label;

[0038] The determination module is used to determine the classification threshold corresponding to each classification label according to the probability value of each classification label in each classification result.

[0039] The present invention also provides a computer device, comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor implements the classification threshold determination method of the above-mentioned classification model when executing the computer-readable instructions.

[0040] The present invention also provides one or more readable storage media storing computer-readable instructions, which, when executed by a processor, implement the classification threshold determination method of the above classification model.

[0041] The classification threshold determination method, device, equipment and storage medium of the above classification model include: obtaining a number of test samples; using a preset classification model to classify each of the test samples to obtain a classification result corresponding to each of the test samples, wherein the classification result includes probability values ​​of multiple classification labels, and the probability value is used to represent the probability that the test sample belongs to the category corresponding to the classification label; according to the probability value of each classification label in each classification result, the classification threshold corresponding to each classification label is determined. The present invention determines the classification threshold corresponding to each classification label according to the probability value of each classification label in each classification result output by the classification model, realizes adaptive determination of a reasonable threshold for each classification label, and improves the accuracy of the classification model in performing classification tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0043] Figure 1 It is a flow chart of a method for determining a classification threshold of a classification model in one embodiment of the present invention;

[0044] Figure 2 It is a schematic diagram of a flow chart of a classification task performed by a classification model provided by an embodiment of the present invention;

[0045] Figure 3 It is a structural schematic diagram of a classification threshold determination device of a classification model in one embodiment of the present invention;

[0046] Figure 4 is a schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] The terms used in one or more embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present invention. The singular forms of "a", "said" and "the" used in one or more embodiments of the present invention are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present invention refers to and includes any or all possible combinations of one or more associated listed items.

[0049] In one embodiment, specifically, Figure 1 As shown, Figure 1 1 is a flow chart of a method for determining a classification threshold of a classification model in an embodiment of the present invention. The present invention provides a method for determining a classification threshold of a classification model, comprising the following steps:

[0050] Step S11, obtaining a number of test samples;

[0051] It should be noted that the application scenarios of the embodiments of the present invention are not limited. For example, in scenarios such as text classification and image classification, the test samples are test data collected in combination with the application scenarios. For example, in an animal image classification scenario, the test samples can be image data corresponding to cats, dogs, tigers, etc.

[0052] Step S12, classifying each of the test samples using a preset classification model to obtain a classification result corresponding to each of the test samples;

[0053] It should be noted that the classification model is a model trained based on the samples to be trained. During the model training process, the threshold of the classification label can be a manually customized setting. For example, the threshold of all classification labels is set to 0.5. The training process of the classification model is as follows: first, a number of samples to be trained are obtained, wherein the samples to be trained are associated with sample labels; any of the samples to be trained is input into the initial model to obtain a prediction result output by the initial model, wherein the prediction result includes the probability value of each classification label, and then the probability value of each classification label is compared with the threshold of the classification label, so as to train the initial model according to the classification label greater than the threshold and the sample label associated with the sample to be trained to obtain the classification model.

[0054] Specifically, each of the test samples is input into a trained classification model, so as to classify each of the test samples using the preset classification model to obtain a classification result corresponding to each of the test samples, wherein the classification result includes probability values ​​of multiple classification labels, and the probability value is used to represent the probability that the test sample belongs to the category corresponding to the classification label.

[0055] It can be understood that, assuming that the number of test samples is M and the number of classification labels is N, the format of the probability value output is Pi = [P1, P2, ..., PN], which respectively represents the probability of the i-th test sample being N classification labels. After the above calculation, the probability matrix P of all test samples is obtained, and the dimension of the probability matrix P is M*N.

[0056] Step S13, determining a classification threshold corresponding to each classification label according to the probability value of each classification label in each classification result.

[0057] It should be noted that each test sample is associated with a manually annotated category label. Specifically, the following steps are performed for any category label: each test sample whose category label matches the category label is selected; in the classification results corresponding to each selected test sample, each probability value corresponding to the category label is determined, and the probability average value is calculated based on the probability values ​​corresponding to the category label; and the probability average value is used as the classification threshold of the category label.

[0058] The embodiment of the present invention, through the above scheme, includes: obtaining a number of test samples; using a preset classification model to classify each of the test samples to obtain a classification result corresponding to each of the test samples, wherein the classification result includes probability values ​​of multiple classification labels, and the probability value is used to indicate the probability that the test sample belongs to the category corresponding to the classification label; and determining the classification threshold corresponding to each of the classification labels according to the probability value of each classification label in each classification result. The classification threshold corresponding to each classification label is determined according to the probability value of each classification label in each classification result output by the classification model, and a reasonable threshold is adaptively determined for each classification label, thereby improving the accuracy of the classification model in performing classification tasks.

[0059] In one embodiment of the present invention, determining the classification threshold corresponding to each classification label according to the probability value of each classification label in each classification result includes:

[0060] Determine the category label annotated for each test sample; for any category label: select each test sample whose category label matches the category label; based on the classification results corresponding to each selected test sample, query each probability value corresponding to the category label; determine the probability average value based on each probability value corresponding to the category label; use the probability average value as the classification threshold of the category label.

[0061] Specifically, for any classification label, the following steps are performed: determine the category label annotated for each test sample, where the category label refers to the true category label of the test sample; further, for any classification label, the following steps are performed: in all test data, select each test sample whose category label matches the classification label; that is, for classification label i, it is necessary to find each test sample whose true category label is i; and then based on the classification results corresponding to each selected test sample, query each probability value corresponding to the classification label, that is, query the probability value of classification label i in the classification results corresponding to each selected test sample. Further, average the probability values ​​corresponding to the classification label to obtain the probability average; and use the probability average as the classification threshold of the classification label.

[0062] The embodiment of the present invention determines each test sample whose category label matches the classification label, and then calculates the classification threshold of the classification label according to the probability value of the classification label in the classification results corresponding to each selected test sample, thereby realizing adaptive determination of a reasonable threshold for each classification label and improving the accuracy of the classification model in performing classification tasks.

[0063] In one embodiment of the present invention, after determining the classification threshold corresponding to each classification label according to the probability value of each classification label in each classification result, the method further includes:

[0064] Acquire samples to be classified; classify the samples to be classified using the classification model to obtain target classification results; and determine the type of the samples to be classified according to the predicted probability values ​​of each classification label in the target classification results and the classification threshold.

[0065] Specifically, a sample to be classified is obtained, and the sample to be classified is input into a classification model for classification processing to obtain a target classification result, wherein the target classification result includes a predicted probability value of each classification label.

[0066] Furthermore, for multi-classification tasks (multi-classification tasks are to assign samples to one and only one category): among the predicted probability values ​​of each classification label in the target classification result, select the target classification label with the largest predicted probability value; in addition, it is necessary to determine the classification threshold corresponding to the target classification label; further, compare the target classification label with the classification threshold, if the first comparison result is that the target classification label is greater than the classification threshold, it is proved that the type of the sample to be classified belongs to the category corresponding to the target classification label, which can be referred to Figure 2 , Figure 2 It is a flow chart of a classification model performing a classification task provided by an embodiment of the present invention.

[0067] In addition, for multi-label classification tasks (multi-label classification tasks are to assign each sample to one or more categories): it is necessary to compare the predicted probability value of each classification label in the target classification result and the corresponding classification threshold, and obtain the second comparison result corresponding to each classification label. Further, for the second comparison result corresponding to each classification label, the following steps are performed: if the second comparison result is that the predicted probability value of the classification label is greater than the classification threshold, it proves that the type of the sample to be classified belongs to a category corresponding to the classification label. For example, assuming that the number of labels is 3, the predicted probability values ​​of the output classification labels are [0.8, 0.3, 0.6], the classification threshold of classification label 1 is 0.6, the classification threshold of classification label 2 is 0.5, and the classification threshold of classification label 3 is 0.55, which proves that the final result has classification label 1 and classification label 3. If the probability value of each classification label is lower than the corresponding classification threshold, the sample may be marked as "unknown" or "not belonging to any category".

[0068] The embodiment of the present invention adaptively determines a reasonable threshold for each classification label, and then combines the classification threshold of each classification label to determine the final classification result output by the model, thereby improving the accuracy of the classification model in performing classification tasks.

[0069] In one embodiment of the present invention, after determining the classification threshold corresponding to each classification label according to the probability value of each classification label in each classification result, the method further includes:

[0070] Determine the category label annotated for each test sample; determine the model evaluation index corresponding to each classification threshold based on the classification threshold corresponding to each of the classification labels, the classification results of each of the test samples and the category label, wherein the model evaluation index is used to measure the performance of the classification model.

[0071] Specifically, determine the category label of each test sample; determine the type of each test sample based on the classification threshold corresponding to each classification label and the probability value of multiple classification labels in the classification result of each test sample; further, compare the category label of the type to which the test sample belongs with the category label of the type to which the test sample belongs, so as to determine whether the classification result of the test sample is correct or wrong. Then, according to the correctness of the classification result, calculate the model evaluation index of the classification model, for example, calculate the accuracy of the classification model. The higher the model evaluation index, the more reliable the result output by the neural network classification model.

[0072] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean 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 embodiment of the present invention.

[0073] In one embodiment, a classification threshold determination device for a classification model is provided, and the classification threshold determination device for the classification model corresponds one-to-one to the classification threshold determination method for the classification model in the above embodiment. Figure 3 As shown, Figure 3 : is a schematic diagram of a structure of a classification threshold determination device of a classification model in an embodiment of the present invention, wherein the classification threshold determination device of the classification model comprises:

[0074] An acquisition module 21 is used to acquire a number of test samples;

[0075] A classification module 22, configured to classify each of the test samples using a preset classification model to obtain a classification result corresponding to each of the test samples, wherein the classification result includes probability values ​​of multiple classification labels, and the probability value is used to indicate the probability that the test sample belongs to the category corresponding to the classification label;

[0076] The determination module 23 is used to determine the classification threshold corresponding to each classification label according to the probability value of each classification label in each classification result.

[0077] The determining module 23 is also used for:

[0078] Determine the category label for each test sample;

[0079] For any classification label: select each test sample whose category label matches the classification label;

[0080] Based on the classification results corresponding to each selected test sample, query each probability value corresponding to the classification label;

[0081] Determine a probability average value according to each probability value corresponding to the classification label;

[0082] The probability average is used as the classification threshold of the classification label.

[0083] The classification threshold determination device of the classification model also includes:

[0084] A sample acquisition module to be classified is used to obtain samples to be classified;

[0085] The sample classification module is used to classify the sample to be classified using the classification model to obtain a target classification result;

[0086] The type determination module is used to determine the type of the sample to be classified according to the predicted probability value of each classification label in the target classification result and the classification threshold.

[0087] The type determination module is also used to:

[0088] For multi-classification tasks:

[0089] According to the predicted probability values ​​of each classification label in the target classification result, select the target classification label with the largest predicted probability value;

[0090] Determine a classification threshold corresponding to the target classification label;

[0091] The target classification label is compared with the classification threshold to determine the type of the sample to be classified according to a first comparison result.

[0092] The type determination module is also used to:

[0093] For multi-label classification tasks:

[0094] The predicted probability value of each classification label in the target classification result and the corresponding classification threshold are compared respectively to determine the type of the sample to be classified according to the second comparison result.

[0095] The classification threshold determination device of the classification model also includes:

[0096] A category label determination module is used to determine the category label of each test sample;

[0097] An evaluation index determination module is used to determine a model evaluation index corresponding to each classification threshold based on the classification threshold corresponding to each classification label, the classification results of each test sample and the category label, wherein the model evaluation index is used to measure the performance of the classification model.

[0098] The classification threshold determination device of the classification model also includes:

[0099] A training sample acquisition module is used to acquire a number of training samples, wherein the training samples are associated with sample labels;

[0100] A prediction module, used to input any of the samples to be trained into the initial model to obtain a prediction result output by the initial model;

[0101] A training module is used to train the initial model based on the prediction results and the sample labels to obtain the classification model.

[0102] For the specific definition of the classification threshold determination device of the classification model, please refer to the definition of the classification threshold determination method of the classification model above, which will not be repeated here. Each module in the above-mentioned classification threshold determination device of the classification model can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0103] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown, Figure 4 : is a schematic diagram of a computer device in an embodiment of the present invention. The computer device includes a processor, a memory, a network interface and a sample library connected by a device bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a readable storage medium and an internal memory. The readable storage medium stores an operating device, a computer-readable instruction and a sample library. The internal memory provides an environment for the operation of the operating device and the computer-readable instructions in the readable storage medium. The sample library of the computer device is used to store samples involved in the classification threshold determination method of the classification model. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instruction is executed by the processor, a classification threshold determination method of a classification model is implemented. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.

[0104] In one embodiment, a computer device is provided. The computer device may be a terminal device, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, and a network interface connected through a device bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a readable storage medium. The readable storage medium stores computer-readable instructions. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instructions are executed by the processor, a classification threshold determination method for a classification model is implemented. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.

[0105] In one embodiment, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, and when the processor executes the computer-readable instructions, the steps of the classification threshold determination method of the above-mentioned classification model are implemented. The method includes: obtaining a number of test samples; using a preset classification model to classify each of the test samples to obtain a classification result corresponding to each of the test samples, wherein the classification result includes probability values ​​of multiple classification labels, and the probability value is used to indicate the probability that the test sample belongs to the category corresponding to the classification label; according to the probability value of each classification label in each classification result, determining the classification threshold corresponding to each classification label.

[0106] In one embodiment, a readable storage medium is provided, the readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the classification threshold determination method steps of the above-mentioned classification model are implemented. A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When the computer-readable instructions are executed, they may include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, sample library or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double sample rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0107] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0108] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A method for determining a classification threshold of a classification model, characterized in that: include: Obtain several test samples; Using a preset classification model to classify each of the test samples, and obtaining a classification result corresponding to each of the test samples, wherein the classification result includes probability values ​​of multiple classification labels, and the probability value is used to indicate the probability that the test sample belongs to the category corresponding to the classification label; According to the probability value of each classification label in each classification result, the classification threshold corresponding to each classification label is determined.

2. The method for determining the classification threshold of a classification model according to claim 1, characterized in that: Determining the classification threshold corresponding to each classification label according to the probability value of each classification label in each classification result includes: Determine the category label for each test sample; For any classification label: select each test sample whose category label matches the classification label; Based on the classification results corresponding to each selected test sample, query each probability value corresponding to the classification label; Determine a probability average value according to each probability value corresponding to the classification label; The probability average is used as the classification threshold of the classification label.

3. The method for determining the classification threshold of a classification model according to claim 1, characterized in that: After determining the classification threshold corresponding to each classification label according to the probability value of each classification label in each classification result, the method further includes: Obtain samples to be classified; Using the classification model to classify the samples to be classified to obtain a target classification result; The type of the sample to be classified belongs to is determined according to the predicted probability value of each classification label in the target classification result and the classification threshold.

4. The method for determining the classification threshold of a classification model according to claim 3, characterized in that: Determining the type of the sample to be classified according to the predicted probability value of each classification label in the target classification result and the classification threshold includes: For multi-classification tasks: According to the predicted probability values ​​of each classification label in the target classification result, select the target classification label with the largest predicted probability value; Determine a classification threshold corresponding to the target classification label; The target classification label is compared with the classification threshold to determine the type of the sample to be classified according to a first comparison result.

5. The method for determining the classification threshold of a classification model according to claim 3, characterized in that: Determining the type of the sample to be classified according to the predicted probability value of each classification label in the target classification result and the classification threshold includes: For multi-label classification tasks: The predicted probability value of each classification label in the target classification result and the corresponding classification threshold are compared respectively to determine the type of the sample to be classified according to the second comparison result.

6. The method for determining the classification threshold of a classification model according to claim 1, characterized in that: After determining the classification threshold corresponding to each classification label according to the probability value of each classification label in each classification result, the method further includes: Determine the category label for each test sample; Based on the classification threshold corresponding to each of the classification labels, the classification results of each of the test samples and the category label, a model evaluation index corresponding to each of the classification thresholds is determined, wherein the model evaluation index is used to measure the performance of the classification model.

7. The method for determining the classification threshold of a classification model according to claim 1, characterized in that: Before the method of using a preset classification model to classify each of the test samples and obtaining a classification result corresponding to each of the test samples, the method further includes: Acquire a number of samples to be trained, wherein the samples to be trained are associated with sample labels; Input any of the samples to be trained into the initial model to obtain a prediction result output by the initial model; Based on the prediction results and the sample labels, the initial model is trained to obtain the classification model.

8. A classification threshold determination device for a classification model, characterized in that: include: An acquisition module, used to acquire several test samples; A classification module, used to classify each of the test samples using a preset classification model to obtain a classification result corresponding to each of the test samples, wherein the classification result includes probability values ​​of multiple classification labels, and the probability value is used to indicate the probability that the test sample belongs to the category corresponding to the classification label; The determination module is used to determine the classification threshold corresponding to each classification label according to the probability value of each classification label in each classification result.

9. A computer device comprising a memory, a processor, and computer-readable instructions stored in the memory and executed on the processor, characterized in that: When the processor executes the computer-readable instructions, the method for determining a classification threshold of a classification model according to any one of claims 1 to 7 is implemented.

10. A readable storage medium having computer readable instructions stored thereon, characterized in that: When the computer-readable instructions are executed by a processor, the method for determining a classification threshold of a classification model according to any one of claims 1 to 7 is implemented.