Classification method based on lightweight TSK fuzzy classifier and electronic equipment

By using the membership layer and feature fusion function in the TSK fuzzy classifier for feature processing, and updating the output function through the gradient descent algorithm, the problem of slow operation speed caused by iterative optimization during the training process of the TSK fuzzy classifier is solved, and efficient Model training and semantic interpretability.

CN118734145APending Publication Date: 2024-10-01THE HONG KONG POLYTECHNIC UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310323372.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-29
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The TSK fuzzy classifier requires multiple iterative optimizations during the training process, which results in a large amount of calculation and slow speed. Furthermore, using only constant terms in linear functions for iterative optimization will result in parameter loss and reduced computing performance.

Method used

By obtaining the feature values ​​of the training samples input by the user in multiple preset feature dimensions, fuzzification processing is performed on the membership layer to generate membership values, de-fuzzification processing is performed to obtain clear values, and the feature fusion function and output function are used for fusion processing. And iteratively updates through the gradient descent algorithm to generate a lightweight TSK fuzzy classifier.

Benefits of technology

It improves the computing speed of model training, maintains high semantic interpretability, significantly improves the computing speed, and effectively utilizes computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118734145A_ABST
    Figure CN118734145A_ABST
Patent Text Reader

Abstract

The embodiment of the invention is suitable for the technical field of computers, and provides a classification method based on a lightweight TSK fuzzy classifier and electronic equipment, and the method comprises the steps: obtaining a plurality of feature values of a training sample, and carrying out the fuzzification of the plurality of feature values through a membership layer, and obtaining a plurality of membership values; performing defuzzification on the plurality of membership values to obtain a plurality of clear values, and performing fusion processing on the plurality of clear values and the plurality of feature values through a feature fusion function to generate a plurality of fusion feature values; fitting the plurality of fusion feature values through an output function to generate a lightweight TSK fuzzy classifier; and classifying the to-be-classified object based on the lightweight TSK fuzzy classifier, and generating a classification result and a plurality of fuzzy logic conditions. According to the method provided by the embodiment of the invention, classification calculation is carried out, and the operation speed of the lightweight TSK fuzzy classifier can be accelerated while the high semantic interpretability of the classification result is kept.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application belong to the field of computer technology, and in particular, relate to a classifier, device, electronic device and storage medium based on a lightweight TSK fuzzy classifier. Background Art

[0002] The TSK fuzzy classifier can fit the nonlinear relationship between each eigenvalue through multiple linear systems to calculate the classification results between each eigenvalue. Therefore, the TSK fuzzy classifier is often used in various classification scenarios, such as autonomous driving decision-making scenarios. The TSK fuzzy classifier is mainly composed of a precondition network and a postcondition network. The precondition network mainly maps the input eigenvalue to the corresponding fuzzy set through multiple fuzzy rules to achieve fuzzification of the input eigenvalue. The postcondition network is composed of multiple linear functions related to the eigenvalues. Through multiple linear functions, the postcondition network can fit the relationship between the input eigenvalues ​​and various classification results. That is, the fuzzified input eigenvalues ​​can be converted into actual output values ​​through the postcondition network, that is, the fuzzy set is mapped to the actual output space. However, in the training process of the TSK fuzzy classifier, the postcondition network needs to be iteratively optimized multiple times so that the postcondition network can accurately fit the relationship between the input eigenvalues ​​and various classification results. The TSK fuzzy classifier needs to be trained thousands of times through training samples before use. When there are too many weight parameters that need to be iteratively optimized during model training, it is easy to make the TSK fuzzy classifier's computational workload too large, resulting in the TSK fuzzy classifier's computational speed being too slow.

[0003] In the prior art, the calculation speed of the TSK fuzzy classifier is often improved by using only the constant term in the linear function for iterative optimization. However, using only the constant term in the linear function for iterative optimization will result in a large number of parameter losses, causing the TSK fuzzy classifier to lose the advantage of linearly combining input features, greatly reducing the calculation performance of the TSK fuzzy classifier. Summary of the invention

[0004] In view of this, an embodiment of the present application provides a classification method based on a lightweight TSK fuzzy classifier to improve the operation speed of the lightweight TSK fuzzy classifier.

[0005] A first aspect of an embodiment of the present application provides a classification method based on a lightweight TSK fuzzy classifier, comprising:

[0006] Acquire multiple feature values ​​of a training sample input by a user in multiple preset feature dimensions, and perform fuzzy processing on the multiple feature values ​​through a membership layer to obtain membership values ​​corresponding to each of the feature values; the membership values ​​are used to indicate the degree of correlation between the training sample and the cluster center corresponding to each of the preset feature dimensions;

[0007] A plurality of clear values ​​are obtained by performing a defuzzification process on the plurality of membership values, and a plurality of clear values ​​and a plurality of feature values ​​are fused by a preset feature fusion function to generate a plurality of fused feature values;

[0008] The plurality of fused feature values ​​are fitted through a preset output function to generate a lightweight TSK fuzzy classifier trained based on the training sample; the feature fusion function and the output function in the lightweight TSK fuzzy classifier are generated after a preset number of iterative updates based on a preset gradient descent algorithm;

[0009] Based on the lightweight TSK fuzzy classifier, the object to be classified is classified, and a classification result of the object to be classified and a plurality of fuzzy logic conditions are generated; the fuzzy logic conditions are used to explain the relationship between the classification result and each characteristic value of the object to be classified.

[0010] A second aspect of an embodiment of the present application provides a classification device based on a lightweight TSK fuzzy classifier, comprising:

[0011] A fuzzification module is used to obtain multiple feature values ​​of a training sample input by a user in multiple preset feature dimensions, and to perform fuzzification processing on the multiple feature values ​​through a membership layer to obtain a membership value corresponding to each of the feature values; the membership value is used to indicate the degree of correlation between the training sample and the cluster center corresponding to each of the preset feature dimensions;

[0012] A fusion module, used for obtaining a plurality of clear values ​​by performing defuzzification processing on the plurality of membership values, and fusing the plurality of clear values ​​and the plurality of feature values ​​through a preset feature fusion function to generate a plurality of fused feature values;

[0013] An iteration module is used to fit the multiple fusion feature values ​​through a preset output function to generate a lightweight TSK fuzzy classifier trained based on the training sample; the feature fusion function and output function in the lightweight TSK fuzzy classifier are generated after a preset number of iterative updates based on a preset gradient descent algorithm;

[0014] A classification module is used to classify the objects to be classified based on the lightweight TSK fuzzy classifier, and generate a classification result of the objects to be classified and multiple fuzzy logic conditions; the fuzzy logic conditions are used to explain the relationship between the classification result and each feature value of the objects to be classified.

[0015] A third aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the classification method based on the lightweight TSK fuzzy classifier as described in the first aspect above is implemented.

[0016] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the classification method based on the lightweight TSK fuzzy classifier as described in the first aspect above.

[0017] A fifth aspect of the embodiments of the present application provides a computer program product. When the computer program product is run on a computer, the computer executes the classification method based on the lightweight TSK fuzzy classifier described in the first aspect.

[0018] Compared with the prior art, the embodiments of the present application have the following advantages:

