Joint domain adaptive gas sensor drift compensation method based on extreme learning machine

By adopting a joint domain adaptive method based on the limit learning machine in the electronic nose, using feature and label projection matrix optimization, the problem of failing to fully utilize label information in the prior art is solved, and higher classification accuracy and model are achieved Robustness alleviates the problem of electronic nose drift.

CN119089291AActive Publication Date: 2024-12-06SOUTHWEST UNIV

Patent Information

Application Number
CN202411380471.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2024-12-06
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

The existing field adaptive methods fail to fully utilize source domain tag information in the electronic nose, making it easier for the model to remember data rather than understand data, and the inaccurate pseudo-labeling affects the training effect, making it difficult to effectively alleviate drift problems.

Method used

Using a joint domain adaptive method based on the extreme learning machine, the Hilbert-Schmidt Independent Criteria (HSIC) is maximized to enhance the relationship between feature and tag space and realize the features. Field adaptation of the level and label level, reducing distribution differences and improving model robustness.

Benefits of technology

By aligning in the feature space and the label space, better distribution difference mitigation is achieved, classification accuracy and model robustness are improved, and the model is focused on understanding the data rather than memorizing the data, and the update of the label and feature projection space are enhanced. relationship.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089291A_ABST
    Figure CN119089291A_ABST
Patent Text Reader

Abstract

A joint domain adaptive gas sensor drift compensation method based on an extreme learning machine is characterized by comprising the following steps: acquiring a source domain non-drift sample XS, a target domain drift sample XT and source domain label space data YS; mapping to a hidden layer of ELM; feature space alignment is carried out through the feature projection matrix beta, classification is carried out through an SVM classifier, target domain label space data # imgabs0 # are obtained, and label space alignment is carried out through the label projection matrix P; measuring the relation between the enhanced feature projection space and the label projection space by maximizing the HSIC; alternately optimizing the feature projection matrix beta and the label projection matrix P through joint domain self-adaption; and after alternate optimization, obtaining optimal projection data after drift compensation. The method has the beneficial effects that the problem of distribution difference is better solved to relieve drifting, the classification accuracy is improved, and the robustness of the model is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of electronic nose signal processing, in particular to a joint domain adaptive gas sensor drift compensation method based on an extreme learning machine. Background Art

[0002] The drift problem in electronic nose applications has always been a bottleneck in the development of electronic noses. Since the drift of electronic noses is determined by many factors such as sensor aging, early use status of sensors, and environmental factors, it is difficult to measure drift directly. In general, the drift problem will cause inconsistent distribution. Domain adaptive methods have achieved good results in solving the drift problem of electronic noses by reducing distribution differences.

[0003] Among domain adaptation methods, the most commonly used ones are feature matching-based techniques, such as domain regularized component analysis, cross-domain discriminative subspace learning, local discriminant subspace projection, etc. The purpose of feature adaptation methods is to reduce the distribution differences between different domains by learning a common feature representation.

[0004] Disadvantages of existing technology:

[0005] 1. Most existing domain adaptation methods only minimize the marginal distribution difference and do not fully utilize the label information of the source domain.

[0006] 2. In the method that considers conditional distribution alignment, pseudo labels of the target domain are usually used. However, these pseudo labels are usually inaccurate, which will affect the training of the model, making it easier for the model to memorize data rather than understand it. Summary of the invention

[0007] The present invention is a joint domain adaptive gas sensor drift compensation method based on extreme learning machine, which better solves the distribution difference problem to alleviate drift, improves classification accuracy and enhances the robustness of the model.

[0008] To achieve the above purpose, a joint domain adaptive gas sensor drift compensation method based on extreme learning machine is provided, and the technical solution is as follows:

[0009] S1: Obtain drift-free samples X in the source domain S , the target domain has drift samples X T and source domain label space data Y S ;

[0010] S2: Map the source domain drift-free sample XS to the hidden layer of ELM to obtain the source domain hidden layer data HS;

[0011] Map the target domain drift samples XT to the hidden layer of the extreme learning machine (ELM) to obtain the target domain hidden layer data HT;

[0012] S3: The source domain hidden layer data H is projected through the feature projection matrix β S Align the feature space to obtain the source domain feature projection space data H S β;

[0013] The hidden layer data H in the target domain is transformed by the feature projection matrix β T Align the feature space to obtain the target domain feature projection space data H T β;

[0014] Target domain feature projection space data H T β is classified by SVM classifier to obtain the target domain label space data

[0015] S4: The source domain label space data Y is projected through the label projection matrix P S Align the label space to obtain the source domain label projection space data Y S P;

[0016] The target domain label space data is transformed through the label projection matrix P Align the label space to obtain the target domain label projection space data

[0017] S5: The relationship between the feature projection space and the label projection space is strengthened by maximizing the Hilbert-Schmidt Independence Criterion (HSIC).

[0018] S6: Alternately optimize the feature projection matrix β and the label projection matrix P through joint domain adaptation;

[0019] S7: After alternating optimization, the target domain feature projection space data H T β is the best projection data after drift compensation.

