Support vector machine generation method, device, electronic device and storage medium

By generating kernel function search space and iteratively updating kernel functions, the problem of insufficient nonlinear representation capabilities of existing support vector machines is solved, and its performance and robustness are improved.

CN111914882BInactive Publication Date: 2024-12-03BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010560659.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-18
Publication Date
2024-12-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The nonlinear characterization capabilities of existing support vector machines are limited by simple kernel functions, resulting in insufficient performance and low robustness.

Method used

By generating kernel function search space, automatically search and generate complex support vector machine kernel functions, train the model with K training subsets and evaluate performance with K verification subsets, iteratively update the kernel function until the scoring requirements are met or the preset iteration is reached. frequency.

Benefits of technology

The nonlinear characterization capability and robustness of the support vector machine are improved, ensuring the improvement of performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111914882B_ABST
    Figure CN111914882B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, electronic device and storage medium for generating a support vector machine, which relates to the fields of artificial intelligence technology and deep learning, and can be applied to image processing. The specific scheme is: generating a kernel function search space, generating a support vector machine to be trained according to the kernel function search space, training the support vector machine to be trained and performing performance evaluation, and iteratively updating the support vector machine to be trained when the evaluation result does not meet the scoring requirements, until the evaluation result meets the scoring requirements or the number of iterative updates of the support vector machine to be trained reaches a preset number of iterations. The present application realizes the automatic generation of a support vector machine, and automatically searches in the kernel function search space to generate a kernel function of a support vector machine, so that the generated support vector machine can have a complex kernel function, thereby enabling the support vector machine to obtain better nonlinear characterization capabilities, ensuring the performance of the support vector machine, and improving the robustness of the support vector machine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application generally relate to the field of computer technology, and more specifically, to the field of artificial intelligence technology and deep learning, and can be applied to image processing. Background Art

[0002] Deep learning is a new field in machine learning research, which aims to build a neural network that simulates the human brain for analysis and learning. In recent years, deep learning technology has achieved success in many aspects of artificial intelligence technology research, such as computer vision, speech recognition, and natural language processing.

[0003] In deep learning technology, the quality of artificial neural network (ANN) structure has a very important impact on the effect of the final model. Manual design of network topology requires designers to have rich experience and multiple attempts, and when there are many parameters, explosive combinations will occur. The conventional random search algorithm is less feasible to generate network structure. Therefore, Neural Architecture Search (NAS) technology has gradually become a research hotspot in the field of deep learning. Summary of the invention

[0004] The present application provides a method, device, electronic device and storage medium for generating a support vector machine.

[0005] According to a first aspect, a method for generating a support vector machine is provided, comprising:

[0006] Obtain a training set and a validation set, and divide the training set and the validation set into K training subsets and K validation subsets, where K is a positive integer;

[0007] Generate a kernel function search space, and generate a support vector machine to be trained according to the kernel function search space;

[0008] Training the support vector machine to be trained according to the K training subsets to generate K support vector machine models;

[0009] Using the K validation subsets respectively to evaluate the K support vector machine models to generate score values ​​of the K support vector machine models; and

[0010] The support vector machine to be trained is iteratively updated N times according to the score values ​​of the K support vector machine models until the score values ​​of the K support vector machine models meet the score requirement or N reaches a preset number of iterations, where N is a positive integer.

[0011] According to a second aspect, a device for generating a support vector machine is provided, comprising:

[0012] An acquisition module, used to acquire a training set and a validation set, and divide the training set and the validation set into K training subsets and K validation subsets, where K is a positive integer;

[0013] A first generation module is used to generate a kernel function search space;

[0014] A second generating module, used for generating a support vector machine to be trained according to the kernel function search space;

[0015] A training module, used for training the support vector machine to be trained according to the K training subsets to generate K support vector machine models;

[0016] A verification module, configured to respectively use the K verification subsets to evaluate the K support vector machine models to generate scoring values ​​of the K support vector machine models; and

[0017] An updating module is used to perform N iterative updates on the support vector machine to be trained according to the scoring values ​​of the K support vector machine models, until the scoring values ​​of the K support vector machine models meet the scoring requirements or N reaches a preset number of iterations, where N is a positive integer.

[0018] According to a third aspect, there is provided an electronic device, comprising:

[0019] at least one processor; and

[0020] a memory communicatively connected to the at least one processor; wherein,

[0021] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for generating a support vector machine as described in the first aspect.

[0022] According to a fourth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method for generating a support vector machine as described in the first aspect.

[0023] According to a fifth aspect, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the method for generating a support vector machine as described in the first aspect is implemented.

[0024] The support vector machine generation method, device, electronic device and storage medium provided in this application have the following beneficial effects:

[0025] By generating a kernel function search space, automatically searching in the kernel function search space to generate a support vector machine kernel function, and then obtaining a support vector machine based on the support vector machine kernel function, not only the automatic generation of the support vector machine is achieved, but the generated support vector machine also has a complex kernel function, which enables the support vector machine to obtain better nonlinear representation capabilities, ensures the performance of the support vector machine, and improves the robustness of the support vector machine.

[0026] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.

[0028] Figure 1 is a flow chart of a method for generating a support vector machine according to the first embodiment of the present application;

[0029] Figure 2 is a flow chart of a method for generating a support vector machine according to the second embodiment of the present application;

[0030] Figure 3 is a flow chart of a method for generating a support vector machine according to the third embodiment of the present application;

[0031] Figure 4 is a flow chart of a method for generating a support vector machine according to a fourth embodiment of the present application;

[0032] Figure 5 is a schematic structural diagram of a device for generating a support vector machine according to a fifth embodiment of the present application;

[0033] Figure 6 is a structural schematic diagram of a support vector machine generating device according to a sixth embodiment of the present application;

[0034] Figure 7 is a schematic structural diagram of a device for generating a support vector machine according to a seventh embodiment of the present application;

[0035] Figure 8 is a schematic structural diagram of a device for generating a support vector machine according to an eighth embodiment of the present application;

[0036] Fig. 9 It is a block diagram of an electronic device used to implement the method for generating a support vector machine according to an embodiment of the present application. DETAILED DESCRIPTION

[0037] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0038] The following describes the support vector machine generation method, device, electronic device and storage medium of the present application with reference to the accompanying drawings.

[0039] Support Vector Machines (SVM) is a binary classification model whose basic model is a linear classifier with the largest margin defined in the feature space, which is different from the perceptron. The support vector machine includes a kernel function, which makes it a nonlinear classifier in essence.

[0040] The design of kernel function is very important in support vector machine. At present, the kernel function used in support vector machine is a simple kernel function set manually, which greatly limits the nonlinear representation ability of support vector machine.

