【监督学习】基于合取子句进化算法(CCEA)和析取范式进化算法(DNFEA)解决分类问题(Matlab代码实现)

news/2025/2/12 8:00:00/

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

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

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

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

目录

💥1 概述

📚2 运行结果

🎉3 参考文献

🌈4 Matlab代码实现


💥1 概述

我们开发了两种进化算法,即合取子句进化算法(CCEA)和析取范式进化算法(DNFEA),旨在探索与真实世界数据中的复杂交互相关的因果关系。这些算法可以应用于监督学习任务,帮助我们发现与特定目标结果(比如疾病)相关的复杂多变量关系。在不同类型的数据集中,包括带有噪声、缺失数据和多种数据类型(连续、有序和标称)的情况下,CCEA能够寻找特征(上位)之间的交互。为了防止过拟合特征交互,CCEA还利用特征敏感度函数来辅助筛选。而DNFEA主要用于在CCEA的基础上寻找更强相关性的异构组合,这些组合能够比任何单个连接子句更好地预测输出类别。CCEA和DNFEA都使用超几何概率质量函数作为适应度函数来评估。

总的来说,我们提出了一种新的进化算法,旨在从批量数据中发现复杂分类问题的因果关系规则。这种方法的关键特点包括:(a)使用超几何概率质量函数作为评估适应度的统计指标,以量化临时关联结果与目标类之间的偶然性概率,同时考虑数据集大小、缺失数据和结果类别的分布情况;(b)采用串联年龄分层进化算法,演化出连接子句的简约档案以及这些连接子句的析取,使得每个连接子句都与结果类之间具有概率显著关联;(c)使用单独的档案箱来存储不同顺序的子句,并具有动态调整的顺序特定阈值。我们通过在多个基准问题上的实验验证了该方法的有效性,这些问题包括具有异质性、上位性、重叠、类别关联噪声、缺失数据、无关特征和类别不平衡等各种组合。此外,我们还在更真实的合成基因组数据集上进行了验证,该数据集具有异质性、上位性、外源特征和噪声。在所有合成上位基准问题中,我们始终能够准确恢复出用于生成数据的真实因果关系规则集。最后,我们还讨论了将这种方法应用于真实世界调查数据集的潜在应用,该数据集旨在提供有关恰加斯病可能的生态健康干预措施的信息。

📚2 运行结果

部分代码:

% set the number of address bits for the majority-on problem 
NumFeat=5; % set the number of observations
NumObs=1250;% Now create the majority on dataset
Data=(rand(NumObs,NumFeat)<0.5)+0;
% Determine output
Output=(sum(Data,2)>NumFeat/2)+0;% There are three data types that can be input into the CCEA
% 1) continuous or ordinal data (ContData)
% 2) nominal data (Cat
% 3) binary data or any feature where the user only wants one value
% assigned to a feature in a conjunctive clause
% For each data type list the corresponding columns in the Data matrix that
% correspond to the data type of the feature (i.e., if the data in columns
% 1 and 3 are ordinal or continuous then ConOrdData=[1 3]).;
ContOrdData=[]; % To be used for ordinal or continuous features
NomData=[]; % To be used for nominal features
BinData=1:NumFeat; % To be used for binary features or any feature where % the user only wants one value associated with the% conjunctive clause.% Set the target class
TargetClass=Output==1;% In this case only data with an output of 1 will be% analyzed% Run my algorithm convert the data to binary
[DataBin, Param, DataSum]=Data2BinaryTarget(Data, Output, ...ContOrdData, NomData, BinData, TargetClass);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
% Set the CCEA parameters
% The below settings are appropriate but not necessarily optimal for the
% 6-bit multiplexer dataset. The user can play with the parameter settings
% to find the best combination for a given dataset.
% Note: there are numerous input parameters for the CCEA. The idea is to
% give the user control over the optimal way to search a dataset. For 
% instance, Datasets with binary features may require fewer age layers and 
% fewer generations between novel generations; while datasets with 
% continuous or ordinal features may require more age layers and more 
% generations between novel generations.
Param.NumNewPop=NumFeat; % The # of new offspring created every Param.GENn
Param.TotGens=30; % Total # generations to run the CCEA
% Param.FeatLabels=[]; % The feature labels (not needed for CCEA but % necessary for understanding the features)
Param.BestFit=false(); % Will record the best hypergeometric fitness for % each CC order each generation
Param.ALna=5; % The # of layers that are not archived % (helps maintain diversity)
Param.GENn=3; % The # of generations until a new population of offspring % are created.
Param.NonArchLMax=Param.NumNewPop*1;% Max population per non-archive layer
Param.ArchOff=Param.NonArchLMax*Param.ALna; %The max # of Archive offspring %created each generation 
Param.Px=0.5; % Probability of crossover
Param.Pwc=0.75; % probability that feature selected for mutation will be % removed from the conjunctive clause
Param.Pm=1/NumFeat; % probability that a feature will be selected for % mutation. Only if the parent is selected for mutation% instead of crossover.
Param.TournSize=3; % # of parents with replacement that are in the % tournament to mate with the parent. Only most fit will % mate.