[0019] During the model training process of the lightweight TSK fuzzy classifier provided in the embodiment of the present application, the electronic device can obtain multiple feature values ​​of the training samples input by the user in multiple preset feature dimensions, and fuzzify the multiple feature values ​​through the membership layer of the lightweight TSK fuzzy classifier; the membership layer can generate membership values ​​corresponding to each feature value through fuzzy processing; according to the membership value, the lightweight TSK fuzzy classifier can determine the degree of correlation between the training sample and the cluster center corresponding to each of the said feature dimensions; after generating the membership value, the lightweight TSK fuzzy classifier can perform defuzzification processing on the multiple membership values ​​in advance and obtain multiple clear values; the lightweight TSK fuzzy classifier can fuse the multiple clear values ​​and the multiple feature values ​​through a preset feature fusion function and generate multiple fused feature values; after obtaining the multiple fused feature values , the electronic device can fit multiple fusion feature values ​​through the output function in the lightweight TSK fuzzy classifier, and generate a lightweight TSK fuzzy classifier trained based on the training sample; wherein, during the model training process, the electronic device can also perform a preset number of iterations on the feature fusion function and the output function in the lightweight TSK fuzzy classifier based on the preset gradient descent algorithm, and generate a lightweight TSK fuzzy classifier trained based on the training sample; after the electronic device completes the model training, it can classify the object to be classified through the trained lightweight TSK fuzzy classifier, and generate a classification result and multiple fuzzy logic conditions corresponding to the object to be classified; by generating the fuzzy logic conditions, the lightweight TSK fuzzy classifier can explain to the user the relationship between the classification result and each feature value of the object to be classified. Since the lightweight TSK fuzzy classifier provided in this embodiment can update and iterate the feature fusion function and the output function through the gradient descent algorithm during model training, and generate the trained lightweight TSK fuzzy classifier according to the final iteratively updated feature fusion function and output function, the classification method provided in this embodiment can effectively improve the operation speed of the lightweight TSK fuzzy classifier during the model training process. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or prior art descriptions. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 It is a schematic diagram of the model structure of a lightweight TSK fuzzy classifier provided in an embodiment of the present application;

[0022] Figure 2is a schematic diagram of a classification method based on a lightweight TSK fuzzy classifier provided in an embodiment of the present application;

[0023] Figure 3 It is a specific implementation flow chart of a classification method S203 based on a lightweight TSK fuzzy classifier provided in the second embodiment of the present application;

[0024] Figure 4 It is a classification relationship diagram provided by an embodiment of the present application;

[0025] Figure 5 It is a specific implementation flow chart of a classification method S203 based on a lightweight TSK fuzzy classifier provided in the third embodiment of the present application;

[0026] Figure 6 is a schematic diagram of a classification device based on a lightweight TSK fuzzy classifier provided in an embodiment of the present application;

[0027] Figure 7 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] In the following description, specific details such as specific system structures, technologies, etc. are proposed for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from hindering the description of the present application.

[0029] Fuzzy classifier (FC) is a classification tool built by designers based on specific problems in a specific field. It is the main tool for solving classification problems in fuzzy systems. The reasoning process of fuzzy classifiers when solving classification problems is similar to the thinking and calculation process of humans. The reasoning process in fuzzy classifiers can be expressed in the form of multiple fuzzy logic conditions (also called fuzzy rules). Since the fuzzy classifier library simulates the process of human thinking and calculation, it is particularly suitable for fields with experience or knowledge with fuzzy characteristics. However, since the fuzzy classifier is built by designers based on specific problems in a specific field, it is impossible for the fuzzy classifier to self-update and iterate, making it difficult to achieve adaptive recognition tasks.

[0030] The TSK fuzzy classifier (Takagi-Sugeno model) is a new type of fuzzy classifier that combines fuzzy systems and neural networks. Since the TSK fuzzy classifier combines the advantages of fuzzy systems and neural networks, the TSK fuzzy classifier can not only iteratively optimize parameters by itself, but also the classification results output by the TSK fuzzy classifier are semantically interpretable. The TSK fuzzy classifier includes a precondition network and a postcondition network. The precondition network is used to extract the fuzzy features of the input variables and calculate the fitness of each fuzzy rule. The postcondition network contains multiple linear functions representing the input variables. In the postcondition network, the fitness of each fuzzy rule is multiplied by the linear function representing the input variable and defuzzified, and the corresponding prediction value of each input variable can be obtained. When the postcondition network calculates the linear function corresponding to the input variable, it is necessary to perform multiple iterative optimizations on the weight parameters in the linear function to obtain multiple linear functions that best represent the input variable. Among them, the TSK fuzzy classifier that only retains the constant term in the linear function for iterative optimization in the postcondition network can be called the 0th order TSK. The TSK fuzzy classifier that iteratively optimizes all weight parameters in the linear function in the post-process network can be called the 1st-order TSK. Since the number of weight parameters to be optimized in the 0th-order TSK is greatly reduced, the iterative optimization process can be replaced by the least squares method, the minimum learning machine, the extreme learning machine, etc., which greatly improves the training speed of the TSK fuzzy classifier. However, since only the constant terms in the linear function are retained for iterative optimization in the 0th-order TSK, it may not be able to provide effective classification results for some complex problems. It can be seen that the prior art lacks a technical solution to improve the operation speed of the TSK fuzzy classifier while maintaining the classification performance.

[0031] Reference Figure 1 , shows a schematic diagram of the model structure of a lightweight TSK fuzzy classifier provided in an embodiment of the present application. Figure 1 As shown, the Light Weight TSK Fuzzy Classifier model provided in the embodiment of the present application can be composed of 5 layers of neural networks, which are input layer, membership layer, rule layer, feature fusion layer and output layer in sequence according to the flow direction of input data. The dots in the figure can represent the various neural nodes that the data passes through in the Light Weight TSK Fuzzy Classifier model. The arrows in the figure can be used to indicate the direction of data flow.

[0032] The input layer of the lightweight TSK fuzzy classifier model is mainly used to input feature values ​​to the neural network. ijIt can be used to represent the jth input feature value of the i-th classification object of the input lightweight TSK fuzzy classifier model. The membership layer is mainly used to fuzzify the input feature value to obtain the fuzzy feature corresponding to the input feature value. Among them, the fuzzy feature corresponding to the input feature value can be represented in the form of membership value. In the membership layer, the input feature value can be fuzzified by the Gaussian membership function. In the membership layer, Represents the membership value of the j-th feature to the m-th cluster center. It can be used to represent the fuzzy set corresponding to the jth feature. The membership layer can also be used to generate multiple fuzzy logic conditions. The multiple fuzzy logic conditions generated by the membership layer can be stored in a logic condition library.

[0033] The rule layer can be used to calculate the fitness of the input feature value and each fuzzy logic condition in the logic condition library. Indicates the fitness of the input feature value to the lth fuzzy logic rule. In the feature fusion layer, each membership value can be defuzzified by the fitness of each fuzzy logic condition and the feature fusion layer weight parameter in the feature fusion layer to obtain multiple clear values. The clear value can be fused and multiplied with the original input feature value to generate a new fused feature value. Finally, the output layer can predict the category to which the fused feature value belongs through the output function and generate the corresponding classification result.

[0034] The technical solution of the present application is described below through specific embodiments.

[0035] Reference Figure 2 , shows a schematic diagram of a classification method based on a lightweight TSK fuzzy classifier provided in an embodiment of the present application, and the classification method can be applied to an electronic device equipped with a lightweight TSK fuzzy classifier provided in an embodiment of the present application. Among them, the electronic device can be a computer, tablet computer, smart phone and other electronic devices that can be equipped with a lightweight TSK fuzzy classifier model. The above-mentioned classification method based on a lightweight TSK fuzzy classifier can specifically include the following steps:

[0036] S201. Obtain multiple feature values ​​of a training sample input by a user in multiple preset feature dimensions, and perform fuzzy processing on the multiple feature values ​​through a membership layer to obtain membership values ​​corresponding to each of the feature values; the membership values ​​are used to indicate the degree of correlation between the training sample and the cluster centers corresponding to each of the preset feature dimensions.