[0041] In response to the above problems, the present application discloses a method for generating a support vector machine, which generates a kernel function search space and generates a support vector machine to be trained according to the kernel function search space, and then uses the obtained K training subsets to train the generated support vector machine to be trained to obtain K support vector machine models, and uses the obtained K validation sets to perform performance evaluation on the K support vector machine models to obtain score values ​​of the K support vector machine models. When the score values ​​of the K support vector machine models do not meet the score requirements and do not reach the preset number of iterations, the support vector machine to be trained is iteratively updated until the score values ​​of the K support vector machine models meet the score requirements or the number of iterations N reaches the preset number of iterations, thereby realizing the automatic generation of support vector machines. In the solution of the present application, the kernel function search space includes all possibilities of searchable support vector machine kernel functions. By automatically searching in the kernel function search space, a complex support vector machine kernel function can be searched, so that the support vector machine obtained according to the searched support vector machine kernel function has a complex kernel function, thereby reducing the probability that the support vector machine in the prior art can only use a simple kernel function, resulting in limited nonlinear representation capabilities of the support vector machine, so that the support vector machine can obtain better nonlinear representation capabilities, thereby ensuring the performance of the support vector machine and improving the robustness of the support vector machine.

[0042] Figure 1It is a flow chart of a method for generating a support vector machine according to the first embodiment of the present application. The method can be executed by a device for generating a support vector machine provided by the present application, or by an electronic device provided by the present application, wherein the electronic device can include but is not limited to terminal devices such as desktop computers and tablet computers, or can be a server. The present application is explained below by taking the method for generating a support vector machine provided by the device for generating a support vector machine provided by the present application as an example, and it cannot be used as a limitation on the present application.

[0043] like Figure 1 As shown, the method for generating the support vector machine may include the following steps:

[0044] Step 101: obtain a training set and a validation set, and divide the training set and the validation set into K training subsets and K validation subsets, where K is a positive integer.

[0045] For different tasks, in the embodiments of the present application, training sets and validation sets can be obtained from different types of sample sets. The training set is used for model training, and the validation set is used to evaluate the performance of the trained model, that is, to test the performance of the trained model.

[0046] For example, for image processing tasks such as classification tasks, object detection tasks, and face detection tasks, a large number of image samples can be obtained from public image datasets as training sets and validation sets, where the public image datasets can be, for example, the ImageNet dataset, the PASCAL VOC dataset, the Labelme dataset, etc., where the image samples obtained in the validation set are different from the image samples in the training set to ensure the performance and robustness of the trained support vector machine.

[0047] For example, for speech recognition tasks, a large number of speech samples can be obtained from public open source speech datasets as training sets and verification sets. The open source speech datasets can be, for example, Chinese datasets, English datasets, etc. The speech data obtained in the verification set is different from the speech data in the training set to ensure the performance and robustness of the trained support vector machine.

[0048] For example, taking image samples from the ImageNet dataset as training sets and validation sets, we can first obtain a sample set containing a large number of image samples from the ImageNet dataset, and then divide the sample set into validation sets and training sets according to the preset allocation ratio. For example, the preset allocation ratio of the training set to the validation set in the sample set is 8:2, that is, 80% of the image samples in the sample set are used as the training set, and the remaining 20% ​​of the image samples in the sample set are used as the validation set, then the obtained sample set is divided into the training set and the validation set according to the ratio of 8:2.

[0049] In this embodiment, after obtaining the training set and the validation set, the training set and the validation set can be divided into K training subsets and the validation set can be divided into K validation subsets, where K is a positive integer.

[0050] For example, when dividing the training set and the validation set, the training set can be randomly divided into K parts to obtain K training subsets, and the number of sample images contained in each training subset can be the same or different; for the division of the validation set, the validation set can also be randomly divided into K parts to obtain K validation subsets, and the number of sample images contained in each validation subset can be the same or different.

[0051] It should be noted that, in this embodiment, the number of training subsets and validation subsets obtained by division is the same. For example, the training set is divided into 5 training subsets, and similarly, the validation set is divided into 5 validation subsets. Each training subset corresponds to a validation subset, so that the validation subset can be used to perform performance testing on the support vector machine model trained according to the training subset.

[0052] In a possible implementation method of the embodiment of the present application, in order to obtain K training subsets and K verification subsets, the obtained sample set can be first divided into K parts to obtain K sample subsets, and then for each verification subset, according to a preset distribution ratio of the training set to the verification set (for example, 8:2), the sample subset is divided into a training subset and a verification subset, and finally K training subsets and K verification subsets are obtained, and each training subset corresponds to a verification subset.

[0053] Step 102: Generate a kernel function search space, and generate a support vector machine to be trained according to the kernel function search space.

[0054] In this embodiment, the design rules of the kernel function search space may be pre-designed, and then the kernel function search space may be generated according to the design rules.

[0055] For example, the design rules of the kernel function search space may stipulate that the kernel function search space includes all kernel functions that can be used for support vector machines, such as the agreed kernel functions may include polynomial kernels, radial basis function kernels, Laplace kernels, and nonlinear function Sigmoid kernels. For each agreed kernel function, the hyperparameters of the kernel function can be arbitrarily set to multiple values, that is, for the same kernel function, different hyperparameters correspond to different kernel functions, for example, the design rules may stipulate multiple polynomial kernels of any hyperparameters, each hyperparameter value corresponds to a polynomial kernel, and the kernel function search space generated thereby includes multiple polynomial kernels of any hyperparameters.

[0056] It can be understood that in machine learning, hyperparameters refer to parameters whose values ​​are preset before starting the learning process, rather than parameters obtained by training. Usually, a value is pre-specified for a hyperparameter based on existing experience. The selection of hyperparameters directly affects the generalization performance and regression validation of the support vector machine, and is the key to ensuring the performance of the support vector machine. Therefore, in the present embodiment, the design rules of the kernel function search space stipulate multiple kernel functions of any hyperparameter, including the polynomial kernel of any hyperparameter, the radial basis function kernel of any hyperparameter, the Laplace kernel of any hyperparameter, and the Sigmoid kernel of any hyperparameter, so that all possibilities of the kernel function are included in the kernel function search space generated according to the design rules, so as to facilitate searching for the optimal or better hyperparameter therefrom, and then, the support vector machine generated by the kernel function of the optimal or better hyperparameter can obtain better performance.