[0020] Using ELM nonlinear projection to achieve wider spatial learning improves generalization ability; by retaining the drift-free information of source domain samples and then reducing the distribution difference between target domain samples with drift and source domain samples without drift through projection, the classification accuracy is improved and the robustness of the model is enhanced;

[0021] By aligning the source domain data and the target domain data in the feature space and label space, feature-level and label-level domain adaptation is achieved, thereby better solving the distribution difference problem to alleviate drift; label-level domain adaptation enables the target domain label to be actively updated, so that the model can focus on understanding the data rather than memorizing it; at the same time, it minimizes the marginal distribution difference and conditional distribution difference, improves the classification accuracy and enhances the robustness of the model; maximizes the HSIC index, enhances the dependency between the source sample and the relevant label, and establishes the relationship between the feature projection space and the label projection space, so that the model can completely learn the feature space and label space together without weakening the correspondence between the feature and the label in the mapping;

[0022] Through joint domain adaptation, joint domain adaptation at the feature level and label level is achieved, which can better solve the distribution difference problem and alleviate the drift of the electronic nose.

[0023] Furthermore, the source domain hidden layer data H S =h(X S )=g(W T X S + b);

[0024] The target domain hidden layer data H T =h(X T )=g(W T X T + b);

[0025] Among them, h is the mapping function mapped to the hidden layer of ELM, W T is the hidden layer weight, b is the hidden layer bias, g is the hidden layer activation function; W T and b are randomly generated.

[0026] The drift-free sample X in the source domain S and the target domain has drift samples X T Mapped to the hidden layer of ELM, and then operated with the feature projection matrix β to form the basic ELM framework;

[0027] The constraints of the reconstruction loss of the basic ELM are:

[0028]

[0029] Among them, st represents the constraint condition, β is the minimum value of the formula after the symbol under the constraint condition, β represents the characteristic projection matrix, x i is the i-th input data of the basic ELM, y i is the i-th output data of the basic ELM, ξ irepresents the training error, λ is the penalty parameter, N is the number of input samples, and h is the mapping function mapped to the hidden layer of ELM, specifically: W T is the hidden layer weight, b is the hidden layer bias, and g is the hidden layer activation function.

[0030] Furthermore, in step S2 and step S3, the source domain has no drift sample X S After being mapped to the hidden layer of ELM and aligned in feature space, the constraints of the source domain sample reconstruction loss are:

[0031]

[0032] Among them, st represents the constraint condition, β is the β corresponding to the minimum value of the formula after the symbol under the constraint condition, β represents the characteristic projection matrix, is the i-th source domain drift-free sample, is the error of the i-th source domain drift-free sample before and after feature space mapping alignment, λ is the penalty parameter, Ns is the source domain drift-free sample X S , h is the mapping function mapped to the hidden layer of ELM, specifically: W T is the hidden layer weight, b is the hidden layer bias, and g is the hidden layer activation function.

[0033] The expected output y of the constraint term in the basic ELM i Change the input data x to i s When , the output of ELM is close to the input data; by changing the composition and constraints of the basic ELM, the dynamic alignment of the feature layer and the label layer is achieved while retaining the source domain data information, thereby better solving the distribution difference problem and alleviating the drift.

[0034] Furthermore, the alignment of the feature space in step S3 adopts a feature space joint distribution MMD method, wherein the feature space joint distribution MMD includes a feature space marginal distribution MMD and a feature space conditional distribution MMD;

[0035] The formula for the feature space marginal distribution MMD is:

[0036]

[0037] in, is the marginal distribution MMD in feature space, N S is the drift-free sample X in the source domain S The number of Nt is the number of drift samples X in the target domain. T The number of is the i-th source domain drift-free sample, is the jth target domain with drift samples, A0 is the adaptive matrix under marginal distribution, tr is the trace of the matrix, β T is the transpose of the feature projection matrix β, H = [H S ;H T ], H T is the transpose of the matrix H;

[0038] h is the mapping function mapped to the hidden layer of ELM, specifically: W T is the hidden layer weight, b is the hidden layer bias, and g is the hidden layer activation function;

[0039] The formula of the adaptive matrix A0 under marginal distribution is:

[0040]

[0041] In Formula 4, Ns+Nt is determined as the total number of rows of the adaptive matrix A0 under the marginal distribution, where m is an integer from 1 to Ns+Nt, and Ns+Nt is determined as the total number of columns of the adaptive matrix A0 under the marginal distribution, where n is an integer from 1 to Ns+Nt.

[0042] The formula for the feature space conditional distribution MMD is:

[0043]

[0044] in, is the conditional distribution MMD in feature space, c is the label space category of the target domain, that is, MMD constraint is performed under the same category condition; h i is the i-th source domain hidden layer data belonging to category c, h j is the jth target domain hidden layer data belonging to category c, represents the source domain hidden layer data belonging to category c, represents the target domain hidden layer data belonging to category c, Ns (c) Nt represents the number of source domain samples belonging to category c. (c) A represents the number of target domain samples belonging to category c; c is the adaptive matrix under conditional distribution;

[0045] Adaptive matrix A under conditional distribution c The formula is:

[0046]