[0037] In this embodiment, before the user uses the lightweight TSK fuzzy classifier to classify a certain classification object, it is necessary to first perform model training on the lightweight TSK fuzzy classifier through the training samples corresponding to the classification object. The user can obtain multiple training samples with classification results, as well as the feature values ​​of each training sample on multiple preset feature dimensions. The user can input multiple feature values ​​of the training samples into an electronic device equipped with a lightweight TSK fuzzy classifier, and perform model training on the lightweight TSK fuzzy classifier through the training samples. The electronic device can receive multiple feature values ​​input by the user through the input layer in the lightweight TSK fuzzy classifier, and transmit the received multiple feature values ​​to the internal network of the lightweight TSK fuzzy classifier. The input layer can transmit multiple feature values ​​to the membership layer of the lightweight TSK fuzzy classifier. The electronic device can perform fuzzification processing on multiple feature values ​​input by the input layer through the membership layer in the lightweight TSK fuzzy classifier to obtain the membership values ​​corresponding to each feature value. Among them, the membership value output by the membership layer can be used to represent the degree of correlation between the training sample and the cluster center corresponding to each preset feature dimension.

[0038] In this embodiment, the input layer may include an input layer function, through which the feature value input by the user can be transmitted to the internal network of the lightweight TSK fuzzy classifier. The specific expression of the input layer function can be as follows:

[0039]

[0040] in, It can be used to represent the input layer function of the jth neural node in the first layer, x ij It can be used to represent the j-th feature value of the i-th classification object input by the user.

[0041] In this embodiment, the membership layer may include a Gaussian membership function. After receiving the input layer and transmitting to multiple eigenvalues, the membership layer may calculate the cluster center corresponding to each eigenvalue through the fuzzy C-means (FCM) algorithm. After determining the cluster center corresponding to each eigenvalue, the membership layer may calculate the degree to which each eigenvalue belongs to the corresponding cluster center through the Gaussian membership function, and output the membership value corresponding to each eigenvalue. By calculating the membership value corresponding to each eigenvalue, the membership layer can realize the fuzzy processing of the eigenvalue. Among them, the specific expression of the Gaussian membership function can be described as follows:

[0042]

[0043] in, It can be used to represent the Gaussian membership function of the jth neural node in the second layer; It can be used to represent the membership value of the j-th eigenvalue to the m-th cluster center; It can be used to represent the mth cluster center of the jth eigenvalue; It can be used to represent the deviation between the jth eigenvalue and the mth cluster center; Used to represent the fuzzy set corresponding to the j-th eigenvalue.

[0044] In this embodiment, the mth cluster center of the jth eigenvalue and the deviation between the jth eigenvalue and the mth cluster center It can be calculated by the fuzzy C-means algorithm. The total number of cluster centers corresponding to each eigenvalue can be M, that is, m = 1, 2, ..., M.

[0045] S202, obtaining a plurality of clear values ​​by performing defuzzification processing on the plurality of membership values, and fusing the plurality of clear values ​​and the plurality of feature values ​​through a preset feature fusion function to generate a plurality of fused feature values;

[0046] In this embodiment, after the electronic device obtains multiple membership values ​​through the membership layer, it can perform defuzzification processing on multiple membership functions in advance through the feature fusion layer in the lightweight TSK fuzzy classifier. Among them, the feature fusion layer may include a feature fusion function, and the feature fusion function can be used to defuzzify multiple membership values ​​to obtain multiple clear values. The feature fusion function can also fuse multiple clear values ​​and multiple feature values ​​to generate multiple fused feature values.

[0047] In this embodiment, before the electronic device defuzzifies multiple membership values ​​through the feature fusion layer, it is also necessary to find the fitness between the feature value and each fuzzy logic condition through the rule layer of the lightweight TSK fuzzy classifier. The feature fusion layer can defuzzify the membership value based on the fitness and obtain the clear value corresponding to each membership value. In addition, the rule layer can also determine the conditional part of multiple fuzzy logic conditions corresponding to the feature value based on the cluster center corresponding to each feature value.

[0048] In this embodiment, the rule layer can calculate the fitness between the feature value and each fuzzy logic condition through a fitness function. The fitness function in the rule layer can be specifically described as follows:

[0049]

[0050] in, It can represent the fitness of the lth rule; It can represent the fitness function of the lth neural node in the third layer; L can represent the total number of fuzzy logic conditions contained in the lightweight TSK fuzzy classifier, where L = d × M; d can represent the number of types of eigenvalues ​​corresponding to the classification object; M can represent the total number of cluster centers that each eigenvalue can correspond to.

[0051] In this embodiment, when the total number of cluster centers corresponding to a certain feature value is M=5, the semantic interpretation corresponding to each cluster center can be T m ∈{T1,…,T m ,…,T5}={“very small”, “small”, “medium”, “large”, “very large”}. For the lth fuzzy logic condition, according to The condition part of the fuzzy logic condition can be:

[0052] IF ij is T m

[0053] In this embodiment, the feature fusion function in the feature fusion layer may be specifically described as follows:

[0054]

[0055] in, It can represent the weight parameters of the feature fusion layer in the feature fusion function; The feature fusion function of the jth neural node in the fourth layer can be expressed by Multiple fusion feature values ​​can be output; x′ ij It can represent the jth feature value of the i-th classification object, where j = 0, 1, 2, ..., d; that is, x′ ij can include x′ i0 , x′ i0 It can represent the additional constant term, x′ i0 = 1. By adding the constant term x′ i0 The function form of the feature fusion layer output can be made the same as the function form of the input function required by the output layer in the first-order TSK fuzzy classifier.

[0056] In this embodiment, the fitness function in the rule layer is brought into the feature fusion function of the feature fusion layer, and the specific expression form of the feature fusion function can be further obtained. The specific expression form of the feature fusion function can be as follows:

[0057]

[0058] The specific expression of the above-mentioned clarification function includes a weighted average calculation formula for converting fuzzy quantities into precise quantities in a discrete field.

[0059] S203. Fit the multiple fused feature values ​​through a preset output function to generate a lightweight TSK fuzzy classifier trained based on the training samples; the feature fusion function and output function in the lightweight TSK fuzzy classifier are generated after a preset number of iterative updates based on a preset gradient descent algorithm.

[0060] In this embodiment, after the electronic device generates multiple fused feature values ​​through the feature fusion layer, the multiple fused feature values ​​can be transmitted to the output layer of the lightweight TSK fuzzy classifier. After receiving the multiple fused feature values, the output layer can perform linear fitting on the multiple fused feature values ​​through a preset output function, and generate the classification result of the training sample according to the fitting result. The electronic device can iteratively update the feature fusion function and the output function of the lightweight TSK fuzzy classifier for a preset number of times according to the classification result of the training sample to complete the model training of the lightweight TSK fuzzy classifier. Among them, the electronic device can update the feature fusion function and the output function multiple times according to the preset gradient descent algorithm. The electronic device can generate a lightweight TSK fuzzy classifier obtained by training based on the training sample according to the feature fusion function and the output function after the iteration.

[0061] In this embodiment, during the model training process, after the electronic device generates a classification result through the output layer, it can determine the number of iterations corresponding to the feature fusion function in the feature fusion layer and the output function in the output layer. After determining the number of iterations, the output layer can determine whether the number of iterations is greater than the iteration threshold preset by the user.

[0062] In this embodiment, if the electronic device determines that the number of iterations of the feature fusion function and the output function is less than or equal to the iteration threshold value preset by the user, the electronic device can perform an update iteration operation on the feature fusion function and the output function through a preset gradient descent algorithm until the number of iterations is greater than the iteration threshold value preset by the user, so as to realize the model training of the lightweight TSK fuzzy classifier. In the update iteration operation, the electronic device can first generate a prediction error value according to the current classification result, and back-propagate the prediction error value to the feature fusion layer and the output layer. The feature fusion layer and the output layer can update the feature fusion function and the output function according to the prediction error value. After the update is completed, the feature fusion layer can regenerate multiple updated fusion feature values ​​through the updated feature fusion function, and input the multiple updated fusion feature values ​​into the output layer. The output layer can regenerate a new classification result through the updated output function. The electronic device can repeatedly perform the update iteration operation of the feature fusion function and the output function multiple times until the number of iterations of the feature fusion function and the output function is greater than the preset iteration threshold value.