[0057] In addition, the design rules of the kernel function search space can also be agreed that the search space includes any combination of different kernel functions of any hyperparameters. Among them, the combination form of different kernel functions can include at least two kernel functions of the same kind with different hyperparameters (such as two polynomial kernels with different hyperparameters are combined, three Sigmoid kernels with different hyperparameters are combined, etc.), at least two different types of kernel functions with the same hyperparameters are combined (such as polynomial kernels with the same hyperparameters are combined with Sigmoid kernels, polynomial kernels, Laplace kernels and radial basis function kernels with the same hyperparameters are combined, etc.), and at least two different types of kernel functions with different hyperparameters are combined (such as polynomial kernels with different hyperparameters are combined with Sigmoid kernels, polynomial kernels, Laplace kernels and radial basis function kernels with different hyperparameters are combined, etc.), and other combinable forms can also be included. By combining at least two kernel functions according to different combination forms to obtain a combined kernel function, it is possible to obtain a combined kernel function that includes all possibilities. The combined kernel function includes at least two different kernel functions (which may be different hyperparameters or different types of kernel functions). Therefore, a search is performed in the search space generated according to the design rule. The kernel function searched may be a combination of multiple kernel functions. Compared with the simple kernel function used by the support vector machine in the prior art, the kernel function searched from the kernel function search space is relatively complex. Therefore, the support vector machine obtained according to the relatively complex kernel function searched has an improved nonlinear representation capability relative to the support vector machine using a simple kernel function.

[0058] According to the above-mentioned design rules, a kernel function search space that meets the conditions stipulated in the above-mentioned design rules can be generated. The kernel function search space contains all possibilities of support vector machine kernel functions that can be generated, that is, the kernel function search space is a set of all possible support vector machine kernel functions. The scheme of the present application can find a better support vector machine kernel function from all possible support vector machine kernel functions by searching in the kernel function search space, and then obtain a support vector machine with better performance. The support vector machine kernel function found can be a kernel function with better hyperparameters or a better combined kernel function, thereby avoiding the limitation of simple kernel functions on the nonlinear representation ability of the support vector machine, improving the nonlinear representation ability of the support vector machine, and obtaining a support vector machine with better performance.

[0059] In this embodiment, after the kernel function search space is generated, the support vector machine to be trained can be generated according to the kernel function search space. As mentioned above, the kernel function search space contains all possible support vector machine kernel functions that can be generated, so a support vector machine kernel function can be randomly generated from the kernel function search space, and the randomly generated support vector machine kernel function is used as the kernel function of the support vector machine to be trained.

[0060] In order to obtain a simple support vector machine with satisfactory performance, when generating a support vector machine to be trained according to the kernel function search space, a simplest support vector machine kernel function may be randomly generated as the kernel function of the support vector machine to be trained. For example, the kernel function of the support vector machine to be trained obtained for the first time may be a kernel function with the smallest hyperparameter, such as obtaining a polynomial kernel with the smallest hyperparameter as the kernel function of the support vector machine to be trained.

[0061] It should be noted that there is no particular order in which steps 101 and 102 are executed. The two can be executed one after the other or simultaneously. This application only uses the execution of step 102 after step 101 as an example to explain this application, and it cannot be used as a limitation on this application.

[0062] Step 103: Train the support vector machines to be trained according to the K training subsets to generate K support vector machine models.

[0063] In this embodiment, after the support vector machine to be trained is generated, the support vector machine to be trained can be trained according to the obtained K training subsets to generate K support vector machine models.

[0064] When using each training subset to train the support vector machine to be trained, the sample data (such as image samples, speech data) contained in the training subset is used as the input of the support vector machine to be trained, and the annotation results of the sample data are used as the output of the support vector machine to be trained. By continuously iteratively updating the parameters of the support vector machine to be trained, a set of model parameters that minimize the value of the loss function on the training subset is eventually found. After the training is completed, the support vector machine model corresponding to the training subset is obtained.

[0065] It can be understood that the K support vector machine models are obtained by using K different training subsets to train the same model structure, i.e., the support vector machine to be trained. Since different training subsets are used, the parameters contained in the K support vector machine models obtained by training are also different.

[0066] In a possible implementation of the embodiment of the present application, before training the support vector machine to be trained, the support vector machine to be trained can be initialized first, such as initializing the parameters of the support vector machine to be trained. After the initialization is completed, the support vector machine to be trained is trained using K training subsets.

[0067] Step 104 : Use the K validation subsets to evaluate the K support vector machine models respectively to generate score values ​​of the K support vector machine models.

[0068] In this embodiment, after using K training subsets to train the support vector machine to be trained and obtaining the corresponding K support vector machine models, for each support vector machine model, a verification subset corresponding to the training subset used when training the support vector machine model can be used to perform a performance test on the support vector machine model to generate a score value for the support vector machine model. Each support vector machine model is tested in turn to finally obtain the score values ​​of K support vector machine models, and a total of K score values ​​are obtained.

[0069] Step 105 , performing N iterations to update the support vector machine to be trained according to the score values ​​of the K support vector machine models, until the score values ​​of the K support vector machine models meet the score requirement or N reaches a preset number of iterations, where N is a positive integer.

[0070] The scoring requirement and the preset number of iterations can be preset. For example, the scoring requirement can be set to a minimum value of K scoring values ​​of not less than 90%, or the scoring requirement can be set to a mean value of K scoring values ​​of not less than 90%, etc.; the preset number of iterations can be set to 30 times, 40 times, etc.

[0071] In this embodiment, after obtaining the score values ​​of K support vector machine models, it can be determined whether the support vector machine to be trained needs to be iteratively updated based on the obtained K score values, and if further iterative updating is required, the support vector machine to be trained is iteratively updated.

[0072] In order to prevent infinite searching in the kernel function search space, a preset number of iterations can be set in advance. When the iterative update number of the support vector machine to be trained reaches the preset number of iterations, even if the scoring values ​​of the K support vector machine models currently obtained do not meet the scoring requirements, the support vector machine to be trained will no longer be iteratively updated.

[0073] That is to say, in this embodiment, after obtaining the scoring values ​​of K support vector machine models, it can be determined whether the obtained scoring values ​​meet the scoring requirements. For example, the scoring requirement is that the minimum value of the K scoring values ​​is not less than 90%. When the minimum value of the K scoring values ​​is less than 90%, it is determined that the scoring requirements are not met, that is, the performance of the current support vector machine still does not meet the requirements. It is necessary to perform the N+1th iterative update on the support vector machine to be trained after N iterative updates on the basis of the support vector machine to be trained that has been iteratively updated N times. At this time, before iteratively updating the support vector machine to be trained, it is first determined whether the current number of iterations N reaches the preset number of iterations. If N is less than the preset number of iterations, the operation of iteratively updating the support vector machine to be trained is performed.

[0074] Wherein, N is a positive integer.

[0075] It should be noted that N refers to the number of iterative updates of the support vector machine to be trained. For the first generated support vector machine to be trained, after K support vector machine models are obtained by training using K training subsets and K validation subsets are used for evaluation to obtain K scoring values, if the K scoring values ​​do not meet the scoring requirements, the support vector machine to be trained needs to be iteratively updated for the first time, that is, N is equal to 1 at this time; if the support vector machine to be trained after the iterative update still does not meet the scoring requirements, the support vector machine to be trained after the iterative update needs to be iteratively updated again, and N is equal to 2 at this time, and so on, the number of iterations N when the support vector machine to be trained needs to be iteratively updated each time.