[0047] In formula 6, Ns+Nt is determined as the adaptive matrix A under marginal distribution cThe total number of rows of , where m is an integer from 1 to Ns+Nt, and Ns+Nt is determined as the adaptive matrix A under the marginal distribution c The total number of columns of , where n is an integer from 1 to Ns+Nt;

[0048] is the mth source domain label space data, is the nth source domain label space data, is the m-Ns target domain label space data, n-Ns target domain label space data;

[0049] The MMD formula for the joint distribution of feature space is:

[0050]

[0051] in, is the joint distribution MMD of feature space, is the adaptive matrix under marginal distribution, is the adaptation matrix under conditional distribution, A is the joint distribution adaptation matrix;

[0052] The formula of the joint distribution adaptation matrix A is:

[0053]

[0054] Wherein, c=0 is an arbitrary category.

[0055] By finding an excellent projection to learn an adaptive discriminative subspace, the domain distribution difference is reduced; therefore, in order to measure the distribution difference between the two domains in the projected feature space, MMD is used as the difference metric;

[0056] Conventionally, simply reducing the marginal distribution difference cannot guarantee the consistency of the data distribution of the two domains. However, the joint distribution MMD of the present invention not only realizes the marginal distribution alignment and reduces the marginal distribution difference, but also realizes the conditional distribution alignment, further reducing the conditional distribution difference of the data of the two domains. It is more effective in reducing the distribution difference, and can better solve the problem of electronic nose drift.

[0057] Furthermore, in step S4, the source domain label space data Y is projected by the label projection matrix P. S and target domain label space data To align the label space, the label space joint distribution MMD method is adopted. The label space joint distribution MMD formula is:

[0058]

[0059] in, is the joint distribution MMD of label space, A is the joint distribution adaptation matrix, tr is the trace of the matrix, P T is the transpose of the label projection matrix P, Y T is the transpose of matrix Y;

[0060] Ns is the drift-free sample X in the source domain S The number of Nt is the number of drift samples X in the target domain. T The number of The i-th source domain label space data, The jth target domain label space data;

[0061] c is the label space category of the target domain, y i is the i-th source domain label space data belonging to category c, is the j-th target domain label space data belonging to category c, represents the source domain label space data belonging to category c, Ns represents the target domain label space data belonging to category c, (c) Nt represents the number of source domain samples belonging to category c. (c) Represents the number of target domain samples belonging to category c.

[0062] In feature-level domain adaptation, feature alignment is used to reduce domain distribution differences. However, due to the limitations of the initial classifier performance, the pseudo labels generated in the target domain in the initial stage are often unreliable. Therefore, by introducing the alignment of the label space to actively correct the pseudo labels and align the output prediction space, the final prediction result is more accurate.

[0063] Marginal distribution alignment and conditional distribution alignment are still achieved in the label space. At the same time, the alignment in the label space enables the target domain label to be actively updated, so that the model can focus on understanding the data rather than memorizing it. This is a proactive method to improve the adaptability of the label space.

[0064] Furthermore, in step S5, the formula for maximizing HSIC is:

[0065]

[0066] in, represents the center matrix, I Ns is the identity matrix of order Ns, Multiply each element of the identity matrix by Ns is the drift-free sample X in the source domain S The number of, tr is the trace of the matrix, β T is the transpose of the label projection matrix P, P T is the transpose of the label projection matrix P, H is the source domain hidden layer data S The transpose of is the source domain label space data Y S The transpose of .

[0067] By maximizing the HSIC metric, the relationship between features and labels is strengthened, making it more effective to learn the model.

[0068] Furthermore, in step S6, the joint domain adaptation formula is:

[0069]

[0070] in, is the joint distribution MMD of feature space, Ns is the drift-free sample X in the source domain S The number of is the drift-free sample X in the i-th source domain S The error before and after feature space mapping alignment, is the joint distribution MMD of the label space, I is the unit matrix, HSIC(H S β,Y S P) is to maximize HSIC, λ 1, λ 2, λ 3, λ 4, λ5 represents the scaling factor of the regularization term, where the fifth term is the regularization term that controls the output spatial distortion during the projection process.

[0071] Joint domain adaptation simultaneously realizes the marginal distribution alignment and conditional distribution alignment of the feature space, the marginal distribution alignment and conditional distribution alignment of the label space and maximizes HSIC, and also includes data reconstruction loss constraints, joint constraints of feature projection matrix β and label projection matrix P, which can maximize the reduction of distribution differences between the source domain and the target domain and reduce the drift of the electronic nose.

[0072] Furthermore, in step S6, the joint domain adaptation adopts an alternating optimization strategy, that is, fixing other free variables to optimize a single variable, and optimizing the feature projection matrix β and the label projection matrix P;

[0073] The formula of the feature projection matrix β is:

[0074]

[0075] in, Ns is the drift-free sample X in the source domain S The number of Nt is the number of drift samples X in the target domain. T The number of S ;H T ], H Tis the transpose of matrix H, A is the joint distribution adaptation matrix, I is the identity matrix, H is the source domain hidden layer data S The transpose of Q S represents the center matrix, P T is the transpose of the label projection matrix P, is the source domain label space data Y S The transpose of

