A kind of electrocardiograph signal detection method based on confidence rule base and deep neural network
Technical field
Technical field more particularly to one kind the present invention relates to intelligent medical treatment are based on confidence rule base and deep neural network
Electrocardiograph signal detection method.
Background technology
Existing cardiac diagnosis method is that experienced doctor is judged according to tester's electrocardiosignal mostly.Doctor's
Medical knowledge and case experience are extremely important for detection accuracy.In recent years, the method for automatic detection also begins to occur, main
Two classes can be divided into:Method based on expert system and the method based on data-driven.The former using confidence rule base method as
Typical Representative, first extract electrocardiosignal character representation, then according to expertise knowledge design rule and build confidence rule
Then then storehouse carries out parameter optimization and rules reduction, finally the established confidence rule base of application carries out input test sample
Reasoning is adjudicated;The latter extracts mark sheet that is useful, compacting using machine learning method as Typical Representative, first from initial data
Show, then design and train grader, classification judgement finally is carried out to input ecg signal using trained grader.
Existing both of which there are it is respective the problem of.Although the method for confidence rule base can be known using expertise
Knowledge is modeled input feature vector, but expertise knowledge quantifies there is also hardly possible, difficult the problems such as representing, and confidence rule base
Complexity exponentially increases with the increase of input feature vector dimension, needs effectively about to subtract rule base progress in practice.Machine
Learning algorithm is entirely data-driven, and expertise influences seldom, to be easily subject to sample collection preference error for final decision
Etc. factors influence cause grader generalization ability poor.
The content of the invention
Exponentially increase with the increase of input feature vector dimension for existing cardiac diagnosis method complexity, grader is general
The technical issues of changing energy force difference, the present invention proposes a kind of ECG signal sampling side based on confidence rule base and deep neural network
Method, the electrocardiosignal in being detected for medicine are detected, classified and are adjudicated carry out auxiliary diagnosis automatically, are given full play to based on special
The modeling of family's Heuristics and the advantage for finding complex patterns from mass data based on deep learning, realize preferably detection effect
Fruit.
In order to achieve the above object, the technical proposal of the invention is realized in this way:One kind is based on confidence rule base and depth
The electrocardiograph signal detection method of neutral net is spent, its step are as follows:
Step 1:Deep neural network model is built according to input signal, network losses function is selected, utilizes network losses
Function drive deep neural network is trained according to input data;
Step 2:Manual features are extracted using expertise according to input signal;
Step 3:With reference to the feature that manual features deep neural network learns confidence rule is built as common input
Storehouse using the parameter of improved CMA-ES algorithm optimizations confidence rule base, and about subtracts the rule in confidence rule base;
Step 4:Decision-making is carried out using fusion method to the judgement output of deep neural network model and confidence rule base to melt
It closes, obtains more robust, accurate court verdict.
The network structure of the deep neural network model is convolutional neural networks, Recognition with Recurrent Neural Network, full connection structure
Or production confrontation network;The network losses function is selection cross entropy loss function or confrontation loss function;The fusion
Method includes Weighted Fusion method or hierarchical fusion method.
In the improved CMA-ES algorithms, the Optimized model of confidence rule base is:
Wherein, ξbFor loss function;{xiIt is input sample,For manual features,For deep learning feature,
{yiFor sample label, i is sample index, and j and k are respectively the vector index of manual features and deep learning feature, N representative samples
This number;The output of confidence rule base isθbIt is the parameter of confidence rule base;
Deep neural network model is:
The prediction output of deep neural network is gd(xi,θd), θdIt is the parameter of deep neural network, deep learning featureIt is expressed asξdFor loss function;
The Optimized model of confidence rule base provides the renewal amount of deep learning feature in every single-step iteration
The loss function ξbWith loss function ξd, chi square function is taken as regression problem, is taken as handing over for classification problem
Pitch entropy function.
It is with reference to the model that the end-to-end optimization of confidence rule base and deep neural network is trained:
Wherein, wbIt is the loss weight of confidence rule base, wgIt is the loss weight of depth neural network;
With reference to stochastic gradient descent method and improved CMA-ES algorithms to being combined confidence rule base and depth nerve
The model of the end-to-end optimization training of network is iterated solution.
The loss weight wbAnd wgIt is determined according to the method for development set optimizing or using feature to the important of loss function
Property analysis and loss function the mode of the sensitivity analysis of feature is determined.
The implementation method of the Decision fusion is:Note sample class is Λ={ 1 ..., K }, and K represents sample class sum,
The prediction probability of deep neural network exportsThe prediction probability of confidence rule base exports
WithFor fusion weight note, then there are the fusion results as follows:
Final integrated classification result is:
Beneficial effects of the present invention:Join with reference to the confidence rule base and data-driven constant depth neutral net of expertise
It builds mould jointly, realizes a kind of detection method end to end, it can be according to tester's electrocardiosignal to its potential illness that may be present
Automatically adjudicated;It gives full play to the modeling based on expertise knowledge and finds complexity from mass data based on deep learning
The advantage of pattern realizes better detection result.The present invention can be integrated in Portable Automatic diagnostic device or medical space
In fixed diagnostic device, tester is on the one hand facilitated to find state of an illness sign in time;On the other hand it can provide and examine for doctor
Disconnected reference, reduces its workload and Error Diagnostics.
Description of the drawings
It in order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention, for those of ordinary skill in the art, without creative efforts, can be with
Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the flow chart of the present invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of not making the creative labor
Embodiment belongs to the scope of protection of the invention.
As shown in Figure 1, a kind of electrocardiograph signal detection method based on confidence rule base and deep neural network, step is such as
Under:
Step 1:Deep neural network model is built according to input signal, network losses function is selected, utilizes network losses
Function drive deep neural network is trained according to input data.
The present invention includes two major parts of deep neural network and confidence rule base and an optional decision-making is melted
It closes.The network structure of deep neural network model is convolutional neural networks, Recognition with Recurrent Neural Network, full connection structure or production pair
The network structures such as anti-network;Network losses function is selection cross entropy loss function or confrontation loss function etc..
Step 2:Manual features are extracted using expertise according to input signal.
Step 3:With reference to the feature that manual features deep neural network learns confidence rule is built as common input
Storehouse using the parameter of improved CMA-ES algorithm optimizations confidence rule base, and about subtracts the rule in confidence rule base.
Being input to the feature of confidence rule base has two classes:First, the manual features extracted according to expertise;One kind is god
Through network from data learning to feature.Expertise is usually more stable, therefore the method for extracting feature is relatively more fixed, and one
As need not modify.But the feature quality that deep neural network model learns is driven by loss function.Cause
This, it is proposed that a kind of improved covariance matrix adaptive Evolutionary strategy (CMA-ES algorithms) can cause confidence rule base to exist
In the composition of optimization, the renewal amount of inputted deep learning feature is calculated, so as to provide supervisory signals, returns to depth nerve
Better character representation is arrived in its study of network-driven.First, provide based on confidence rule base and deep neural network single optimization
Method, then provide end-to-end optimization training method on this basis.
Note input sample is { xi, manual features areDeep learning is characterized asSample label is { yi,
In, i is sample index, and j, k are respectively the vector index of manual features and deep learning feature, and N is number of samples.Remember confidence rule
The then output in storehouse isWherein, θbIt is the parameter of confidence rule base, then classical confidence rule base optimization can be with
It is written as:
Wherein, ξbFor loss function, chi square function is usually taken into for regression problem, may be taken as handing over for classification problem
Pitch entropy function.
The prediction output of registered depth neutral net is gd(xi,θd), wherein, θdIt is the parameter of deep neural network, depth
Practise featureIt can be expressed asThen the optimization of deep neural network can be written as:
Here, loss function ξdCan be identical with following the example of in above-mentioned confidence rule base, it can not also be same.
As described above, independent training confidence rule base and deep neural network have ignored contact therebetween, also not
The advantage of expertise and the modeling of data-driven combined optimization can be given full play to.Therefore, modify to formula (1) as follows:
CMA-ES algorithms are targetedly changed, it is enable to provide the renewal amount of deep learning feature in every single-step iterationSo as to provide supervisory signals for deep neural network, the purpose of combined optimization training is realized.Based on above-mentioned modification,
It can be written as with reference to the end-to-end optimization training of confidence rule base and deep neural network:
Wherein, wbAnd wgIt is the loss weight of confidence rule base and depth neural network respectively.Solving above-mentioned optimization problem can
To be iterated realization using with reference to stochastic gradient descent (SGD) and the CMA-ES algorithms of above-mentioned modification.Specifically, CMA-ES changes
The renewal amount that generation calculatesDeep learning feature can be supervised together with the renewal amount of SGD iterative calculationUpdate, and then
Network weight is updated.It is pointed out that the loss weight w in above-mentioned optimization aimbAnd wgIt can be sought according to development set
Excellent method determines, can also use feature to the sensitivity analysis of the importance analysis and loss function of loss function to feature
Mode determine.
Step 4:Decision-making is carried out using fusion method to the judgement output of deep neural network model and confidence rule base to melt
It closes, obtains more robust, accurate court verdict.
Fusion method includes Weighted Fusion method or hierarchical fusion method.Provide the optional module Decision fusion in Fig. 1
Implementation method.For the sake of simplicity, the present invention only provides the embodiment of classification problem.Note sample class be Λ={ 1 ..., K }, depth
The prediction probability of neutral net exportsThe prediction probability of confidence rule base isMerge weight note
MakeWith For priori fiducial probability, then there are the fusion results as follows:
Accordingly, final integrated classification result is:
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention
With within principle, any modifications, equivalent replacements and improvements are made should all be included in the protection scope of the present invention god.