[0076] In this embodiment, the iterative update of the support vector machine to be trained may be by adjusting the hyperparameters of the kernel function of the support vector machine to be trained; or, it may be by adjusting the kernel function in the support vector machine to be trained, such as re-searching the support vector machine kernel function from the kernel function search space, and using the newly searched support vector machine kernel function to adjust the kernel function of the support vector machine to be trained, wherein, when re-searching the support vector machine kernel function, the number of kernel functions may be increased on the basis of the support vector machine kernel function searched last time, so as to increase the complexity of the kernel function of the support vector machine to be trained; and so on. The present application does not limit the method of iteratively updating the support vector machine to be trained.

[0077] Furthermore, for the iteratively updated support vector machine to be trained, it is trained again according to the K training subsets to generate K support vector machine models, and the K validation subsets are used to evaluate the K support vector machine models to generate the scoring values ​​of the K support vector machine models, and the iteratively updated support vector machine to be trained is iteratively updated again according to the scoring values. That is, for the iteratively updated support vector machine to be trained, the above steps 103 to 105 are repeatedly performed until the scoring values ​​of the K support vector machine models meet the scoring requirements or the number of iterative updates N reaches the preset number of iterations, the search ends, and the finally generated support vector machine is obtained.

[0078] The method for generating a support vector machine in this embodiment obtains a training set and a validation set, and divides the training set and the validation set into K training subsets and K validation subsets, and generates a kernel function search space, and generates a support vector machine to be trained according to the kernel function search space, then trains the support vector machine to be trained according to the K training subsets to generate K support vector machine models, and uses K validation subsets to evaluate the K support vector machine models respectively to generate scoring values ​​of the K support vector machine models, and performs N iterative updates on the support vector machine to be trained according to the scoring values ​​of the K support vector machine models, until the scoring values ​​of the K support vector machine models meet the scoring requirements or N reaches a preset number of iterations, thereby realizing the automatic generation of the support vector machine. Moreover, the kernel function search space of the present application includes all possible kernel functions and kernel function combinations. By automatically searching in the kernel function search space, a complex support vector machine kernel function can be searched, so that the support vector machine obtained according to the searched support vector machine kernel function has a complex kernel function, thereby reducing the probability that the support vector machine in the prior art can only use simple kernel functions, resulting in limited nonlinear representation capabilities of the support vector machine, so that the support vector machine can obtain better nonlinear representation capabilities, thereby ensuring the performance of the support vector machine and improving the robustness of the support vector machine.

[0079] In a possible implementation of the embodiment of the present application, when the training set and the validation set are divided into K training subsets and K validation subsets, the training set and the validation set can be divided into K training subsets and K validation subsets by a K-fold cross partitioning algorithm.

[0080] The K-fold cross partitioning algorithm divides all data sets into K parts, takes one of them as the validation subset without duplication each time, and uses the other K-1 parts as the training subsets for training the model, resulting in a total of K combinations of training subsets and validation subsets.

[0081] For example, assuming K=5, in this embodiment, all data contained in the training set and the validation set are randomly divided into K parts, and each piece of data is numbered 1, 2, 3, 4, and 5 respectively. Then, the combination of the training subset and the validation subset obtained by the division is as follows:

[0082] (1) 1, 2, 3, 4 are used as training subsets, and 5 is used as validation subset;

[0083] (2) 1, 2, 3, 5 are used as training subsets, and 4 is used as validation subset;

[0084] (3) 1, 2, 4, 5 are used as training subsets, and 3 is used as validation subset;

[0085] (4) 1, 3, 4, 5 are used as training subsets, and 2 is used as validation subset;

[0086] (5) 2, 3, 4, 5 are used as training subsets, and 1 is used as validation subset.

[0087] It can be seen that after the 5-fold cross partitioning algorithm is used, 5 training subsets and 5 validation subsets corresponding to each training subset are obtained.

[0088] Since the K-fold cross partition algorithm randomly divides the data into K parts, one part is selected as the validation subset without duplication each time, and the remaining K-1 parts are used as the validation subset. Therefore, the training set and the validation set are divided into K training subsets and K validation subsets according to the K-fold cross partition algorithm, which ensures the randomness of the training subsets and the validation subsets. The support vector machine model trained based on the training subset can improve the accuracy of the evaluation results after being evaluated on the validation subset, which is conducive to improving the performance and robustness of the support vector machine finally obtained.

[0089] In order to more clearly describe the specific implementation process of generating a support vector machine to be trained according to the kernel function search space in the above embodiment, Figure 2 Provide detailed explanation.

[0090] Figure 2 FIG. 1 is a flow chart of a method for generating a support vector machine according to the second embodiment of the present application. Figure 2 As shown, in Figure 1 Based on the illustrated embodiment, in step 102, generating a support vector machine to be trained according to the kernel function search space may include the following steps:

[0091] Step 201: Generate a support vector machine kernel function sequence generator according to the kernel function search space.

[0092] Step 202: Generate a support vector machine kernel function sequence according to a support vector machine kernel function sequence generator.

[0093] Step 203: Generate a support vector machine kernel function according to the support vector machine kernel function sequence and the kernel function search space.

[0094] Step 204: Generate a support vector machine to be trained according to the support vector machine kernel function.

[0095] As mentioned above, the kernel function search space is generated according to preset design rules, which define all possibilities, and the kernel function search space is the set of all possibilities. Therefore, in this embodiment, the support vector machine kernel function sequence generator can be initialized according to the kernel function search space to generate the support vector machine kernel function sequence generator.

[0096] Among them, the support vector machine kernel function sequence generator can be randomly initialized, each possibility in the kernel function search space corresponds to an initialization result, and by randomly initializing according to the kernel function search space, a support vector machine kernel function sequence generator can be randomly obtained.

[0097] The support vector machine kernel function sequence generator can generate a support vector machine kernel function sequence. The support vector machine kernel function sequence is a modeling method that uses a set of sequences to uniquely correspond to a possibility, that is, the support vector machine kernel function sequence generator generates a unique corresponding support vector machine kernel function sequence.

[0098] The support vector machine kernel function sequence can represent the support vector machine kernel function selected for support vector machine modeling. According to the support vector machine kernel function sequence and the kernel function search space, the support vector machine kernel function can be generated. Furthermore, according to the support vector machine kernel function, the support vector machine to be trained can be generated.

[0099] For example, assuming that the support vector machine kernel function sequence generated by the support vector machine kernel function sequence generator is [22,53], in the kernel function search space, 22 represents a polynomial kernel with a hyperparameter a, and 53 represents a radial basis function kernel with a hyperparameter b. Then, based on the support vector machine kernel function sequence and the kernel function search space, it can be determined that the searched support vector machine kernel function is a combined kernel function of a polynomial kernel with a hyperparameter a and a radial basis function kernel with a hyperparameter b. Based on the searched combined kernel function, a support vector machine to be trained can be generated, and the kernel function of the support vector machine to be trained includes a polynomial kernel with a hyperparameter a and a radial basis function kernel with a hyperparameter b.