[0076] The formula of the label projection matrix P is:

[0077]

[0078] Among them, β T is the transpose of the feature projection matrix β.

[0079] By substituting the constraints into the objective function, the optimization problem is transformed into an unconstrained form, and finally the formulas of the feature projection matrix β and the label projection matrix P are obtained. The alternating optimization strategy is adopted to optimize the feature projection matrix β and the label projection matrix P, and joint domain adaptation is achieved.

[0080] The benefits of the present invention are as follows: by aligning source domain data and target domain data in feature space and label space, feature-level and label-level domain adaptation is achieved, thereby better solving the distribution difference problem to alleviate drift; label-level domain adaptation enables the target domain label to be actively updated, so that the model can focus on understanding the data rather than memorizing the data; at the same time, the marginal distribution difference and the conditional distribution difference are minimized, the classification accuracy is improved and the robustness of the model is enhanced; the HSIC index is maximized, the dependency between the source sample and the related label is enhanced, and the relationship between the feature projection space and the label projection space is established, so that the model can completely jointly learn the feature space and the label space without weakening the correspondence between the feature and the label in the mapping. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] Figure 1 It is a principle block diagram of the present invention. DETAILED DESCRIPTION

[0082] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments:

[0083] Example 1

[0084] like Figure 1 As shown, the joint domain adaptive gas sensor drift compensation method based on extreme learning machine includes the following steps:

[0085] S1: Obtain a drift-free sample X of the source domain of a reliable gas sample S, and a target gas sample with a reference degree, a target domain with a drift sample X T and source domain label space data Y S ; As the basis for the early training of the gas sensor, in the later training, the gas data collected by the gas sensor is directly used as the target domain with drift samples X T Conduct training.

[0086] S2: The source domain drift-free sample X S and the target domain has drift samples X T Mapped to the hidden layer of ELM, the source domain hidden layer data H S and the target domain hidden layer data H T ;

[0087] S3: The source domain hidden layer data H is projected through the feature projection matrix β S and the target domain hidden layer data H T Align the feature space and obtain the source domain feature projection space data H S β and target domain feature projection space data H T β, target domain feature projection space data H T β is classified by SVM classifier to obtain the target domain label space data

[0088] The purpose of joint adaptation is to obtain the best projection data, so as to better train the SVM classifier to achieve higher accuracy. The present invention does not change the classification principle of the SVM classifier. SVM is a mature and common classifier.

[0089] S4: The source domain label space data Y is projected through the label projection matrix P S and target domain label space data Align the label space and obtain the source domain label projection space data Y S P and target domain label projection space data

[0090] S5: The relationship between the feature projection space and the label projection space is strengthened by maximizing the HSIC measurement;

[0091] S6: Alternately optimize the feature projection matrix β and the label projection matrix P through joint domain adaptation to optimize the five penalty parameters λ1, λ2, λ3, λ4, λ5 in the final optimization expression;

[0092] S7: After alternating optimization, the target domain feature projection space data H T β is the best projection data after drift compensation.

[0093] Using ELM nonlinear projection to achieve wider spatial learning improves generalization ability; by retaining the drift-free information of source domain samples and then reducing the distribution difference between target domain samples with drift and source domain samples without drift through projection, the classification accuracy is improved and the robustness of the model is enhanced;

[0094] By aligning the source domain data and the target domain data in the feature space and label space, feature-level and label-level domain adaptation is achieved, thereby better solving the distribution difference problem to alleviate drift; label-level domain adaptation enables the target domain label to be actively updated, so that the model can focus on understanding the data rather than memorizing it; at the same time, it minimizes the marginal distribution difference and the conditional distribution difference, improves the classification accuracy and enhances the robustness of the model; maximizes the HSIC index, enhances the dependency between the source sample and the relevant label, and establishes the relationship between the feature projection space and the label projection space, so that the model can completely jointly learn the feature space and the label space without weakening the correspondence between the feature and the label in the mapping

[0095] Through joint domain adaptation, joint domain adaptation at the feature level and label level is achieved, which can better solve the distribution difference problem and alleviate the drift of the electronic nose.

[0096] Furthermore, the source domain hidden layer data H S =h(X S )=g(W T X S + b);

[0097] The target domain hidden layer data H T =h(X T )=g(W T X T + b);

[0098] Among them, h is the mapping function mapped to the hidden layer of ELM, W T is the hidden layer weight, b is the hidden layer bias, g is the hidden layer activation function; W T and b are randomly generated.

[0099] The drift-free sample X in the source domain S and the target domain has drift samples X T Mapped to the hidden layer of ELM, and then operated with the feature projection matrix β to form the basic ELM framework;

[0100] The constraints of the reconstruction loss of the basic ELM are:

[0101]

[0102] Among them, st represents the constraint condition, β is the minimum value of the formula after the symbol under the constraint condition, β represents the characteristic projection matrix, x i is the i-th input data of the basic ELM, y i is the i-th output data of the basic ELM, ξ i represents the training error, λ is the penalty parameter, N is the number of input samples, and h is the mapping function mapped to the hidden layer of ELM, specifically: W T is the hidden layer weight, b is the hidden layer bias, and g is the hidden layer activation function.

