当前位置:网站首页>[fault diagnosis] bearing fault diagnosis based on Bayesian optimization support vector machine with matlab code
[fault diagnosis] bearing fault diagnosis based on Bayesian optimization support vector machine with matlab code
2022-07-25 16:12:00 【Matlab scientific research studio】
1 Content introduction
Bayesian network (Bayesian Network or BN) It is an effective tool for modeling and uncertainty reasoning in the field of artificial intelligence . The basic task of Bayesian network reasoning is : Given a set of evidence variable observations , The posterior probability distribution of a set of query variables is calculated by searching the conditional probability table . In practical applications , The observed evidence value can be any value , That is, the evidence value may not be included in the conditional probability table . therefore , It is necessary to propose a method that can calculate the posterior probability distribution when any evidence value is given . In response to this question , This paper mainly discusses the construction and reasoning of Bayesian network with learning function : When constructing Bayesian network structure from samples , Also learn the maximum likelihood parameter from the sample ( Maximum likelihood hypothesis ), To replace the corresponding conditional probability table , That is, the maximum likelihood parameter is regarded as a part of Bayesian Network . After constructing Bayesian network structure from samples using traditional methods , This paper mainly focuses on how to learn maximum likelihood parameters from samples . Bayesian network contains two reasoning methods : Forward reasoning and reverse reasoning . For forward reasoning , We propose a method based on support vector machine and Sigmoid Function to learn maximum likelihood parameters . For reverse reasoning , First, based on Bayesian formula , Turn the reverse reasoning problem into the forward reasoning problem ; Then the maximum likelihood parameters are linearly interpolated . However , For the constructed Bayesian Network , They probably don't have the original samples . In this case , This paper presents a method of mapping the existing conditional probability table into samples , Then learn the maximum likelihood hypothesis from the obtained samples . further , In order to apply Bayesian network with maximum likelihood assumption to approximate reasoning , This paper gives the corresponding Gibbs Sampling algorithm . Last , We give an application example , The accuracy and verification of the test learning maximum likelihood hypothesis algorithm are given Gibbs Experiments on the convergence of sampling algorithm . Preliminary experimental results show that our method is feasible .
The main contributions of this paper are as follows : ● This paper presents a method of learning Bayesian networks with learning function , That is, when using existing methods to construct Bayesian network structure from samples , Based on support vector machine and Sigmoid function , Also learn the maximum likelihood hypothesis from the sample , To replace the corresponding conditional probability table . Then based on Bayesian network with maximum likelihood assumption , This paper further proposes the corresponding forward and reverse reasoning methods . This solves the problem of reasoning given any evidence value . ● This paper presents a method of mapping the existing conditional probability table into samples , The maximum likelihood hypothesis can also be learned from the existing conditional probability table , It solves the problem of Bayesian network that has been constructed ( There may be no original sample ), The problem that reasoning can be carried out even given any evidence value . ● further , In order to apply Bayesian network with maximum likelihood assumption to approximate reasoning , This paper gives the corresponding Gibbs Sampling algorithm . To a certain extent, it solves the inefficient problem of Bayesian network accurate reasoning .
2 Simulation code
clcclear allclose alladdpath(genpath(pwd))% Generate 3 Class sample ( Two dimensional Gaussian distribution )?sigma = [0.6 0; 0 0.6];numData = 100;mu = [6 5];X_1 = mvnrnd(mu, sigma, numData);label_1 = ones(numData, 1);mu = [3 9];X_2 = mvnrnd(mu, sigma, numData);label_2 = 2*ones(numData, 1);mu = [-2 7];X_3 = mvnrnd(mu, sigma, numData);label_3 = 3*ones(numData, 1);data = [X_1; X_2; X_3];label = [label_1; label_2; label_3];%% Bayesian optimization parameters% Upper and lower limits of variables and type settingsc = optimizableVariable('c', [1e-2 1e2], 'Type', 'real');g = optimizableVariable('g', [2^-7 2^7], 'Type', 'real');parameter = [c, g];% Cross validation parameter settings ( Set to... When cross validation is turned off [])?kfolds = 5;% kfolds = [];% Objective functionobjFun = @(parameter) getObjValue(parameter, data, label, kfolds);% Bayesian optimizationiter = 30;points = 10;results = bayesopt(objFun, parameter, 'Verbose', 1, ...'MaxObjectiveEvaluations', iter,...'NumSeedPoints', points);% Optimization results[bestParam, ~, ~] = bestPoint(results, 'Criterion', 'min-observed');%% Retrain with optimal parameters SVM Modelc = bestParam.c;g = bestParam.g;% Training and testingcmd = ['-s 0 -t 2 ', '-c ', num2str(c), ' -g ', num2str(g), ' -q'];model = libsvmtrain(label, data, cmd);[~, acc, ~] = libsvmpredict(label, data, model);%% SVM Boundary visualization ?d = 0.02;[X1, X2] = meshgrid(min(data(:, 1)):d:max(data(:, 1)), min(data(:, 2)):d:max(data(:, 2)));X_grid = [X1(:), X2(:)];grid_label = ones(size(X_grid, 1), 1);[pre_label, ~, ~] = libsvmpredict(grid_label, X_grid, model);% Keep the number g Point diagram ?figurecolor_p = [150, 138, 191;12, 112, 104; 220, 94, 75]/255; % The data goes back Plutonium ?color_b = [218, 216, 232; 179, 226, 219; 244, 195, 171]/255; % In the branch area, you can see the smoke in advancehold onax(1:3) = gscatter(X_grid (:,1), X_grid (:,2), pre_label, color_b);% Continue to control Data ?ax(4:6) = gscatter(data(:,1), data(:,2), label);set(ax(4), 'Marker','o', 'MarkerSize', 7, 'MarkerEdgeColor','k', 'MarkerFaceColor', color_p(1,:));set(ax(5), 'Marker','o', 'MarkerSize', 7, 'MarkerEdgeColor','k', 'MarkerFaceColor', color_p(2,:));set(ax(6), 'Marker','o', 'MarkerSize', 7, 'MarkerEdgeColor','k', 'MarkerFaceColor', color_p(3,:));set(gca, 'linewidth', 1.1)title('Decision boundary (gaussian kernel function)')axis tightlegend('off')box onset(gca, 'linewidth', 1.1)
3 Running results