[0100] In order to optimize the support vector machine kernel function sequence generated by the support vector machine kernel function sequence generator, each kernel function of each hyperparameter contained in the kernel function search space and the possible combinations between different kernel functions can be encoded to facilitate the expression of the support vector machine kernel function sequence. After the support vector machine kernel function sequence generator generates the support vector machine kernel function sequence, the support vector machine kernel function sequence is decoded according to the kernel function search space to obtain the corresponding support vector machine kernel function. For example, for each possibility in the kernel function search space, the encoding can be started from 1. The support vector machine kernel function sequence generated by the support vector machine kernel function sequence generator is the encoded data, such as 1, which is much simpler than the sequence [22,53] and other data. Then, according to the encoding of each possibility in the kernel function search space, the support vector machine kernel function sequence is decoded to obtain the support vector machine kernel function corresponding to the support vector machine kernel function sequence.

[0101] Then, according to the obtained support vector machine kernel function, the support vector machine to be trained can be generated. For example, the code corresponding to a possible kernel function combination [551,666,321,222] in the kernel function search space is 5. After obtaining the support vector machine kernel function sequence 5, by decoding according to the kernel function search space, the kernel function combination scheme can be determined to be [551,666,321,222]. Then, according to the kernel function corresponding to 551, the kernel function corresponding to 666, the kernel function corresponding to 321 and the kernel function corresponding to 222, the support vector machine kernel function is combined, and the support vector machine to be trained is generated according to the support vector machine kernel function obtained by the combination.

[0102] The method for generating a support vector machine in this embodiment generates a support vector machine kernel function sequence generator according to a kernel function search space, then generates a support vector machine kernel function sequence according to the support vector machine kernel function sequence generator, and generates a support vector machine kernel function according to the support vector machine kernel function sequence and the kernel function search space, and then generates a support vector machine to be trained according to the support vector machine kernel function. In this way, automatic search for the support vector machine kernel function from the kernel function search space is achieved, the randomness of the support vector machine kernel function is guaranteed, and thus the randomness of the support vector machine is guaranteed.

[0103] Figure 3 FIG. 1 is a flow chart of a method for generating a support vector machine according to the third embodiment of the present application. Figure 2 Based on the embodiment shown, Figure 3 As shown, step 105 may include the following steps:

[0104] Step 301, respectively obtain K score values ​​of K support vector machine models.

[0105] Step 302: Generate an average score value according to the K score values ​​of the K support vector machine models.

[0106] In this embodiment, for any one of the K support vector machine models, the validation subset corresponding to the training subset is used for evaluation, and the corresponding score value is obtained. For the K support vector machine models, K score values ​​can be obtained. Then, the average score value of the K score values ​​can be calculated based on the K score values.

[0107] Step 303: If the average score value is less than the score requirement and the current iteration number N is less than the preset iteration number, the support vector machine kernel function sequence generator is further updated.

[0108] Step 304: Update the support vector machine to be trained by using the updated support vector machine kernel function sequence generator.

[0109] As an example, the scoring requirement may be a preset performance standard threshold, such as setting the performance standard threshold to 90%. In this example, when the average score of the K score values ​​is less than the preset performance standard threshold, it is determined that the average score does not meet the scoring requirement, and at this time, it is further determined whether the current number of iterations N is less than the preset number of iterations. If the current number of iterations N is less than the preset number of iterations, the support vector machine kernel function sequence generator is further updated.

[0110] In the embodiment of the present application, the support vector machine kernel function sequence generator may be a neural network module, or may be an evolutionary algorithm module. For different modules, the support vector machine kernel function sequence generator may be updated in different ways.

[0111] As a possible implementation method, when the support vector machine kernel function sequence generator is a neural network module, the support vector machine kernel function sequence generator can be updated by a back-propagation algorithm.

[0112] As a possible implementation method, when the support vector machine kernel function sequence generator is an evolutionary algorithm module, the support vector machine kernel function sequence generator can be updated by a population update algorithm.

[0113] In this embodiment, when the support vector machine kernel function sequence generator is a neural network module, the support vector machine kernel function sequence generator is updated by a back-propagation algorithm; when the support vector machine kernel function sequence generator is an evolutionary algorithm module, the support vector machine kernel function sequence generator is updated by a population update algorithm. Thus, different update methods are provided for updating the support vector machine kernel function sequence generator for different support vector machine kernel function sequence generators, thereby improving the flexibility of the method.

[0114] Next, after the support vector machine kernel function sequence generator is updated, the support vector machine to be trained can be updated by the updated support vector machine kernel function sequence generator. As mentioned above, the support vector machine kernel function sequence generator generates a unique corresponding support vector machine kernel function sequence. After the support vector machine kernel function sequence generator is updated, the support vector machine kernel function sequence generated by the support vector machine kernel function sequence generator also changes accordingly. Therefore, the support vector machine kernel function generated according to the support vector machine kernel function sequence and the kernel function search space also changes accordingly. The support vector machine to be trained can be updated by using the changed support vector machine kernel function.

[0115] The method for generating a support vector machine in this embodiment obtains K scoring values ​​of K support vector machine models respectively, generates an average scoring value according to the K scoring values ​​of the K support vector machine models, and further updates the support vector machine kernel function sequence generator when the average scoring value is less than the scoring requirement and the current number of iterations N is less than the preset number of iterations, and then updates the support vector machine to be trained through the updated support vector machine kernel function sequence generator. As a result, it is achieved that when the number of iterations does not reach the preset number of iterations, it is determined whether to update the support vector machine to be trained according to the average scoring value of the support vector machine model, and it is achieved that the support vector machine models that do not meet the scoring requirements are iteratively updated to ensure that the support vector machine that meets the scoring requirements is obtained as much as possible, which provides conditions for generating a support vector machine with good performance and good robustness.

[0116] In order to more clearly describe the specific implementation process of generating the kernel function search space in the above embodiment, Figure 4 Provide detailed explanation.

[0117] Figure 4 is a flow chart of a method for generating a support vector machine according to the fourth embodiment of the present application, such as Figure 4 As shown, in Figure 1 Based on the embodiment shown, in step 102, generating a kernel function search space can be achieved by the following steps:

[0118] Step 401, obtaining multiple polynomial kernels of multiple hyperparameters required for the kernel function search space.

[0119] Among them, the parameter values ​​of the hyperparameters of the polynomial kernel can be pre-set.

[0120] In this embodiment, any value can be set as the parameter value of the hyperparameter. For the polynomial kernel, any different hyperparameter values ​​can be set to obtain polynomial kernels with multiple different hyperparameters.

[0121] Step 402: Acquire multiple radial basis function kernels of multiple hyperparameters required in the kernel function search space.

[0122] Among them, the parameter values ​​of the hyperparameters of the radial basis function kernel can be preset.