[0103] Furthermore, in step S2 and step S3, the source domain has no drift sample X S After being mapped to the hidden layer of ELM and aligned in feature space, the constraints of the source domain sample reconstruction loss are:

[0104]

[0105] Among them, st represents the constraint condition, β is the β corresponding to the minimum value of the formula after the symbol under the constraint condition, β represents the characteristic projection matrix, is the i-th source domain drift-free sample, is the error of the i-th source domain drift-free sample before and after feature space mapping alignment, λ is the penalty parameter, Ns is the source domain drift-free sample X S , h is the mapping function mapped to the hidden layer of ELM, specifically: W T is the hidden layer weight, b is the hidden layer bias, and g is the hidden layer activation function.

[0106] The expected output y of the constraint term in the basic ELM i Change the input data x to i s When , the output of ELM is close to the input data; by changing the composition and constraints of the basic ELM, the dynamic alignment of the feature layer and the label layer is achieved while retaining the source domain data information, thereby better solving the distribution difference problem and alleviating the drift.

[0107] Furthermore, the alignment of the feature space in step S3 adopts a feature space joint distribution MMD method, wherein the feature space joint distribution MMD includes a feature space marginal distribution MMD and a feature space conditional distribution MMD;

[0108] The formula for the feature space marginal distribution MMD is:

[0109]

[0110] in, is the marginal distribution MMD in feature space, N S is the drift-free sample X in the source domain S The number of Nt is the number of drift samples X in the target domain. T The number of is the i-th source domain drift-free sample, is the jth target domain with drift samples, A0 is the adaptive matrix under marginal distribution, tr is the trace of the matrix, β T is the transpose of the feature projection matrix β, H = [H S ;H T ], H T is the transpose of the matrix H;

[0111] h is the mapping function mapped to the hidden layer of ELM, specifically: W T is the hidden layer weight, b is the hidden layer bias, and g is the hidden layer activation function;

[0112] The formula of the adaptive matrix A0 under marginal distribution is:

[0113]

[0114] In Formula 4, Ns+Nt is determined as the total number of rows of the adaptive matrix A0 under the marginal distribution, where m is an integer from 1 to Ns+Nt, and Ns+Nt is determined as the total number of columns of the adaptive matrix A0 under the marginal distribution, where n is an integer from 1 to Ns+Nt.

[0115] The formula for the feature space conditional distribution MMD is:

[0116]

[0117] in, is the conditional distribution MMD in feature space, c is the label space category of the target domain, that is, MMD constraint is performed under the same category condition; h i is the i-th source domain hidden layer data belonging to category c, h j is the jth target domain hidden layer data belonging to category c, represents the source domain hidden layer data belonging to category c, represents the target domain hidden layer data belonging to category c, Ns (c) Nt represents the number of source domain samples belonging to category c. (c) A represents the number of target domain samples belonging to category c; c is the adaptive matrix under conditional distribution;

[0118] Adaptive matrix A under conditional distribution c The formula is:

[0119]

[0120] In formula 6, Ns+Nt is determined as the adaptive matrix A under marginal distribution c The total number of rows of , where m is an integer from 1 to Ns+Nt, and Ns+Nt is determined as the adaptive matrix A under the marginal distribution c The total number of columns of , where n is an integer from 1 to Ns+Nt;

[0121] is the mth source domain label space data, is the nth source domain label space data, is the m-Ns target domain label space data, n-Ns target domain label space data;

[0122] The MMD formula for the joint distribution of feature space is:

[0123]

[0124] in, is the joint distribution MMD of feature space, is the adaptive matrix under marginal distribution, is the adaptation matrix under conditional distribution, A is the joint distribution adaptation matrix;

[0125] The formula of the joint distribution adaptation matrix A is:

[0126]

[0127] Wherein, c=0 is an arbitrary category.

[0128] By finding an excellent projection to learn an adaptive discriminative subspace, the domain distribution difference is reduced; therefore, in order to measure the distribution difference between the two domains in the projected feature space, MMD is used as the difference metric;

[0129] Conventionally, simply reducing the marginal distribution difference cannot guarantee the consistency of the data distribution in the two domains. The joint distribution MMD not only achieves marginal distribution alignment and reduces marginal distribution differences, but also achieves conditional distribution alignment, further reducing the conditional distribution difference of the data in the two domains. It is more effective in reducing distribution differences, and can better solve the problem of electronic nose drift.

[0130] Furthermore, in step S4, the source domain label space data Y is projected by the label projection matrix P. S and target domain label space data To align the label space, the label space joint distribution MMD method is adopted. The label space joint distribution MMD formula is:

[0131]

[0132] in, is the joint distribution MMD of label space, A is the joint distribution adaptation matrix, tr is the trace of the matrix, P T is the transpose of the label projection matrix P, Y T is the transpose of matrix Y;

[0133] Ns is the drift-free sample X in the source domain S The number of Nt is the number of drift samples X in the target domain. T The number of The i-th source domain label space data, The jth target domain label space data;