[0063] In this embodiment, if the electronic device determines that the number of iterations of the feature fusion function and the output function is greater than a preset iteration threshold, the electronic device can output multiple classification results corresponding to the training sample and the fuzzy logic conditions corresponding to each classification result through the output layer. The electronic device can save the feature fusion function and the output function generated at the last update iteration, and generate a trained lightweight TSK fuzzy classifier based on the feature fusion function and the output function generated at the last update iteration.

[0064] In this embodiment, the output function in the output layer can be specifically described as follows:

[0065]

[0066] in, It can represent the output function of the rth neural node in the fifth layer, r = 1, 2, ..., R; R can represent the total number of categories that the lightweight TSK fuzzy classifier classifies the classification object; It can represent the feature fusion function of the jth neural node in the fourth layer; It can represent the output layer weight parameters in the output function.

[0067] In this embodiment, since the cluster center corresponding to each eigenvalue in the Gaussian membership function in the membership layer and the deviation between each eigenvalue and the corresponding cluster center are calculated by the fuzzy C-means algorithm, the method provided in this embodiment does not need to iteratively optimize the Gaussian membership function in the membership layer, but only needs to iteratively optimize the feature fusion function and the output function.

[0068] In this embodiment, the classification result output by the output layer can be specifically described as follows:

[0069]

[0070] Among them, y r It can represent the classification result output by the output layer.

[0071] In this embodiment, the output layer can also determine the conclusion part of the fuzzy logic conditions corresponding to each classification result based on the classification result. Combined with the condition part generated by the rule layer, the feature fusion layer can generate the fuzzy logic conditions corresponding to each classification result.

[0072] In this embodiment, the conclusion part of the first fuzzy logic condition generated by the feature fusion layer can be specifically described as follows:

[0073]

[0074] Combined with the conditional part generated by the rule layer, the complete expression of the lth fuzzy logic condition output by the feature fusion layer can be described as follows:

[0075]

[0076] Among them, Rule l It can represent the lth fuzzy logic condition.

[0077] In the existing first-order TSK fuzzy classifier, since the membership value is clarified only in the output layer, when the first-order TSK fuzzy classifier needs to iteratively optimize the linear function representing the feature value of the classification object, it can only be iteratively optimized through the output function in the output layer. In the prior art, the specific expression of the classification result output by the first-order TSK fuzzy classifier is as follows:

[0078]

[0079] in, Represents the weight parameter of the first-order TSK fuzzy classifier.

[0080] According to the specific expression of the classification results output by the first-order TSK fuzzy classifier, it can be obtained that since the first-order TSK fuzzy classifier can only be iteratively optimized through the output function in the output layer, the number of weight parameters that need to be optimized when optimizing the first-order TSK fuzzy classifier is d×L×R.

[0081] The lightweight TSK fuzzy classifier provided in this embodiment can clarify the membership value in advance in the feature fusion layer. Therefore, when iterative optimization is required, the improved lightweight TSK fuzzy classifier in this embodiment can iteratively optimize the linear function representing the feature value of the classification object by simultaneously updating the feature fusion function and the output function. Combined with the specific form of the classification result output by this embodiment, when the feature fusion function and the output function are iteratively updated at the same time, the number of weight parameters that need to be optimized by the lightweight TSK fuzzy classifier provided in this embodiment is d×(L+R). In this embodiment, due to the increase of the constant term x in the feature fusion layer, i ′0 can make the function form of the feature fusion layer output the same as the function form of the input function required by the output layer in the first-order TSK fuzzy classifier. Therefore, the calculation method of the output layer in the lightweight TSK fuzzy classifier provided in this embodiment can be the same as the calculation method of the output layer in the first-order TSK fuzzy classifier. As a result, the method provided in this embodiment can maintain the same semantic interpretability as the first-order TSK fuzzy classifier while improving the operation speed. Therefore, the lightweight TSK fuzzy classifier provided in this embodiment can significantly improve the operation speed while ensuring high semantic interpretability, and thus can more effectively utilize computing resources.

[0082] S204, classifying the objects to be classified based on the lightweight TSK fuzzy classifier, and generating classification results and multiple fuzzy logic conditions corresponding to the objects to be classified; the fuzzy logic conditions are used to explain the relationship between the classification results and the characteristic values ​​of the objects to be classified.

[0083] In this embodiment, after the electronic device completes model training of the lightweight TSK fuzzy classifier through training samples, it can classify the object to be classified according to the trained lightweight TSK fuzzy classifier. The electronic device can obtain multiple feature values ​​of the classification object in multiple preset feature dimensions, and the electronic device can generate the classification results and multiple fuzzy logic conditions corresponding to the object to be classified through the trained lightweight TSK fuzzy classifier. Among them, the fuzzy logic conditions generated by the lightweight TSK fuzzy classifier can be used to explain the relationship between each classification result and each feature value of the classification object.

[0084] In this embodiment, when the electronic device performs classification through the trained lightweight TSK fuzzy classifier, multiple feature values ​​of the classification object can be input into the internal network of the lightweight TSK fuzzy classifier through the input layer of the lightweight TSK fuzzy classifier. The input layer can obtain multiple feature values ​​and pass the multiple feature values ​​to the membership layer. Through the membership layer, the electronic device can perform fuzzification processing on the multiple feature values ​​to obtain multiple membership values. Through the membership value, the electronic device can determine the degree of correlation between the object to be classified and the cluster center corresponding to each preset feature dimension. After obtaining multiple membership values, the electronic device can generate the condition part of multiple fuzzy logic conditions corresponding to the classification object through the rule layer, and calculate the fitness corresponding to each fuzzy logic condition through the rule layer. Then, the electronic device can defuzzify the multiple membership values ​​according to the fitness in the feature fusion layer to obtain multiple clear values. In the feature fusion layer, the electronic device can also fuse and multiply each clear value with the original input feature value to construct a fused feature value. The electronic device can input the constructed fused feature value into the output layer for linear fitting. The output layer can perform linear fitting on the fused feature values ​​according to the output function and generate multiple classification results and fuzzy logic conditions.

[0085] The lightweight TSK fuzzy classifier provided in this embodiment can be applied to predict the transfer position of the target object, and can also be used to form the basic unit of the multi-task prediction model to be applied to more complex scenarios. Before using the lightweight TSK fuzzy classifier provided in this embodiment to predict the transfer position of the target object, the user can input multiple training samples with transfer results into the lightweight TSK fuzzy classifier to train the lightweight TSK fuzzy classifier. When the lightweight TSK fuzzy classifier provided in this embodiment is applied to predict the transfer position of the target object, the user can input multiple values ​​related to the transfer position of the target object as the characteristic values ​​corresponding to the target object into the lightweight TSK fuzzy classifier. The lightweight TSK fuzzy classifier can calculate the possibility of the target object appearing in each transfer position according to the characteristic values ​​related to the transfer position input by the user, that is, calculate the corresponding probability of occurrence of each transfer position according to the characteristic values ​​related to the transfer position. The lightweight TSK fuzzy classifier can output the transfer result corresponding to the target object and the transfer conditions corresponding to the various transfer results according to the characteristic values ​​related to the transfer position input by the user. Among them, the transfer conditions output by the lightweight TSK fuzzy classifier can be used to illustrate the relationship between each transfer position and the characteristic values ​​related to the transfer position, that is, the transfer conditions can provide a semantic explanation for the transfer result. The transfer result output by the lightweight TSK fuzzy classifier may include multiple possible transfer positions and the corresponding probability of occurrence of each transfer position. The lightweight TSK fuzzy classifier can also calculate the contribution of each transfer condition to each transfer position based on the output transfer result. The lightweight TSK fuzzy classifier can generate a transfer position relationship diagram based on multiple contribution degrees. Through the transfer position relationship diagram, the user can intuitively understand the characteristic values ​​related to each transfer position and the importance of each transfer condition to each transfer position that may appear in the target object. Specifically, the lightweight TSK fuzzy classifier provided in this embodiment can be applied to predict the cancer metastasis position of nasopharyngeal carcinoma patients.