4 reference
[1] Wang Junyu . Research on fault diagnosis of rolling bearing based on wavelet packet and optimized support vector machine .
[2] SuXiaoJie . Research on Bearing Fault Diagnosis Based on support vector machine under large-scale data .
[3] Yang Zhengyou , Peng Tao , Li Jianbao , etc. . Based on Bayesian inference LSSVM Rolling bearing fault diagnosis [J]. Journal of electronic measurement and instrumentation , 2010, 24(5):5.
About bloggers : Good at intelligent optimization algorithms 、 Neural networks predict 、 signal processing 、 Cellular automata 、 The image processing 、 Path planning 、 UAV and other fields Matlab Simulation , relevant matlab Code problems can be exchanged by private letter .
Some theories cite network literature , If there is infringement, contact the blogger to delete .
边栏推荐
- 权限管理-角色分配菜单
- 乐观锁悲观锁适用场景
- 食品安全丨无处不在的冷冻食品,你真的了解吗?
- 一文入门Redis
- [JS advanced] JS regular correlation functions and regular objects_ 02
- Huawei 2023 starts to warm up in advance! Zuo Shen's program code interview guide comes in handy
- 没错,请求DNS服务器还可以使用UDP协议
- 百奥赛图与LiberoThera共同开发全人GPCR抗体药物取得里程碑式进展
- MySQL metadata lock (MDL)
- Implementation of recommendation system collaborative filtering in spark
猜你喜欢

进程之间的通信(管道详解)

Ice 100g network card fragment message hash problem
![[server data recovery] data recovery cases of raid information loss caused by unexpected power failure of HP EVA server storage](/img/90/51d86111b918eb60761818110cdec4.jpg)
[server data recovery] data recovery cases of raid information loss caused by unexpected power failure of HP EVA server storage
![Leetcode:154. find the minimum value II in the rotation sort array [about the middle and rear positioning dichotomy of the rotation sort array]](/img/03/54a2d82a17cd07374dc0aedacd7b11.png)
Leetcode:154. find the minimum value II in the rotation sort array [about the middle and rear positioning dichotomy of the rotation sort array]

如何构建面向海量数据、高实时要求的企业级OLAP数据引擎?

Experimental reproduction of image classification (reasoning only) based on caffe resnet-50 network

Save the image with gaussdb (for redis), and the recommended business can easily reduce the cost by 60%

【ZeloEngine】反射系统填坑小结

Win11自带画图软件怎么显示标尺?

狂神redis笔记12
随机推荐
PageHelper.startPage没有生效问题
Waterfall flow layout
Experimental reproduction of image classification (reasoning only) based on caffe resnet-50 network
权限管理-角色分配菜单
leetcode:6127. 优质数对的数目【位运算找规律 + 两数之和大于等于k + 二分】
哪个led显示屏厂家更好
Sword finger offer | number of 1 in binary
ServletConfig 类和ServletContext 类
MySQL tutorial 67- filter duplicate data using distinct
Baseband simulation system experiment of 4pam in Gaussian channel and Rayleigh channel
mysql 隔离级别事务
MySQL implicit lock
MySQL pessimistic lock
The second revolution of reporting tools
tkinter模块高级操作(一)—— 透明按钮、透明文本框、自定义按钮及自定义文本框
Simple rotation map and hamster beating
MySQL global lock
使用Huggingface在矩池云快速加载预训练模型和数据集
mysql 表读锁
Mysql读写锁