% set the number of address bits for the majority-on problem 
NumFeat=5; 

% set the number of observations
NumObs=1250;

% Now create the majority on dataset
Data=(rand(NumObs,NumFeat)<0.5)+0;
% Determine output
Output=(sum(Data,2)>NumFeat/2)+0;

% There are three data types that can be input into the CCEA
% 1) continuous or ordinal data (ContData)
% 2) nominal data (Cat
% 3) binary data or any feature where the user only wants one value
% assigned to a feature in a conjunctive clause
% For each data type list the corresponding columns in the Data matrix that
% correspond to the data type of the feature (i.e., if the data in columns
% 1 and 3 are ordinal or continuous then ConOrdData=[1 3]).;
ContOrdData=[]; % To be used for ordinal or continuous features
NomData=[]; % To be used for nominal features
BinData=1:NumFeat; % To be used for binary features or any feature where 
                   % the user only wants one value associated with the
                   % conjunctive clause.

% Set the target class
TargetClass=Output==1;% In this case only data with an output of 1 will be
                      % analyzed

% Run my algorithm convert the data to binary
[DataBin, Param, DataSum]=Data2BinaryTarget(Data, Output, ...
                               ContOrdData, NomData, BinData, TargetClass);
                           
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
% Set the CCEA parameters
% The below settings are appropriate but not necessarily optimal for the
% 6-bit multiplexer dataset. The user can play with the parameter settings
% to find the best combination for a given dataset.
% Note: there are numerous input parameters for the CCEA. The idea is to
% give the user control over the optimal way to search a dataset. For 
% instance, Datasets with binary features may require fewer age layers and 
% fewer generations between novel generations; while datasets with 
% continuous or ordinal features may require more age layers and more 
% generations between novel generations.
Param.NumNewPop=NumFeat; % The # of new offspring created every Param.GENn
Param.TotGens=30; % Total # generations to run the CCEA
% Param.FeatLabels=[]; % The feature labels (not needed for CCEA but 
                       % necessary for understanding the features)
Param.BestFit=false(); % Will record the best hypergeometric fitness for 
                       % each CC order each generation
Param.ALna=5; % The # of layers that are not archived 
              % (helps maintain diversity)
Param.GENn=3; % The # of generations until a new population of offspring 
              % are created.
Param.NonArchLMax=Param.NumNewPop*1;% Max population per non-archive layer
Param.ArchOff=Param.NonArchLMax*Param.ALna; %The max # of Archive offspring 
                                            %created each generation 
Param.Px=0.5; % Probability of crossover
Param.Pwc=0.75; % probability that feature selected for mutation will be 
                % removed from the conjunctive clause