[0134] c is the label space category of the target domain, y i is the i-th source domain label space data belonging to category c, is the j-th target domain label space data belonging to category c, represents the source domain label space data belonging to category c, Ns represents the target domain label space data belonging to category c, (c) Nt represents the number of source domain samples belonging to category c. (c) Represents the number of target domain samples belonging to category c.

[0135] In feature-level domain adaptation, feature alignment is used to reduce domain distribution differences. However, due to the limitations of the initial classifier performance, the pseudo labels generated in the target domain in the initial stage are often unreliable. Therefore, by introducing the alignment of the label space to actively correct the pseudo labels and align the output prediction space, the final prediction result is more accurate.

[0136] Marginal distribution alignment and conditional distribution alignment are still achieved in the label space. At the same time, the alignment in the label space enables the target domain label to be actively updated, so that the model can focus on understanding the data rather than memorizing it. This is a proactive method to improve the adaptability of the label space.

[0137] Furthermore, in step S5, the formula for maximizing HSIC is:

[0138]

[0139] in, represents the center matrix, I Ns is the identity matrix of order Ns, Multiply each element of the identity matrix by Ns is the drift-free sample X in the source domain S The number of, tr is the trace of the matrix, β T is the transpose of the label projection matrix P, P T is the transpose of the label projection matrix P, H is the source domain hidden layer data S The transpose of is the source domain label space data Y S The transpose of .

[0140] By maximizing the HSIC metric, the relationship between features and labels is strengthened, making it more effective to learn the model.

[0141] Furthermore, in step S6, the joint domain adaptation formula is:

[0142]

[0143] in, is the joint distribution MMD of feature space, Ns is the drift-free sample X in the source domain S The number of is the drift-free sample X in the i-th source domain S The error before and after feature space mapping alignment, is the joint distribution MMD of the label space, I is the unit matrix, HSIC(H S β,Y S P) is to maximize HSIC, λ1,λ2,λ3,λ4,λ5 represent the scaling factors of the regularization terms, among which the fifth term is the regularization term that controls the output spatial distortion during the projection process.

[0144] Joint domain adaptation simultaneously realizes the marginal distribution alignment and conditional distribution alignment of the feature space, the marginal distribution alignment and conditional distribution alignment of the label space and maximizes HSIC, and also includes data reconstruction loss constraints, joint constraints of feature projection matrix β and label projection matrix P, which can maximize the reduction of distribution differences between the source domain and the target domain and reduce the drift of the electronic nose.

[0145] In step S6, the joint domain adaptation adopts an alternating optimization strategy, that is, fixing other free variables to optimize a single variable, and optimizing the feature projection matrix β and the label projection matrix P;

[0146] The feature projection matrix β and label projection matrix P are derived as follows:

[0147] First, substitute the constraints into the objective function and transform the above optimization problem into an unconstrained form:

[0148]

[0149] For the convenience of derivation, let At the same time, by substituting formula (7), formula (9) and formula (10) into formula (12), we can get formula (13):

[0150]

[0151] First, fix P = I to optimize β, and then we can get the formula:

[0152]

[0153] According to the properties of trace operation, formula (15) holds:

[0154]

[0155] Substituting into formula (14), taking the partial derivative of β from formula (14) and setting it to 0, we can obtain:

[0156]

[0157] The solution of formula (16) yields the characteristic projection matrix β:

[0158]

[0159] in, Ns is the drift-free sample X in the source domain S The number of Nt is the number of drift samples X in the target domain. T The number of S ;H T ], H T is the transpose of matrix H, A is the joint distribution adaptation matrix, I is the identity matrix, H is the source domain hidden layer data S The transpose of Q S represents the center matrix, P T is the transpose of the label projection matrix P, is the source domain label space data Y S The transpose of

[0160] Then, fix the β value obtained by formula (17), calculate the partial derivative of formula (13) with respect to P and set it to 0, and we can get:

[0161]

[0162] The solution of formula (18) can obtain the label projection matrix P:

[0163]

[0164] Among them, βT is the transpose of the feature projection matrix β.

[0165] The feature projection matrix β and the label projection matrix P are jointly learned. By substituting the constraints into the objective function, the optimization problem is transformed into an unconstrained form. Finally, the formulas of the feature projection matrix β and the label projection matrix P are obtained. An alternating optimization strategy is adopted, that is, fixing other free variables to optimize a single variable. The feature projection matrix β and the label projection matrix P are optimized to achieve joint domain adaptation.

[0166] Specific experimental verification:

[0167] 1. UCSD Benchmark Sensor Drift Dataset

[0168] According to the sensor drift dataset collected by Vergara over a three-year period, this sensor drift dataset was collected through a gas platform over a period of 36 months from January 2008 to February 2011. These records were sampled through an electronic nose system with a 16MOS gas sensor array exposed to six gases, including ammonia, acetaldehyde, acetone, ethylene, ethanol, and toluene at different concentration levels. For each sensor, eight features were extracted, so each sample is a 128-dimensional feature vector. It is divided into 10 batches according to time, as shown in the following table:

[0169]

[0170]

[0171] 2. Results on the UCSD Benchmark Sensor Drift Dataset

