寄生——捕食算法(PPA):一种新的特征选择方法(Matlab代码实现)

 💥💥💞💞欢迎来到本博客❤️❤️💥💥

🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。

⛳️座右铭:行百里者,半于九十。

📋📋📋本文目录如下:🎁🎁🎁

目录

 ⛳️赠与读者

💥1 概述

📚2 运行结果

🎉3 参考文献

🌈4 Matlab代码、文献下载


 ⛳️赠与读者

👨‍💻做科研,涉及到一个深在的思想系统,需要科研者逻辑缜密,踏实认真,但是不能只是努力,很多时候借力比努力更重要,然后还要有仰望星空的创新点和启发点。当哲学课上老师问你什么是科学,什么是电的时候,不要觉得这些问题搞笑。哲学是科学之母,哲学就是追究终极问题,寻找那些不言自明只有小孩子会问的但是你却回答不出来的问题。建议读者按目录次序逐一浏览,免得骤然跌入幽暗的迷宫找不到来时的路,它不足为你揭示全部问题的答案,但若能让人胸中升起一朵朵疑云,也未尝不会酿成晚霞斑斓的别一番景致,万一它居然给你带来了一场精神世界的苦雨,那就借机洗刷一下原来存放在那儿的“躺平”上的尘埃吧。

     或许,雨过云收,神驰的天地更清朗.......🔎🔎🔎

💥1 概述

文献来源:

摘要
最大化分类准确度和最小化所选特征的数量是使用特征选择克服维度灾难的两个主要不相容的目标。“分类精度在很大程度上取决于数据集中特征的性质,数据集中可能包含不相关或冗余的数据。特征选择的主要目的是消除这些类型的特征,以提高分类精度。”这项工作提出了一种新的元启发式优化方法,称为寄生捕食算法(PPA),它模仿了乌鸦-杜鹃-猫系统模型中捕食者(猫)、寄生虫(杜鹃)和宿主(乌鸦)之间的相互作用,以克服大数据的低收敛性和维度诅咒问题。所提出的混合框架结合了猫群优化(CSO)、布谷鸟搜索(CS)和乌鸦搜索算法(CSA)的相对优势,以获得一组组合特征,从而提高分类精度。筑巢、寄生和捕食阶段应该有助于在解决分类问题的背景下提高探索能力和平衡能力。此外,应用Levy飞行分布来帮助更好地实现传统CSA的多样性,并提高勘探能力。同时,利用有效的适应度函数,使所提出的基于PPA的特征选择器能够使用K-最近邻算法(KNN)获得一组组合特征。对提出的PPA和四种标准启发式搜索算法进行了研究,以评估所提出选项的有效性。此外,还部署了18个分类数据集来衡量其功效。研究结果强调,与其他启发式选项相比,所提出的算法在分类和降维性能方面既有效又具有竞争力。

📚2 运行结果

部分代码:

function [bestnest,fmin,Convergence_curve]=PPA(n,maxiter,ub,lb,d,fobj)

fitness=inf*ones(n,1);

if length(lb) < d
    lb=lb*ones(1,d);ub=ub*ones(1,d);
end
% Random initial solutions using Eq.(5)
nest =initialization(n,ub,lb);

[nest,fitness]=get_best_nest(fobj,nest,nest,fitness);

% Get the current best
[fitness,I]=sort(fitness);nest=nest(I,:);

fmin=fitness(1);  bestnest=nest(1,:);
Convergence_curve(1)=fmin;

wMax = 0.9;
wMin = 0.3;
w = linspace(wMax, wMin, maxiter);
Cats_v = 0.25 * nest; % Initial velocity of tracking mode cats


% Growth rate (Section 3.1.2.1,  Fig. 3)
[GrowthRateCrows,GrowthRateCats,GrowthRateCuckoos] =Growth_rate(n,maxiter);
% Starting iterations
for t=2:maxiter
    nCats=GrowthRateCats(t);%current no. of Cats
    nCrows=GrowthRateCrows(t);%current no. of Crows
    nCuckoos=GrowthRateCuckoos(t);%current no. of Cuckoos
    
    % __________________ Nesting Phase: Crows _____________________________
    % The current best group discover Crow's nest using Eqs.(6-9)
    new_Crows=get_Crows(nest(1:nCrows,:),lb,ub);
  
    %  _______________  crow-cuckoo subsystem: Parasitism phase   _________
    
    % Select parasitized nests based on their fitness 
    Rolette_index = RankingSelection(n, nCuckoos);
    parasitized_nests = nest(Rolette_index(1:nCuckoos),:);
    % Replace some Crow's eggs (host) by Cuckoo's eggs 
    % (the better nests the higher chance for parasitism)
    new_Cuckoos = get_Cuckoos(parasitized_nests,lb,ub,t,maxiter);
    
    %  _________________  crow╝t subsystem: Predation phase  ____________
    
    
    % Choosing non-parasitized nests, randomly
    non_parasitized_nests = randperm( n);
    
    % cuckoo chicks reveal repulsive compounds that repel cats.
    % Eliminate nests with high malodorous secretion that occupied by Cuckoos 
    non_parasitized_nests(Rolette_index(1:nCuckoos)) = []; % Fixing
    
    % Select nests with low malodorous secretion
    Cats_nests = nest(non_parasitized_nests( 1:nCats),:); % Choosing
    new_Cats_v = Cats_v(non_parasitized_nests( 1:nCats),:);
    
    % Cats track the nest with a low malodorous secretion
    [new_Cats, new_Cats_v] = ...
        get_Cats(new_Cats_v, Cats_nests, bestnest,t,maxiter, w(t),lb,ub);
    % update the velocities
    Cats_v(non_parasitized_nests( 1:nCats),:) = new_Cats_v;
    
     %  ___________________ Evaluation: ___________________________________
    
     % new system
     newnest = [new_Crows;new_Cuckoos;new_Cats];
     [nest,fitness] = get_best_nest(fobj,nest,newnest,fitness);
     
     % Find the best objective so far
     [fitness,I] = sort(fitness);
     nest = nest(I,:);
     fmin = fitness(1);
     bestnest = nest(1,:);
     Convergence_curve(t) = fmin;

    % Display the iteration and best optimum obtained so far
%     if mod(t,10)==0
%         display(['At iteration: ', num2str(t), ' Best fitness is: ', num2str(fmin)]);
%     end
    
end %% End of iterations

🎉3 参考文献

文章中一些内容引自网络,会注明出处或引用为参考文献,难免有未尽之处,如有不妥,请随时联系删除。

🌈4 Matlab代码、文献下载

资料获取,更多粉丝福利,MATLAB|Simulink|Python资源获取

                                                           在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值