1.完整项目描述和程序获取
>面包多安全交易平台:https://mbd.pub/o/bread/Y5qal5xx
>如果链接失效,可以直接打开本站店铺搜索相关店铺:
>如果链接失效,程序调试报错或者项目合作也可以加微信或者QQ联系。
2.部分仿真图预览
3.算法概述
WOA算法设计的既精妙又富有特色,它源于对自然界中座头鲸群体狩猎行为的模拟, 通过鲸鱼群体搜索、包围、追捕和攻击猎物等过程实现优时化搜索的目的。在原始的WOA中,提供了包围猎物,螺旋气泡、寻找猎物的数学模型。
4.部分源码
clc;
clear;
close all;
warning off;
addpath(genpath(pwd));
global traindata trainlabel
% Industrial process data
load ('.\data\data_2.mat')
% Parameter setting of WOA
agent = 10; % Number of search agents
iteration = 30; % Maximum numbef of iterations
lb = [10^-3,2^-7]; % Lower bound of 'c' and 'g'
ub = [10^0,2^7]; % Upper bound of 'c' and 'g'
dim = 2; % Number of Parameter
fobj = @woa_obj; % Objective function
% Parameter optimization using WOA
[Best_score, Best_pos, Convergence_curve] = WOA(agent, iteration, lb, ub, dim, fobj);
% Train SVDD hypersphere using the optimal parameters
cmd = ['-s 5 -t 2 ', '-c ', num2str(Best_pos(1,1)), ' -g ', ...
num2str(Best_pos(1,2)), ' -q'];
model = libsvmtrain(trainlabel, traindata, cmd);
% Test
[predictlabel, accuracy, ~] = libsvmpredict(testlabel, testdata, model);
% Visualize the results
plotResult(testlabel,predictlabel)
figure
plot(Convergence_curve);