[0172] There are two settings:

[0173] 1) Fixed batch 1 as the source domain and K as the target domain (K = 2, 3, ..., 10);

[0174] 2) Train on batch K-1 and test on batch K (K=2, 3, ..., 10). The training results of setting 1 are as follows:

[0175]

[0176]

[0177] The training results of setting 2 are as follows:

[0178]

[0179]

[0180] Among them, JDAELM is the result obtained by the joint domain adaptive gas sensor drift compensation method based on extreme learning machine. The average accuracy of setting 1 is 88.30, and the average accuracy of setting 2 is 87.21. Compared with other methods, it has better average accuracy and can better solve the distribution difference problem to alleviate drift, improve classification accuracy and enhance the robustness of the model.

[0181] The main principles of the present invention are as follows: by aligning the source domain data and the target domain data in the feature space and the label space, feature-level and label-level domain adaptation is achieved, thereby better solving the distribution difference problem to alleviate drift; label-level domain adaptation enables the target domain label to be actively updated, so that the model can focus on understanding the data rather than memorizing the data; at the same time, the marginal distribution difference and the conditional distribution difference are minimized, the classification accuracy is improved and the robustness of the model is enhanced; the HSIC index is maximized, the dependency between the source sample and the related label is enhanced, and the relationship between the feature projection space and the label projection space is established, so that the model can completely jointly learn the feature space and the label space without weakening the correspondence between the feature and the label in the mapping.

[0182] Finally, it should be noted that the above description is only a preferred embodiment of the present invention. Under the guidance of the present invention, ordinary technicians in this field can make various similar expressions without violating the purpose and claims of the present invention, and such changes all fall within the scope of protection of the present invention.

Claims

1. A joint domain adaptive gas sensor drift compensation method based on extreme learning machine, characterized by: The following steps are involved: S1: Obtain drift-free samples X in the source domain S , the target domain has drift samples X T and source domain label space data Y S ; S2: The source domain drift-free sample X S Mapped to the hidden layer of ELM, the source domain hidden layer data H is obtained S ; The target domain has drift samples X T Mapped to the hidden layer of ELM, the target domain hidden layer data H is obtained T ; S3: The source domain hidden layer data H is projected through the feature projection matrix β S Align the feature space to obtain the source domain feature projection space data H S β; The hidden layer data H in the target domain is transformed by the feature projection matrix β T Align the feature space to obtain the target domain feature projection space data H T β; Target domain feature projection space data H T β is classified by SVM classifier to obtain the target domain label space data S4: The source domain label space data Y is projected through the label projection matrix P S Align the label space to obtain the source domain label projection space data Y S P; The target domain label space data is transformed through the label projection matrix P Align the label space to obtain the target domain label projection space data S5: The relationship between the feature projection space and the label projection space is strengthened by maximizing the HSIC measurement; S6: Alternately optimize the feature projection matrix β and the label projection matrix P through joint domain adaptation; S7: After alternating optimization, the target domain feature projection space data H T β is the best projection data after drift compensation.

2. The method for joint domain adaptive gas sensor drift compensation based on extreme learning machine according to claim 1, characterized in that: In step S2: The source domain hidden layer data H S =h(X S )=g(W T X S + b); The target domain hidden layer data H T =h(X T )=g(W T X T + b); Among them, h is the mapping function mapped to the hidden layer of ELM, W T is the hidden layer weight, b is the hidden layer bias, g is the hidden layer activation function; W T and b are randomly generated.

3. The method for joint domain adaptive gas sensor drift compensation based on extreme learning machine according to claim 1, characterized in that: In step S2 and step S3, the source domain has no drift sample X S After mapping to the hidden layer of ELM and aligning the feature space, the constraint condition of the source domain sample reconstruction loss is: Among them, st represents the constraint condition, β is the β corresponding to the minimum value of the formula after the symbol under the constraint condition, β represents the characteristic projection matrix, is the i-th source domain drift-free sample, is the error of the i-th source domain drift-free sample before and after feature space mapping alignment, λ is the penalty parameter, Ns is the source domain drift-free sample X S , h is the mapping function mapped to the hidden layer of ELM, specifically: W T is the hidden layer weight, b is the hidden layer bias, and g is the hidden layer activation function.