Param.Pm=1/NumFeat; % probability that a feature will be selected for 
                    % mutation. Only if the parent is selected for mutation
                    % instead of crossover.
Param.TournSize=3; % # of parents with replacement that are in the 
                   % tournament to mate with the parent. Only most fit will 
                   % mate.

🎉3 参考文献

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

[1]古华茂,石锦芹,高济.基于子句的ALCN语言tableau算法增强方式[J].东南大学学报(英文版), 2008.DOI:JournalArticle/5af28551c095d718d8f5e7c5.

[2]姚明臣.机器学习和神经网络学习中的若干问题研究[D].大连理工大学,2016.

🌈4 Matlab代码实现


http://www.ppmy.cn/news/1156985.html

相关文章

小程序入门及案例展示

目录 一、小程序简介 1.1 为什么要使用小程序 1.2 小程序可以干什么 二、前期准备 2.1 申请账号 2.2 开发工具下载与安装 三、电商案例演示 四、入门案例 4.1 项目结构解析 4.2 基础操作及语法 4.3 模拟器 4.4 案例演示 4.4.1 新建页面 4.4.2 头部样式设置 4.4.…

ant design pro v6如何引入第三方js?如腾讯地图等!

由于ant pro隐藏.html&#xff0c;需要通过他们约定的方式引入即可。 1.配置config文件 /config/config.tsheadScripts: [// 解决首次加载时白屏的问题{ src: /scripts/loading.js, async: true },{ src: "https://map.qq.com/api/gljs?v1.exp&keyOB4BZ-D4W3U-B7VV…

Bootstrap的警告框组件

可以利用类alert实现警告框组件。。 01-基本的警告框组件使用示例 示例代码如下&#xff1a; <!DOCTYPE html> <html> <head><meta charset"UTF-8"><title>警告框</title><meta name"viewport" content"wi…

城市综合管廊运维的系统集成方案

摘 要&#xff1a;从网络拓扑结构、开放式实时以太网协议、控制层系统配置方面介绍了综合管廊的系统网络架构设计&#xff0c;分析了无线网络特性&#xff0c;阐述了基于HTML5架构所能实现的功能的初步构想&#xff0c;以便于综合管廊运维人员巡检&#xff0c;确保管廊本体安全…

左值引用右值引用

文章目录 左值和右值什么是左值什么是右值左值引用与右值引用的比较左值引用总结右值引用的总结&#xff1a; 右值引用使用场景和意义左值引用的使用场景左值引用的短板 右值引用和移动语义解决上面的问题不仅仅有移动构造还有移动赋值 右值引用引用左值及其一些更深入的使用场…

【数据库——MySQL(实战项目1)】(3)图书借阅系统——存储函数

目录 1. 简述2. 功能代码2.1 创建存储函数&#xff0c;根据图书编号查借阅人姓名&#xff0c;并调用该函数查询‘ **小邓在森林** ’已借未还的图书情况&#xff1b;2.2 创建存储函数&#xff0c;计算某借阅人还能借阅的图书数目&#xff0c;学生限额 5 本&#xff0c;教师限额…

Zhong__Certbot简单使用

时间&#xff1a;2023.10.16 环境&#xff1a;Ubuntu 22系统云服务器/Nginx 目的&#xff1a;使用https方式访问网站 说明&#xff1a; 作者&#xff1a;Zhong Certbot网站&#xff1a;Certbot 假设我们的网站为 www.zhong.com 我们想要通过 https://www.zhong.com 网址…

StarRC:版本陈旧引发的多corner提取RC失败

我正在「拾陆楼」和朋友们讨论有趣的话题&#xff0c;你⼀起来吧&#xff1f; 拾陆楼知识星球入口 运行StarRC提取多corner RC时会遇到提取失败的情况&#xff0c;当分次提取各个corner RC时却成功了&#xff0c;这种时候优先考虑nxtgrd版本陈旧的情况。 debug方法也简单&…