[0123] In this embodiment, any value may be set as the parameter value of the hyperparameter. For the radial basis function kernel, any different hyperparameter values ​​may be set to obtain radial basis function kernels with multiple different hyperparameters.

[0124] Step 403: Acquire multiple Laplacian kernels of multiple hyperparameters required for the kernel function search space.

[0125] Among them, the parameter values ​​of the hyperparameters of the radial basis function kernel can be preset.

[0126] In this embodiment, any value can be set as the parameter value of the hyperparameter. For the Laplace kernel, any different hyperparameter values ​​can be set to obtain Laplace kernels with multiple different hyperparameters.

[0127] Step 404: Acquire multiple nonlinear function Sigmoid kernels of multiple hyperparameters required in the kernel function search space.

[0128] Among them, the parameter values ​​of the hyperparameters of the Sigmoid kernel can be set in advance.

[0129] In this embodiment, any value can be set as the parameter value of the hyperparameter. For the Sigmoid kernel, any different hyperparameter values ​​can be set to obtain Sigmoid kernels with multiple different hyperparameters.

[0130] Step 405 , generating a plurality of kernel function combinations according to a plurality of polynomial kernels, a plurality of radial basis function kernels, a plurality of Laplace kernels, and a plurality of Sigmoid kernels, wherein the kernel function combinations include at least two different kernel functions.

[0131] In this embodiment, for the obtained multiple polynomial kernels, multiple radial basis function kernels, multiple Laplace kernels and multiple Sigmoid kernels of any hyperparameter, at least two different kernel functions can be arbitrarily combined to obtain multiple kernel function combinations.

[0132] It should be noted that in this embodiment, different kernel functions refer to both the same type of kernel functions with different hyperparameter values ​​and different types of kernel functions. For example, a polynomial kernel with hyperparameter a and a polynomial kernel with hyperparameter b are two different kernel functions; a polynomial kernel with hyperparameter a and a Sigmoid kernel with hyperparameter c are two different kernel functions; a polynomial kernel with hyperparameter a and a Sigmoid kernel with hyperparameter a are also two different kernel functions.

[0133] By arbitrarily combining at least two different kernel functions to obtain multiple kernel function combinations, all possibilities of kernel function combinations can be obtained, including combinations of the same type of kernel functions with different hyperparameters, combinations of different types of kernel functions with the same hyperparameters, and combinations of different types of kernel functions with different hyperparameters.

[0134] Among them, in the combination of different types of kernel functions with different hyperparameters, different hyperparameters refer to that the parameter value of at least one hyperparameter among all the hyperparameters of the combined kernel functions is different from the parameter values ​​of other hyperparameters. Similarly, different types of kernel functions refer to that the type of at least one kernel function in the combined kernel function is different from the types of other kernel functions.

[0135] Step 406 , construct a kernel function search space according to multiple polynomial kernels, multiple radial basis function kernels, multiple Laplace kernels, multiple Sigmoid kernels, and multiple kernel function combinations.

[0136] In this embodiment, after obtaining multiple polynomial kernels, multiple radial basis function kernels, multiple Laplace kernels, multiple Sigmoid kernels and multiple kernel function combinations, a kernel function search space can be constructed based on the multiple polynomial kernels, multiple radial basis function kernels, multiple Laplace kernels, multiple Sigmoid kernels and multiple kernel function combinations. The kernel function search space can generate any support vector machine kernel function that meets the above conditions.

[0137] The method for generating a support vector machine of this embodiment, by constructing a kernel function search space according to the multiple polynomial kernels, multiple radial basis function kernels, multiple Laplace kernels, multiple Sigmoid kernels and multiple kernel function combinations required by the kernel function search space obtained, lays the foundation for automatically searching and generating a support vector machine kernel function and then generating a support vector machine, and by obtaining multiple kernel function combinations, the searched support vector machine kernel function can be a combination of complex different kernel functions, which is conducive to improving the nonlinear characterization ability of the support vector machine. In addition, the early NAS did not limit the search space, and even required a graphics processor of seven or eight hundred blocks during the search, and trained for a month to obtain a converged model, requiring more hardware equipment, and the search speed was slow; while in the present application, by generating a kernel function search space, searching in the kernel function search space to generate a support vector machine kernel function and then generating a support vector machine, the kernel function search space defines the variables of the optimization problem, and the variable scale determines the difficulty and search time of the search algorithm, so by defining a reasonable kernel function search space for searching, the search speed and efficiency can be accelerated, the use of hardware equipment can be reduced, and the hardware cost can be saved.

[0138] The solution provided by the present application can be applied to image processing. For example, when the input of the support vector machine is the features extracted by the deep learning network, the solution provided by the present application can be applied to tasks such as classification tasks, target detection tasks, face detection tasks, and face and body key point detection tasks in image processing. Since the support vector machine generated by the solution provided by the present application has good performance and robustness, when the support vector machine is used to complete tasks such as classification tasks, target detection tasks, and face detection tasks, the accuracy of task processing can be improved. For classification tasks, the accuracy of classification can be improved, and for target detection tasks, the accuracy of target detection results can be improved.

[0139] According to an embodiment of the present application, the present application also provides a device for generating a support vector machine.

[0140] Figure 5 FIG. 5 is a schematic diagram of the structure of a device for generating a support vector machine according to the fifth embodiment of the present application. Figure 5 As shown, the support vector machine generating device 50 includes: an acquisition module 510, a first generating module 520, a second generating module 530, a training module 540, a verification module 550 and an updating module 560.

[0141] The acquisition module 510 is used to acquire a training set and a validation set, and divide the training set and the validation set into K training subsets and K validation subsets, where K is a positive integer.

[0142] In a possible implementation of the embodiment of the present application, the acquisition module 510 divides the training set and the validation set into K training subsets and K validation subsets by using a K-fold cross partitioning algorithm.

[0143] The first generating module 520 is used to generate a kernel function search space.

[0144] The second generating module 530 is used to generate a support vector machine to be trained according to the kernel function search space.

[0145] The training module 540 is used to train the support vector machine to be trained according to the K training subsets to generate K support vector machine models.

[0146] The verification module 550 is used to evaluate the K support vector machine models using the K verification subsets respectively to generate score values ​​of the K support vector machine models.

[0147] The updating module 560 is used to perform N iterative updates on the support vector machine to be trained according to the scoring values ​​of the K support vector machine models, until the scoring values ​​of the K support vector machine models meet the scoring requirements or N reaches a preset number of iterations, where N is a positive integer.

[0148] In a possible implementation of the embodiment of the present application, as Figure 6 As shown, in Figure 5 Based on the illustrated embodiment, the second generation module 530 includes:

[0149] A first generating unit 531 is used to generate a support vector machine kernel function sequence generator according to the kernel function search space;