4. The method for joint domain adaptive gas sensor drift compensation based on extreme learning machine according to claim 1, characterized in that: In step S3: The alignment of feature space adopts the feature space joint distribution MMD method, which includes feature space marginal distribution MMD and feature space conditional distribution MMD. The formula for the feature space marginal distribution MMD is: in, is the marginal distribution MMD in feature space, N S is the drift-free sample X in the source domain S The number of Nt is the number of drift samples X in the target domain. T The number of is the i-th source domain drift-free sample, is the jth target domain with drift samples, A0 is the adaptive matrix under marginal distribution, tr is the trace of the matrix, β T is the transpose of the feature projection matrix β, H = [H S ;H T ], H T is the transpose of the matrix H; h is the mapping function mapped to the hidden layer of ELM, specifically: W T is the hidden layer weight, b is the hidden layer bias, and g is the hidden layer activation function; The formula of the adaptive matrix A0 under marginal distribution is: In Formula 4, Ns+Nt is determined as the total number of rows of the adaptive matrix A0 under the marginal distribution, where m is an integer from 1 to Ns+Nt, and Ns+Nt is determined as the total number of columns of the adaptive matrix A0 under the marginal distribution, where n is an integer from 1 to Ns+Nt. The formula for the feature space conditional distribution MMD is: in, is the conditional distribution MMD in feature space, c is the label space category of the target domain, that is, MMD constraint is performed under the same category condition; h i is the i-th source domain hidden layer data belonging to category c, h j is the jth target domain hidden layer data belonging to category c, represents the source domain hidden layer data belonging to category c, represents the target domain hidden layer data belonging to category c, Ns (c) Nt represents the number of source domain samples belonging to category c. (c) A represents the number of target domain samples belonging to category c; c is the adaptive matrix under conditional distribution; Adaptive matrix A under conditional distribution c The formula is: In formula 6, Ns+Nt is determined as the adaptive matrix A under marginal distribution c The total number of rows of , where m is an integer from 1 to Ns+Nt, and Ns+Nt is determined as the adaptive matrix A under the marginal distribution c The total number of columns of , where n is an integer from 1 to Ns+Nt; is the mth source domain label space data, is the nth source domain label space data, is the m-Ns target domain label space data, n-Ns target domain label space data; The MMD formula for the joint distribution of feature space is: in, is the joint distribution MMD of feature space, is the adaptive matrix under marginal distribution, is the adaptation matrix under conditional distribution, A is the joint distribution adaptation matrix; The formula of the joint distribution adaptation matrix A is: Wherein, c=0 is an arbitrary category.

5. The method for joint domain adaptive gas sensor drift compensation based on extreme learning machine according to claim 1, characterized in that: In step S4, the source domain label space data Y is projected by the label projection matrix P. S and target domain label space data To align the label space, the label space joint distribution MMD method is adopted. The label space joint distribution MMD formula is: in, is the joint distribution MMD of label space, A is the joint distribution adaptation matrix, tr is the trace of the matrix, P T is the transpose of the label projection matrix P, Y T is the transpose of matrix Y; Ns is the drift-free sample X in the source domain S The number of Nt is the number of drift samples X in the target domain. T The number of The i-th source domain label space data, The jth target domain label space data; c is the label space category of the target domain, y i is the i-th source domain label space data belonging to category c, is the j-th target domain label space data belonging to category c, represents the source domain label space data belonging to category c, Ns represents the target domain label space data belonging to category c, (c) Nt represents the number of source domain samples belonging to category c. (c) Represents the number of target domain samples belonging to category c.

6. The method for joint domain adaptive gas sensor drift compensation based on extreme learning machine according to claim 1, characterized in that: In step S5, the formula for maximizing HSIC is: in, represents the center matrix, I Ns is the identity matrix of order Ns, Multiply each element of the identity matrix by Ns is the drift-free sample X in the source domain S The number of, tr is the trace of the matrix, β T is the transpose of the label projection matrix P, P T is the transpose of the label projection matrix P, H is the source domain hidden layer data S The transpose of is the source domain label space data Y S The transpose of .

7. The method for joint domain adaptive gas sensor drift compensation based on extreme learning machine according to claim 2, characterized in that: In step S6, the joint domain adaptation formula is: in, is the joint distribution MMD of feature space, Ns is the drift-free sample X in the source domain S The number of is the drift-free sample X in the i-th source domain S The error before and after feature space mapping alignment, is the joint distribution MMD of the label space, I is the unit matrix, HSIC(H S β,Y S P) is to maximize HSIC, λ1,λ2,λ3,λ4,λ5 represent the scaling factors of the regularization terms, among which the fifth term is the regularization term that controls the output spatial distortion during the projection process.

8. The method for joint domain adaptive gas sensor drift compensation based on extreme learning machine according to claim 7, characterized in that: In step S6, the joint domain adaptation adopts an alternating optimization strategy, that is, fixing other free variables to optimize a single variable, and optimizing the feature projection matrix β and the label projection matrix P; The formula of the feature projection matrix β is: in, Ns is the drift-free sample X in the source domain S The number of Nt is the number of drift samples X in the target domain. T The number of S ;H T ], H T is the transpose of matrix H, A is the joint distribution adaptation matrix, I is the identity matrix, H is the source domain hidden layer data S The transpose of Q S represents the center matrix, P T is the transpose of the label projection matrix P, is the source domain label space data Y S The transpose of The formula of the label projection matrix P is: Among them, β T is the transpose of the feature projection matrix β.

Citation Information

Patent Citations

  • Cross-domain migration electronic nose drift suppression method based on migration samples

    CN111931815A

  • Domain adaptive method based on HSIC and RKHS subspace learning

    CN112287811A

  • Electronic nose signal drift compensation subspace alignment method based on extreme learning machine

    CN113627084A

  • System and Method for Automated Transfer Learning with Domain Disentanglement

    US20230162023A1

Cited By

  • Self-adaptive compensation method based on baseline drift of gas sensor

    CN119643803A