[0086] Figure 3 FIG. 2 shows a specific implementation flow chart of a classification method S204 based on a lightweight TSK fuzzy classifier provided in the second embodiment of the present application. Figure 3 , compared to Figure 2 In the embodiment, a classification method based on a lightweight TSK fuzzy classifier improved in this embodiment, S204 includes: S2041-S2042, which are described in detail as follows:

[0087] S2041, calculating the contribution of each of the fuzzy logic conditions by a preset contribution formula; the contribution is used to express the contribution degree of each of the logic conditions to the various classification results;

[0088] In this embodiment, after the output layer outputs the classification results and the multiple fuzzy logic conditions corresponding to each classification result, the electronic device can also calculate the contribution of each fuzzy logic condition to a certain classification result prediction process through a preset contribution formula, and express it in the form of contribution. Among them, the higher the contribution of a certain fuzzy logic condition to a certain classification result, the more important the fuzzy logic condition is to the classification result, that is, if the feature value of a certain classification object is closer to the condition part of the fuzzy logic condition, the classification object is more likely to belong to the classification result. The lower the contribution corresponding to the fuzzy logic condition, the less important it is.

[0089] In this embodiment, the contribution formula may be specifically described as follows:

[0090]

[0091] Among them, L rl It can be used to indicate the contribution of the lth fuzzy rule to the rth result; y r It can be used to represent the r-th classification result corresponding to the l-th fuzzy rule; It can be used to represent the weight parameter of the feature fusion layer of the j-th eigenvalue corresponding to the l-th fuzzy rule in the feature fusion function; the ReLU function can represent the activation function, which is used to perform piecewise linear fitting on the input data.

[0092] In this embodiment, since the classification result y r The details can be as follows:

[0093]

[0094] Therefore, further, the contribution can also be calculated according to the following formula:

[0095]

[0096] in, It can be used to represent the output layer weight parameter of the jth eigenvalue in the output function corresponding to the rth classification result; x ij It can be used to represent the jth feature value corresponding to the i-th classification object; It can represent the fitness of the lth rule; the ReLU function can represent the activation function, which is used to perform piecewise linear fitting on the input data.

[0097] In this embodiment, after calculating the contribution of all fuzzy logic conditions corresponding to the i-th classification object, the lightweight TSK fuzzy classifier can store the contribution of all fuzzy logic conditions in a matrix form. The contribution matrix of all fuzzy logic conditions corresponding to the i-th classification object can be specifically described as follows:

[0098]

[0099] Among them, L i It can be used to represent the logical condition matrix of all fuzzy logical conditions corresponding to the i-th classification object; L RL It can be used to represent the contribution of the Lth fuzzy logic condition of the Rth category corresponding to the i-th classification object; R can be used to represent the total number of categories for the lightweight TSK fuzzy classifier to classify the classification object; L can be used to represent the total number of fuzzy logic conditions contained in the lightweight TSK fuzzy classifier. Further, L = d × M; where M can represent the total number of cluster centers that can correspond to each eigenvalue; d can represent the number of types of eigenvalues ​​corresponding to the classification object.

[0100] Furthermore, when the user simultaneously inputs N classification objects to the lightweight TSK fuzzy classifier, the contribution matrix generated by the lightweight TSK fuzzy classifier can be specifically described as follows:

[0101]

[0102] Among them, L can represent the contribution matrix generated by the lightweight TSK fuzzy classifier, N can represent the total number of classification objects input into the lightweight TSK fuzzy classifier; R can represent the total number of categories for the classification objects classified by the lightweight TSK fuzzy classifier; L can be used to represent the total number of fuzzy logic conditions contained in the lightweight TSK fuzzy classifier.

[0103] S2042. Generate a classification relationship diagram based on the multiple fuzzy logic conditions and the contribution degree corresponding to each fuzzy logic condition; the classification relationship diagram can be used to visualize the relationship between each fuzzy logic condition and the various prediction results.

[0104] In this embodiment, after the lightweight TSK fuzzy classifier calculates the contribution corresponding to each fuzzy logic condition, a classification relationship diagram can be generated according to multiple fuzzy logic conditions and the contribution corresponding to each fuzzy logic condition. The classification relationship diagram generated by the lightweight TSK fuzzy classifier can be used to visualize the relationship between each of the fuzzy logic conditions and the various prediction results.

[0105] In this embodiment, after the lightweight TSK fuzzy classifier generates the contribution matrix, it can generate a corresponding classification relationship diagram according to the contribution matrix. The lightweight TSK fuzzy classifier can generate a classification relationship diagram with the fuzzy logic condition number as the bottom horizontal coordinate of the classification relationship diagram, the classification object and the classification results corresponding to each classification object as the vertical coordinate of the classification relationship diagram, and the type of feature value as the top horizontal coordinate of the classification relationship diagram. In the classification relationship diagram generated by the lightweight TSK fuzzy classifier, the contribution of each fuzzy logic condition to different classification results can be intuitively represented by the depth of color.

[0106] like Figure 4 As shown in FIG. 1 , a classification relationship diagram is provided in this embodiment. Figure 4 , the bottom horizontal axis is the fuzzy logic condition number L=50 provided by the lightweight TSK fuzzy classifier for the prediction result, the vertical axis is N=27 classification objects and R=2 categories corresponding to each classification object, and the top horizontal axis is the 10 feature values ​​contained in each classification object. In this embodiment, each feature value of the classification object can correspond to 5 fuzzy logic conditions respectively. Figure 4 The darker the color of a location, the more important the fuzzy logic condition corresponding to the location is to the classification result corresponding to the location.

[0107] because Figure 4 This is the actual classification relationship diagram generated when real data is used for an experiment. Figure 4 It can be seen that the contribution of fuzzy logic conditions of different classification objects to the classification results is only slightly different, indicating that the contribution of each fuzzy logic condition and eigenvalue type to the classification result has nothing to do with the selected classification object. From the perspective of eigenvalue type, the 1st, 4th, 8th, 9th and 10th eigenvalues ​​have similar contributions to the prediction of the two classification results, the 5th and 7th eigenvalues ​​have a more obvious impact on the prediction of the first classification result, and the 2nd, 3rd and 6th eigenvalues ​​have a more obvious impact on the prediction of the second classification result. In summary, from the perspective of eigenvalue type, most eigenvalue types have no significant effect on the prediction of the results, so the contribution can be used to indicate the contribution of fuzzy logic conditions to the prediction process of a certain classification result.

[0108] In this embodiment, after the lightweight TSK fuzzy classifier generates the fuzzy logic conditions corresponding to each classification result, it can calculate the contribution of each fuzzy logic condition to a certain classification result according to a preset contribution formula, and generate a contribution matrix according to the contribution of multiple fuzzy logic conditions. The lightweight TSK fuzzy classifier can generate a classification relationship diagram based on the contribution matrix. In the classification relationship diagram, the contribution of each fuzzy logic condition to different classification results can be intuitively represented by the depth of color. Therefore, through the classification relationship diagram, the user can intuitively understand the importance of each eigenvalue and fuzzy rule, which enhances the interpretability of the lightweight TSK fuzzy classifier.

[0109] Figure 5 FIG. 2 shows a specific implementation flow chart of a classification method S203 based on a lightweight TSK fuzzy classifier provided in the third embodiment of the present application. Figure 5 , compared to Figure 2 In the embodiment, a classification method based on a lightweight TSK fuzzy classifier is improved in this embodiment, and S203 includes: S501 to S505, which are described in detail as follows:

