• 分类预测 | Matlab实现BES-ELM秃鹰搜索算法优化极限学习机分类预测


    分类预测 | Matlab实现BES-ELM秃鹰搜索算法优化极限学习机分类预测

    分类效果

    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

    基本描述

    Matlab实现BES-ELM秃鹰搜索算法优化极限学习机分类预测(完整源码和数据)
    1.自带数据为excel数据,多输入,单输出,多分类。
    2.直接替换数据即可使用,保证程序可正常运行。
    3.程序语言为matlab,程序可出分类效果图,混淆矩阵图
    4.注意程序和数据放在一个文件夹。

    程序设计

    function [BestSol Convergence_curve timep]=BES(nPop,MaxIt,low,high,dim,fobj)
    %nPop: size of population 
    %MaxIt:number of iterations 
    %low, high : space of Decision variables
    %dim : number of Decision variables
    %fobj : funcation 
     % paper citation : Alsattar, H. A., Zaidan, A. A., & Zaidan, B. B. (2020). Novel meta-heuristic bald eagle search optimisation algorithm. Artificial Intelligence Review, 53(3), 2237-2264.?
    st=cputime;
    % Initialize Best Solution
    BestSol.cost = inf;
    for i=1:nPop
        pop.pos(i,:) = low+(high-low).*rand(1,dim);
         pop.cost(i)=fobj(pop.pos(i,:));
        if pop.cost(i) < BestSol.cost
            BestSol.pos = pop.pos(i,:);
            BestSol.cost = pop.cost(i);
        end
    end
     disp(num2str([0 BestSol.cost]))
    for t=1:MaxIt
        %%               1- select_space 
        [pop BestSol s1(t)]=select_space(fobj,pop,nPop,BestSol,low,high,dim);
        %%                2- search in space
        [pop BestSol s2(t)]=search_space(fobj,pop,BestSol,nPop,low,high);
        %%                3- swoop
      [pop BestSol s3(t)]=swoop(fobj,pop,BestSol,nPop,low,high);
            Convergence_curve(t)=BestSol.cost;
            disp(num2str([t BestSol.cost]))
        ed=cputime;
        timep=ed-st;
    end
    function [pop BestSol s1]=select_space(fobj,pop,npop,BestSol,low,high,dim)
    Mean=mean(pop.pos);
    % Empty Structure for Individuals
    empty_individual.pos = [];
    empty_individual.cost = [];
    lm= 2;
    s1=0;
    for i=1:npop
        newsol=empty_individual;
        newsol.pos= BestSol.pos+ lm*rand(1,dim).*(Mean - pop.pos(i,:));
        newsol.pos = max(newsol.pos, low);
        newsol.pos = min(newsol.pos, high);
        newsol.cost=fobj(newsol.pos);
        if newsol.cost<pop.cost(i)
           pop.pos(i,:) = newsol.pos;
           pop.cost(i)= newsol.cost;
           s1=s1+1;
             if pop.cost(i) < BestSol.cost
              BestSol.pos= pop.pos(i,:);
             BestSol.cost=pop.cost(i); 
             end
        end
    end
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54

    参考资料

    [1] https://blog.csdn.net/kjm13182345320/article/details/129036772?spm=1001.2014.3001.5502
    [2] https://blog.csdn.net/kjm13182345320/article/details/128690229

  • 相关阅读:
    猿创征文| 六款我的开发者宝藏工具箱
    LeetCode-946-验证栈序列
    Unity的WebGL平台动态加载glb/gltf测试
    卷积神经网络 - 汇聚层
    C++官网 Information Description of the C++ language
    金属制品行业B2B交易管理系统:充分整合行业资源,助力企业开拓市场营销渠道
    Groovy系列一 Groovy基础语法
    openharmony容器组件之Refresh
    消息中间件概述
    kafka与hbase的区别
  • 原文地址:https://blog.csdn.net/kjm13182345320/article/details/133396951