当前位置:网站首页>[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 .
边栏推荐
- MySQL tutorial 65 data in MySQL operation table
- Lazy loading of pictures
- MQTT X CLI 正式发布:强大易用的 MQTT 5.0 命令行工具
- R语言偏相关性计算(Partial Correlation)、使用ggm包的pcor函数计算偏相关性(Partial Correlations)
- 通用测试用例写作规范
- Win11自带画图软件怎么显示标尺?
- MySQL self incrementing lock
- 【莎士比亚:保持做人的乐趣】
- [Shakespeare: keep the fun of being a man]
- Circulaindicator component, which makes the indicator style more diversified
猜你喜欢
![[Shakespeare: keep the fun of being a man]](/img/71/6476f2d58255c78ac8f58fbfc6a0c9.png)
[Shakespeare: keep the fun of being a man]

General test case writing specification

聊聊如何用 Redis 实现分布式锁?

tkinter模块高级操作(一)—— 透明按钮、透明文本框、自定义按钮及自定义文本框

Product dynamics - Android 13 high-efficiency adaptation new upgrade

Exploration of 6-wire SPI transmission mode

Visual studio 2022 view class diagram

TypeError: Unrecognized value type: <class ‘str‘> ParserError: Unknown string format

Circulaindicator component, which makes the indicator style more diversified

【莎士比亚:保持做人的乐趣】
随机推荐
推荐系统-协同过滤在Spark中的实现
泰雷兹推出解决方案,助力SAP客户控制云端数据
没错,请求DNS服务器还可以使用UDP协议
MySQL教程71-WHERE 条件查询数据
优必选大型仿人服务机器人Walker X的核心技术突破
Implementation of recommendation system collaborative filtering in spark
Dpdk packet receiving and sending problem case: non packet receiving problem location triggered by mismatched packet sending and receiving function
进程之间的通信(管道详解)
Huawei 2023 starts to warm up in advance! Zuo Shen's program code interview guide comes in handy
泰山OFFICE技术讲座:英寸,厘米,磅,派卡,提,行,字行,像素的换算关系
ML - Speech - Introduction to speech processing
Ml image depth learning and convolution neural network
权限管理-角色分配菜单
MySQL table write lock
ML - Speech - traditional speech model
【服务器数据恢复】HP EVA服务器存储意外断电导致RAID信息丢失的数据恢复案例
I interviewed 8 companies and got 5 offers in a week. Share my experience
终极套娃 2.0 | 云原生交付的封装
一文入门Redis
R语言使用gt包和gtExtras包漂亮地显示表格数据:gt_bar_plot函数和gt_plt_bar_pct函数可视化百分比条形图、原始数据的百分比条形、缩放后的数据的百分比条形、指定数据对齐宽度