[0110] S501, obtaining the kth intermediate result output by the output function in the kth iteration process; k is an integer greater than 1 and less than a preset iteration threshold;

[0111] In this embodiment, if the electronic device determines that the number of iterations of the feature fusion function and the output function is less than or equal to the iteration threshold preset by the user, the electronic device can obtain the kth intermediate result output by the output function during the kth iteration, where k is an integer greater than 1 and less than the preset iteration threshold.

[0112] S502, generating a kth loss function value of a kth iteration process through the kth intermediate result;

[0113] In this embodiment, after obtaining the kth intermediate result, the electronic device may generate a kth loss function value of the kth iteration process according to the kth intermediate result.

[0114] In this embodiment, the calculation formula of the loss function value can be as follows:

[0115]

[0116] Among them, E k Can be used to represent the kth loss function value; y r Can be used to represent the classification results generated by the output layer; t r Can be used to indicate a desired outcome.

[0117] S503. Partially derivative the kth feature fusion layer weight parameter and the kth output layer weight parameter respectively using the kth loss function value to generate the k+1th feature fusion layer weight gradient and the k+1th output layer weight gradient.

[0118] In this embodiment, the feature fusion function may include a feature fusion layer weight parameter, and the output function may include an output layer weight parameter. Among them, the feature fusion layer weight parameter and the feature fusion layer weight parameter are both two-dimensional weight parameter matrices. After generating the kth loss function value, the electronic device can use the kth loss function value to find the partial derivative of the kth feature fusion layer weight parameter and the kth output layer weight parameter. The electronic device can generate the k+1th feature fusion layer weight gradient by finding the partial derivative of the kth feature fusion layer weight parameter through the kth loss function value. The electronic device can generate the k+1th output layer weight gradient by finding the partial derivative of the kth output layer weight parameter through the kth loss function value.

[0119] In this embodiment, the weight parameter matrix of the feature fusion layer weight parameters may be specifically described as follows:

[0120]

[0121] in, can represent the weight parameter of the k+1th feature fusion layer, L can represent the total number of fuzzy logic conditions contained in the lightweight TSK fuzzy classifier; d can represent the number of types of feature values ​​corresponding to the training sample.

[0122] In this embodiment, the weight parameter matrix of the output layer weight parameters can be specifically described as follows:

[0123]

[0124] in, can represent the weight parameter of the k+1th output layer, and R can represent the total number of categories that the lightweight TSK fuzzy classifier classifies the training samples.

[0125] In this embodiment, the specific formula for calculating the gradient of the kth fusion layer can be described as follows:

[0126]

[0127] in,

[0128]

[0129] in, Can be used to represent the weight gradient of the kth feature fusion layer; It can represent the feature fusion function of the jth neural node in the fourth layer; It can represent the output function of the rth neural node in the fifth layer; It can be used to represent the fitness function of the lth neural node in the third layer; Can be used to represent the weight parameters of the feature fusion layer; Can be used to represent the output layer weight parameters; x ij It can be used to represent the j-th feature value of the i-th training sample input by the user.

[0130] In this embodiment, the specific formula for calculating the gradient of the kth output layer can be as follows:

[0131]

[0132] in,

[0133]

[0134] in, Can be used to represent the weight gradient of the kth output layer; It can represent the feature fusion function of the j-th neural node in the fourth layer.

[0135] S504. Generate the k+1th feature fusion layer weight parameters based on the feature fusion layer weight learning rate, the kth feature fusion layer momentum and the kth feature fusion layer weight gradient of the kth feature fusion function; the feature fusion layer weight learning rate is used to determine the update amplitude of the k+1th feature fusion layer weight parameters; the kth feature fusion layer momentum is used to represent the update amplitude of the k+1th feature fusion layer weight parameters determined according to the kth feature fusion layer weight gradient.

[0136] In this embodiment, after determining the kth feature fusion layer weight gradient, the electronic device can generate the k+1th feature fusion layer weight parameter according to the feature fusion layer weight learning rate of the kth feature fusion function, the kth feature fusion layer momentum and the kth feature fusion layer weight gradient. Among them, the feature fusion layer weight learning rate of the kth feature fusion function can be used to determine the update amplitude of the k+1th feature fusion layer weight parameter. The kth feature fusion layer momentum can represent the update amplitude of the k+1th feature fusion layer weight parameter determined according to the kth feature fusion layer weight gradient and the k-1th feature fusion layer momentum.

[0137] In this embodiment, the specific calculation formula for calculating the weight parameter of the k+1th feature fusion layer can be as follows:

[0138]

[0139] in, It can be used to represent the weight parameter of the k+1th feature fusion layer. Can be used to represent the kth feature fusion layer weight parameter, α H It can be used to represent the feature fusion layer weight learning rate. It can be used to represent the momentum of the k-th feature fusion layer at the k-th iteration.

[0140] In this embodiment, the specific calculation formula for calculating the momentum of the k-th feature fusion layer can be as follows:

[0141]

[0142] in, can be used to represent the momentum of the k-th feature fusion layer; β can be used to represent the preset momentum parameter, and β can be used to adjust the update amplitude of the k-th fusion weight parameter at the k-th iteration according to the k-1-th feature fusion layer weight gradient used in the k-1-th iteration update; It can be used to represent the momentum of the k-1th feature fusion layer; It can be used to represent the kth feature fusion layer gradient. It should be noted that at the first iteration, the lightweight TSK fuzzy classifier can calculate the first feature fusion layer momentum at the first iteration according to the initial feature fusion layer momentum pre-set by the user, where the initial feature fusion layer momentum can be

[0143] S505. Generate the k+1th output layer weight parameters based on the output layer weight learning rate, kth output layer momentum and kth output layer weight gradient of the kth output function; the output layer weight learning rate is used to determine the update amplitude of the k+1th output layer weight parameters; the kth output layer momentum is used to represent the update amplitude of the k+1th output layer weight parameters determined according to the kth output layer weight gradient.

[0144] In this embodiment, after determining the kth output layer weight gradient, the lightweight TSK fuzzy classifier can update the k+1th output layer weight parameter according to the output layer weight learning rate of the kth output function, the kth output layer momentum and the kth output layer weight gradient. Among them, the output layer weight learning rate of the kth output function can be used to determine the update amplitude of the k+1th output layer weight parameter. The kth output layer momentum of the kth output function can be used to represent the update amplitude of the k+1th output layer weight parameter generated according to the kth output layer weight gradient and the k-1th output layer momentum.

[0145] In this embodiment, the specific formula for calculating the weight parameter of the k+1th output layer can be as follows:

[0146]

[0147] in, Can be used to represent the weight parameters of the k+1th output layer, Can be used to represent the kth output layer weight parameter, α O Can be used to represent the output layer weight learning rate, It can be used to represent the momentum of the kth output layer at the kth iteration.

[0148] In this embodiment, the specific calculation formula of the k-th output layer momentum can be described as follows:

[0149]

[0150] in, It can be used to represent the kth output layer momentum required for the kth iteration update; β can be used to represent the preset momentum parameter, and β can be used to adjust the update amplitude of the kth output layer weight parameter when adjusting the current kth iteration according to the k-1th output layer weight gradient; Can be used to represent the momentum of the k-1th output layer; It can be used to represent the kth output layer gradient. It should be noted that at the first iteration, the lightweight TSK fuzzy classifier can calculate the first output layer momentum at the first iteration according to the initial output layer momentum preset by the user, where the initial output layer momentum can be