[0150] A second generating unit 532, configured to generate a support vector machine kernel function sequence according to the support vector machine kernel function sequence generator;

[0151] A third generating unit 533 is used to generate a support vector machine kernel function according to the support vector machine kernel function sequence and the kernel function search space; and

[0152] The fourth generating unit 534 is used to generate the support vector machine to be trained according to the support vector machine kernel function.

[0153] In a possible implementation of the embodiment of the present application, as Figure 7 As shown, in Figure 6 Based on the illustrated embodiment, the update module 560 includes:

[0154] A score value acquisition unit 561 is used to respectively acquire K score values ​​of the K support vector machine models;

[0155] A calculation unit 562, configured to generate an average score value according to the K score values ​​of the K support vector machine models;

[0156] A first updating unit 563, configured to further update the support vector machine kernel function sequence generator if the average score value is less than the score requirement and the current iteration number N is less than the preset iteration number;

[0157] In a possible implementation method of the embodiment of the present application, the support vector machine kernel function sequence generator is a neural network module or an evolutionary algorithm module. The first update unit 563 updates the support vector machine kernel function sequence generator through a back propagation algorithm when the support vector machine kernel function sequence generator is the neural network module; and updates the support vector machine kernel function sequence generator through a population update algorithm when the support vector machine kernel function sequence generator is the evolutionary algorithm module.

[0158] The second updating unit 564 is used to update the support vector machine to be trained by using the updated support vector machine kernel function sequence generator.

[0159] In a possible implementation of the embodiment of the present application, as Figure 8 As shown, in Figure 5 Based on the illustrated embodiment, the first generation module 520 includes:

[0160] A first acquisition unit 521 is used to acquire multiple polynomial kernels of multiple hyperparameters required for the kernel function search space;

[0161] A second acquisition unit 522 is used to acquire multiple radial basis function kernels of multiple hyperparameters required by the kernel function search space;

[0162] A third acquisition unit 523 is used to acquire multiple Laplace kernels of multiple hyperparameters required by the kernel function search space;

[0163] A fourth acquisition unit 524 is used to acquire multiple nonlinear function Sigmoid kernels of multiple hyperparameters required by the kernel function search space;

[0164] a combining unit 525, configured to generate a plurality of kernel function combinations according to the plurality of polynomial kernels, the plurality of radial basis function kernels, the plurality of Laplace kernels, and the plurality of Sigmoid kernels, wherein the kernel function combination includes at least two different kernel functions; and

[0165] The construction unit 526 is used to construct the kernel function search space according to the multiple polynomial kernels, the multiple radial basis function kernels, the multiple Laplace kernels, the multiple Sigmoid kernels and the multiple kernel function combinations.

[0166] It should be noted that the above explanation of the embodiment of the method for generating a support vector machine is also applicable to the device for generating a support vector machine in this embodiment, and the implementation principles are similar, which will not be repeated here.

[0167] The device for generating a support vector machine in the embodiment of the present application obtains a training set and a validation set, and divides the training set and the validation set into K training subsets and K validation subsets, and generates a kernel function search space, and generates a support vector machine to be trained according to the kernel function search space, then trains the support vector machine to be trained according to the K training subsets to generate K support vector machine models, and uses K validation subsets to evaluate the K support vector machine models respectively to generate scoring values ​​of the K support vector machine models, and performs N iterative updates on the support vector machine to be trained according to the scoring values ​​of the K support vector machine models until the scoring values ​​of the K support vector machine models meet the scoring requirements or N reaches a preset number of iterations, thereby realizing automatic generation of the support vector machine. Moreover, the kernel function search space of the present application includes all possible kernel functions and kernel function combinations. By automatically searching in the kernel function search space, a complex support vector machine kernel function can be searched, so that the support vector machine obtained according to the searched support vector machine kernel function has a complex kernel function, thereby reducing the probability that the support vector machine in the prior art can only use simple kernel functions, resulting in limited nonlinear representation capabilities of the support vector machine, so that the support vector machine can obtain better nonlinear representation capabilities, thereby ensuring the performance of the support vector machine and improving the robustness of the support vector machine.

[0168] According to an embodiment of the present application, the present application also provides an electronic device and a readable storage medium.

[0169] like Fig. 9 , is a block diagram of an electronic device for implementing the generation method of the support vector machine of an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples, and are not intended to limit the implementation of the present application described herein and / or required.

[0170] like Fig. 9As shown, the electronic device includes: one or more processors 701, a memory 702, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig. 9 A processor 701 is taken as an example.

[0171] The memory 702 is a non-transient computer-readable storage medium provided in the present application. The memory stores instructions executable by at least one processor to enable the at least one processor to perform the method for generating a support vector machine provided in the present application. The non-transient computer-readable storage medium of the present application stores computer instructions, which are used to enable a computer to perform the method for generating a support vector machine provided in the present application.

[0172] The memory 702 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as the program instructions / modules corresponding to the method for generating a support vector machine in the embodiment of the present application (for example, the attached Figure 5 The processor 701 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 702, that is, the generation method of the support vector machine in the above method embodiment is implemented.

[0173] The memory 702 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of an electronic device that executes the method for generating a support vector machine, etc. In addition, the memory 702 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 702 may optionally include a memory remotely arranged relative to the processor 701, and these remote memories may be connected to the electronic device that executes the method for generating a support vector machine via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0174] The electronic device for executing the method for generating a support vector machine may further include: an input device 703 and an output device 704. The processor 701, the memory 702, the input device 703 and the output device 704 may be connected via a bus or other means. Fig. 9 The example of connecting through bus is taken in the following.

[0175] The input device 703 can receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device that executes the generation method of the support vector machine, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick and other input devices. The output device 704 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display and a plasma display. In some embodiments, the display device may be a touch screen.

[0176] Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0177] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0178] These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or means (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0179] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0180] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0181] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

[0182] According to the technical solution of the embodiment of the present application, a kernel function search space is generated, and a support vector machine to be trained is generated according to the kernel function search space, and then the generated support vector machine to be trained is trained using the obtained K training subsets to obtain K support vector machine models, and the obtained K validation sets are used to perform performance evaluation on the K support vector machine models to obtain score values ​​of the K support vector machine models. When the score values ​​of the K support vector machine models do not meet the score requirements and do not reach the preset number of iterations, the support vector machine to be trained is iteratively updated until the score values ​​of the K support vector machine models meet the score requirements or the number of iterations N reaches the preset number of iterations, thereby realizing the automatic generation of the support vector machine. Moreover, the kernel function search space of the present application includes all possible kernel functions and kernel function combinations. By automatically searching in the kernel function search space, a complex support vector machine kernel function can be searched, so that the support vector machine obtained according to the searched support vector machine kernel function has a complex kernel function, thereby reducing the probability that the support vector machine in the prior art can only use simple kernel functions, resulting in limited nonlinear representation capabilities of the support vector machine, so that the support vector machine can obtain better nonlinear representation capabilities, thereby ensuring the performance of the support vector machine and improving the robustness of the support vector machine.

