您现在的位置:首页 >> 智能优化 >> 内容

基于WOA优化的svm最优参数计算仿真

时间:2022/12/24 15:56:19 点击:

  核心提示:A142包括程序操作录像...

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);

A142

作者:我爱C编程 来源:我爱C编程
本站最新成功开发工程项目案例
相关评论
发表我的评论
  • 大名:
  • 内容:
本类固顶
  • 没有
  • FPGA/MATLAB商业/科研类项目合作(www.store718.com) © 2025 版权所有 All Rights Reserved.
  • Email:1480526168@qq.com 站长QQ: 1480526168