[0151] In this embodiment, when the lightweight TSK fuzzy classifier determines that the number of iterations of the feature fusion function and the output function is less than or equal to the iteration threshold, the feature fusion layer weight parameters and the output layer weight parameters can be iteratively optimized in an updated form. Since the feature fusion layer weight parameters and the output layer weight parameters in this embodiment are both two-dimensional weight parameter matrices. That is, the lightweight TSK fuzzy classifier provided in this embodiment replaces the multidimensional weight parameter matrix in the first-order TSK fuzzy classifier with two two-dimensional weight parameter matrices. Therefore, the lightweight TSK fuzzy classifier provided in this embodiment can greatly reduce the number of weight parameters that need to be updated during iterative optimization, thereby improving the computing speed of the lightweight TSK fuzzy classifier and reducing the complexity of the lightweight TSK fuzzy classifier.

[0152] It should be noted that the size of the serial numbers of the steps in the above embodiments does not 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 embodiments of the present application.

[0153] Reference Figure 6 , shows a schematic diagram of a classification device based on a lightweight TSK fuzzy classifier provided in an embodiment of the present application, which may specifically include a fuzzification module 601, a fusion module 602, an iteration module 603 and a classification module 604, wherein:

[0154] The fuzzification module 601 is used to obtain multiple feature values ​​of the training sample input by the user in multiple preset feature dimensions, and perform fuzzification processing on the multiple feature values ​​through the membership layer to obtain the membership value corresponding to each of the feature values; the membership value is used to indicate the degree of correlation between the training sample and the cluster center corresponding to each of the preset feature dimensions;

[0155] A fusion module 602 is used to obtain a plurality of clear values ​​by performing a defuzzification process on the plurality of membership values, and to fuse the plurality of clear values ​​and the plurality of feature values ​​through a preset feature fusion function to generate a plurality of fused feature values;

[0156] Iteration module 603, used for fitting the multiple fusion feature values ​​through a preset output function to generate a lightweight TSK fuzzy classifier obtained by training based on the training sample; the feature fusion function and output function in the lightweight TSK fuzzy classifier are generated after a preset number of iterative updates based on a preset gradient descent algorithm;

[0157] The classification module 604 is used to classify the object to be classified based on the lightweight TSK fuzzy classifier, and generate a classification result of the object to be classified and multiple fuzzy logic conditions; the fuzzy logic conditions are used to explain the relationship between the classification result and each feature value of the object to be classified.

[0158] The classification module 604 can also be used to calculate the contribution of each of the fuzzy logic conditions through a preset contribution formula; the contribution is used to express the degree of contribution of each of the logic conditions to the various classification results; a classification relationship diagram is generated based on multiple fuzzy logic conditions and the contribution corresponding to each of the fuzzy logic conditions; the classification relationship diagram can be used to visualize the relationship between each of the fuzzy logic conditions and the various classification results.

[0159] The classification module 604 may also calculate the contribution of each of the fuzzy logic conditions using a preset contribution formula, wherein the contribution calculation formula may be:

[0160]

[0161] Among them, the L rl It is used to indicate the contribution of the lth fuzzy rule to the rth result. r is used to represent the classification result, the Used to represent the weight parameters of the feature fusion layer in the feature fusion function; the ReLU function is an activation function for performing piecewise linear fitting on the input data.

[0162] The iteration module 603 can also be used to obtain the kth intermediate result output by the output function in the kth iteration process; the k is an integer greater than 1 and less than a preset iteration threshold; the kth loss function value of the kth iteration process is generated through the kth intermediate result; the partial derivatives of the kth feature fusion layer weight parameters and the kth output layer weight parameters are respectively calculated through the kth loss function value to generate the k+1th feature fusion layer weight gradient and the k+1th output layer weight gradient; the kth feature fusion layer weight parameters and the kth output layer weight parameters are both two-dimensional weight parameter matrices; the feature fusion layer weight learning rate, the kth feature fusion layer momentum and the kth feature fusion layer weight gradient based on the kth feature fusion function are calculated; The k+1th feature fusion layer weight parameters are generated by re-gradient; the feature fusion layer weight learning rate is used to determine the update amplitude of the k+1th feature fusion layer weight parameters; the kth feature fusion layer momentum is used to represent the update amplitude of the k+1th feature fusion layer weight parameters determined according to the kth feature fusion layer weight gradient; the k+1th output layer weight parameters are generated based on the output layer weight learning rate of the kth output function, the kth output layer momentum and the kth output layer weight gradient; the output layer weight learning rate is used to determine the update amplitude of the k+1th output layer weight parameters; the kth output layer momentum is used to represent the update amplitude of the k+1th output layer weight parameters determined according to the kth output layer weight gradient.

[0163] The iteration module 603 may also be used to generate the kth loss function value of the kth iteration process through the kth intermediate result. The calculation formula of the loss function value may be:

[0164]

[0165] Wherein, E is used to represent the loss function value, y r Used to represent the classification result, t r is used to represent the expected result, and R is used to represent the number of categories in the classification result.

[0166] The iteration module 603 may also be used to generate a k+1th feature fusion layer weight parameter based on the feature fusion layer weight learning rate of the kth feature fusion function, the kth feature fusion layer momentum and the kth feature fusion layer weight gradient, wherein the calculation formula of the k+1th feature fusion layer weight parameter may be:

[0167]

[0168] Among them, the It is used to represent the weight parameter of the k+1th feature fusion layer. is used to represent the weight parameter of the kth feature fusion layer, the α HIt is used to represent the weight learning rate of the feature fusion layer. Used to represent the momentum of the k-th feature fusion layer.

[0169] The iteration module 603 may also be used to generate a k+1th output layer weight parameter based on the output layer weight learning rate, the kth output layer momentum and the kth output layer weight gradient of the kth output function, wherein the calculation formula of the k+1th output layer weight gradient may be:

[0170]

[0171] Among them, the It is used to represent the weight parameter of the k+1th output layer. is used to represent the weight parameter of the kth output layer, the α O It is used to represent the output layer weight learning rate, Used to represent the momentum of the k-th output layer.

[0172] In a classification device based on a lightweight TSK fuzzy classifier provided in an embodiment of the present application, the object to be classified is an object to be transferred; the multiple feature values ​​are feature values ​​related to the to-be-transferred position of the object to be transferred; the classification result includes multiple transfer positions and weights corresponding to each transfer position; and the fuzzy logic condition is a transfer condition related to the transfer position of the target object.

[0173] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment part.

[0174] Reference Figure 7 , shows a schematic diagram of an electronic device provided by an embodiment of the present application. Figure 7 As shown, the electronic device 700 in the embodiment of the present application includes: a processor 710, a memory 720, and a computer program 721 stored in the memory 720 and executable on the processor 710. When the processor 710 executes the computer program 721, the steps in each embodiment of the classification method based on the lightweight TSK fuzzy classifier are implemented, such as Figure 1 Alternatively, when the processor 710 executes the computer program 721, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Figure 6 Functions of modules 601 to 604 are shown.

[0175] Exemplarily, the computer program 721 may be divided into one or more modules / units, which are stored in the memory 720 and executed by the processor 710 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which may be used to describe the execution process of the computer program 721 in the electronic device 700. For example, the computer program 721 may be divided into a fuzzification module, a fusion module, an iteration module, and a classification module, and the specific functions of each module are as follows:

[0176] A fuzzification module is used to obtain multiple feature values ​​of a training sample input by a user in multiple preset feature dimensions, and to perform fuzzification processing on the multiple feature values ​​through a membership layer to obtain a membership value corresponding to each of the feature values; the membership value is used to indicate the degree of correlation between the training sample and the cluster center corresponding to the preset category;

[0177] A fusion module, used for obtaining a plurality of clear values ​​by performing defuzzification processing on the plurality of membership values, and fusing the plurality of clear values ​​and the plurality of feature values ​​through a preset feature fusion function to generate a plurality of fused feature values;

[0178] An iteration module is used to fit the multiple fusion feature values ​​through a preset output function to generate a lightweight TSK fuzzy classifier trained based on the training sample; the feature fusion function and output function in the lightweight TSK fuzzy classifier are generated after a preset number of iterative updates based on a preset gradient descent algorithm;