[0183] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.

[0184] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A method for generating a support vector machine, comprising: Obtaining a training set and a validation set, and dividing the training set and the validation set into K training subsets and K validation subsets, where K is a positive integer; the training set and the validation set include image or speech samples; Generate a kernel function search space, and generate a support vector machine to be trained according to the kernel function search space; Training the support vector machine to be trained according to the K training subsets to generate K support vector machine models; Using the K validation subsets respectively to evaluate the K support vector machine models to generate score values ​​of the K support vector machine models; and Performing N iterations of updating the support vector machine to be trained according to the score values ​​of the K support vector machine models until the score values ​​of the K support vector machine models meet the score requirements or N reaches a preset number of iterations, where N is a positive integer; Wherein, generating a support vector machine to be trained according to the kernel function search space includes: Generate a support vector machine kernel function sequence generator according to the kernel function search space; Generate a support vector machine kernel function sequence according to the support vector machine kernel function sequence generator; and Generate a support vector machine kernel function according to the support vector machine kernel function sequence and the kernel function search space; and The support vector machine to be trained is generated according to the support vector machine kernel function.

2. The method for generating a support vector machine according to claim 1, wherein: The step of iteratively updating the support vector machine to be trained N times according to the score values ​​of the K support vector machine models comprises: Obtaining K score values ​​of the K support vector machine models respectively; Generate an average score value according to the K score values ​​of the K support vector machine models; If the average score value is less than the score requirement, and the current number of iterations N is less than the preset number of iterations, further updating the support vector machine kernel function sequence generator; and The support vector machine to be trained is updated by using the updated support vector machine kernel function sequence generator.

3. The method for generating a support vector machine as claimed in claim 2, wherein: The support vector machine kernel function sequence generator is a neural network module or an evolutionary algorithm module, wherein the further updating of the support vector machine kernel function sequence generator comprises: When the support vector machine kernel function sequence generator is the neural network module, updating the support vector machine kernel function sequence generator by a back propagation algorithm; When the support vector machine kernel function sequence generator is the evolutionary algorithm module, the support vector machine kernel function sequence generator is updated by a population update algorithm.

4. The method for generating a support vector machine according to claim 1, wherein: The generating kernel function search space comprises: Obtaining multiple polynomial kernels of multiple hyperparameters required for the kernel function search space; Obtaining multiple radial basis function kernels of multiple hyperparameters required for the kernel function search space; Obtaining multiple Laplace kernels of multiple hyperparameters required for the kernel function search space; Obtaining multiple nonlinear function Sigmoid kernels of multiple hyperparameters required for the kernel function search space; Generate a plurality of kernel function combinations according to the plurality of polynomial kernels, the plurality of radial basis function kernels, the plurality of Laplace kernels, and the plurality of Sigmoid kernels, wherein the kernel function combinations include at least two different kernel functions; and The kernel function search space is constructed according to the multiple polynomial kernels, the multiple radial basis function kernels, the multiple Laplace kernels, the multiple Sigmoid kernels, and the multiple kernel function combinations.

5. The method for generating a support vector machine according to claim 1, wherein: The step of dividing the training set and the validation set into K training subsets and K validation subsets comprises: The training set and the validation set are divided into K training subsets and K validation subsets by a K-fold cross partitioning algorithm.

6. A device for generating a support vector machine, comprising: An acquisition module, used for acquiring a training set and a verification set, and dividing the training set and the verification set into K training subsets and K verification subsets, wherein K is a positive integer; the training set and the verification set include image or voice samples; A first generation module is used to generate a kernel function search space; A second generating module, used for generating a support vector machine to be trained according to the kernel function search space; A training module, used for training the support vector machine to be trained according to the K training subsets to generate K support vector machine models; A verification module, configured to respectively use the K verification subsets to evaluate the K support vector machine models to generate scoring values ​​of the K support vector machine models; and An updating module, configured to iteratively update the support vector machine to be trained N times according to the scoring values ​​of the K support vector machine models, until the scoring values ​​of the K support vector machine models meet the scoring requirements or N reaches a preset number of iterations, where N is a positive integer; Wherein, the second generation module includes: A first generating unit, used for generating a support vector machine kernel function sequence generator according to the kernel function search space; A second generating unit, used for generating a support vector machine kernel function sequence according to the support vector machine kernel function sequence generator; A third generating unit is used to generate a support vector machine kernel function according to the support vector machine kernel function sequence and the kernel function search space; and The fourth generating unit is used to generate the support vector machine to be trained according to the support vector machine kernel function.

7. The device for generating a support vector machine according to claim 6, wherein: The update module comprises: A scoring value acquisition unit, used to respectively acquire K scoring values ​​of the K support vector machine models; A calculation unit, used for generating an average score value according to the K score values ​​of the K support vector machine models; A first updating unit, configured to further update the support vector machine kernel function sequence generator if the average score value is less than the score requirement and the current iteration number N is less than the preset iteration number; and The second updating unit is used to update the support vector machine to be trained by using the updated support vector machine kernel function sequence generator.

8. The device for generating a support vector machine according to claim 7, wherein: The support vector machine kernel function sequence generator is a neural network module or an evolutionary algorithm module. The first update unit updates the support vector machine kernel function sequence generator through a back propagation algorithm when the support vector machine kernel function sequence generator is the neural network module; and updates the support vector machine kernel function sequence generator through a population update algorithm when the support vector machine kernel function sequence generator is the evolutionary algorithm module.

9. The device for generating a support vector machine according to claim 6, wherein: The first generating module comprises: A first acquisition unit, used to acquire multiple polynomial kernels of multiple hyperparameters required for the kernel function search space; A second acquisition unit, used to acquire multiple radial basis function kernels of multiple hyperparameters required by the kernel function search space; A third acquisition unit, used to acquire multiple Laplace kernels of multiple hyperparameters required for the kernel function search space; A fourth acquisition unit, used to acquire multiple nonlinear function Sigmoid kernels of multiple hyperparameters required for the kernel function search space; a combining unit, configured to generate a plurality of kernel function combinations according to the plurality of polynomial kernels, the plurality of radial basis function kernels, the plurality of Laplace kernels, and the plurality of Sigmoid kernels, wherein the kernel function combination includes at least two different kernel functions; and A construction unit is used to construct the kernel function search space according to the multiple polynomial kernels, the multiple radial basis function kernels, the multiple Laplace kernels, the multiple Sigmoid kernels and the multiple kernel function combinations.

10. The device for generating a support vector machine according to claim 6, wherein: The acquisition module divides the training set and the validation set into K training subsets and K validation subsets by using a K-fold cross partitioning algorithm.

11. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for generating a support vector machine according to any one of claims 1 to 5.

12. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method for generating a support vector machine according to any one of claims 1 to 5.