[0179] A classification module is used to classify the objects to be classified based on the lightweight TSK fuzzy classifier, and generate a classification result of the objects to be classified and multiple fuzzy logic conditions; the fuzzy logic conditions are used to explain the relationship between the classification result and each feature value of the objects to be classified.

[0180] The electronic device 700 may be a computer, a tablet computer, a smart phone, or other electronic devices that can be equipped with a lightweight TSK fuzzy classifier model. The electronic device 700 may include, but is not limited to, a processor 710 and a memory 720. Those skilled in the art will appreciate that Figure 7 It is only an example of the electronic device 700 and does not constitute a limitation of the electronic device 700. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 700 may also include input and output devices, network access devices, buses, etc.

[0181] The processor 710 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0182] The memory 720 may be an internal storage unit of the electronic device 700, such as a hard disk or memory of the electronic device 700. The memory 720 may also be an external storage device of the electronic device 700, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 700. Further, the memory 720 may also include both an internal storage unit of the electronic device 700 and an external storage device. The memory 720 is used to store the computer program 721 and other programs and data required by the electronic device 700. The memory 720 may also be used to temporarily store data that has been output or is to be output.

[0183] An embodiment of the present application also discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the classification method based on the lightweight TSK fuzzy classifier as described in the aforementioned embodiments is implemented.

[0184] The embodiment of the present application further discloses a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the classification method based on the lightweight TSK fuzzy classifier as described in the above embodiments is implemented.

[0185] The embodiment of the present application further discloses a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the classification method based on the lightweight TSK fuzzy classifier described in the above-mentioned embodiments.

[0186] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application is described in detail with reference to the above-mentioned embodiments, a person skilled in the art should understand that the technical solutions described in the above-mentioned embodiments can still be modified, or some of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A classification method based on lightweight TSK fuzzy classifier, characterized in that: include: Obtain multiple feature values ​​of a training sample input by a user in multiple preset feature dimensions, and perform fuzzy processing on the multiple feature values ​​through a membership layer to obtain a membership value corresponding to each feature value; the membership value is used to indicate the degree of correlation between the training sample and the cluster center corresponding to each preset feature dimension; A plurality of clear values ​​are obtained by performing defuzzification processing on the plurality of membership values, and a plurality of clear values ​​and the plurality of feature values ​​are fused using a preset feature fusion function to generate a plurality of fused feature values; The plurality of fusion feature values ​​are fitted by a preset output function to generate a lightweight TSK fuzzy classifier trained based on the training sample; the feature fusion function and the output function in the lightweight TSK fuzzy classifier are generated after a preset number of iterative updates based on a preset gradient descent algorithm; Classify the objects to be classified based on the lightweight TSK fuzzy classifier, and generate classification results and multiple fuzzy logic conditions corresponding to the objects to be classified; The fuzzy logic condition is used to explain the relationship between the classification result and each feature value of the object to be classified.

2. The method according to claim 1, characterized in that After classifying the object to be classified based on the lightweight TSK fuzzy classifier and generating the classification result of the object to be classified and multiple fuzzy logic conditions, the method includes: Calculating the contribution of each of the fuzzy logic conditions using a preset contribution formula; the contribution is used to express the degree of contribution of each of the fuzzy logic conditions to the various classification results; A classification relationship diagram is generated based on the plurality of fuzzy logic conditions and the contribution degree corresponding to each fuzzy logic condition; the classification relationship diagram can be used to visually represent the relationship between each fuzzy logic condition and the various classification results.

3. The method according to claim 2, characterized in that The contribution formula is: Among them, the L rl It is used to express the contribution of the lth fuzzy rule to the rth type of result. r Used to represent the classification result, the Used to represent the feature fusion layer weight parameters in the feature fusion function; the ReLU function is an activation function that performs piecewise linear fitting on the input data.

4. The method according to claim 1, wherein The fitting of the multiple fusion feature values ​​by a preset output function to generate a lightweight TSK fuzzy classifier obtained by training based on the training sample includes: Obtaining a k-th intermediate result output by the output function during the k-th iteration, wherein k is an integer greater than 1 and less than a preset iteration threshold; Generate the kth loss function value of the kth iteration process through the kth intermediate result; Partially derivative the kth feature fusion layer weight parameter and the kth output layer weight parameter respectively using the kth loss function value to generate a k+1th feature fusion layer weight gradient and a k+1th output layer weight gradient; the kth feature fusion layer weight parameter and the kth output layer weight parameter are both two-dimensional weight parameter matrices; generating a k+1th feature fusion layer weight parameter based on the feature fusion layer weight learning rate, the kth feature fusion layer momentum, and the kth feature fusion layer weight gradient of the kth feature fusion function; the feature fusion layer weight learning rate is used to determine the update amplitude of the k+1th feature fusion layer weight parameter; the kth feature fusion layer momentum is used to represent the update amplitude of the k+1th feature fusion layer weight parameter determined according to the kth feature fusion layer weight gradient; The k+1th output layer weight parameter is generated based on the output layer weight learning rate, the kth output layer momentum and the kth output layer weight gradient of the kth output function; the output layer weight learning rate is used to determine the update amplitude of the k+1th output layer weight parameter; the kth output layer momentum is used to represent the update amplitude of the k+1th output layer weight parameter determined according to the kth output layer weight gradient.

5. The method according to claim 4, characterized in that The calculation formula of the loss function value is: Wherein, E is used to represent the k-th loss function value, and the y r is the kth intermediate result, the t r is the expected result corresponding to the kth intermediate result, and R is the number of categories.

6. The method according to claim 4, characterized in that The weight parameter of the k+1th feature fusion layer is: Among them, the Used to represent the weight parameter of the k+1th feature fusion layer, Used to represent the weight parameter of the k-th feature fusion layer, the α H Used to represent the feature fusion layer weight learning rate, the Used to represent the momentum of the k-th feature fusion layer; The weight parameter of the k+1th output layer is: Among them, the Used to represent the weight parameters of the k+1th output layer, is used to represent the k-th output layer weight parameter, the α O It is used to represent the learning rate of the output layer weight, Used to represent the momentum of the k-th output layer.

7. The method according to any one of claims 1 to 6, characterized in that The object to be classified is an object to be transferred; the multiple feature values ​​of the object to be classified are feature values ​​related to the position to be transferred of the object to be transferred; The classification result includes a plurality of the transfer positions and an occurrence probability corresponding to each of the transfer positions; The fuzzy logic condition is a transfer condition related to the transfer position of the target object.

8. A classification device based on a lightweight TSK fuzzy classifier, characterized in that: include: A fuzzification module is used to obtain multiple feature values ​​of a training sample input by a user in multiple preset feature dimensions, and to perform fuzzification processing on the multiple feature values ​​through a membership layer to obtain a membership value corresponding to each feature value; the membership value is used to indicate the degree of correlation between the training sample and the cluster center corresponding to each preset feature dimension; a fusion module, configured to obtain a plurality of clear values ​​by performing defuzzification processing on the plurality of membership values, and fuse the plurality of clear values ​​and the plurality of eigenvalues ​​using a preset feature fusion function to generate a plurality of fused eigenvalues; An iterative module is configured to fit the multiple fused feature values ​​through a preset output function to generate a lightweight TSK fuzzy classifier trained based on the training sample; the feature fusion function and output function in the lightweight TSK fuzzy classifier are generated after a preset number of iterative updates based on a preset gradient descent algorithm; A classification module, configured to classify an object to be classified based on the lightweight TSK fuzzy classifier, and generate a classification result of the object to be classified and a plurality of fuzzy logic conditions; The fuzzy logic condition is used to explain the relationship between the classification result and each feature value of the object to be classified.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the classification method based on the lightweight TSK fuzzy classifier is implemented according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the classification method based on the lightweight TSK fuzzy classifier is implemented.