Github 项目推荐 | 用于 C/C++、Java、Matlab/Octave 的特征选择工具箱

时间:2022-05-04
本文章向大家介绍Github 项目推荐 | 用于 C/C++、Java、Matlab/Octave 的特征选择工具箱,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

FEAST 是用于 C/C++、Java、Matlab/Octave 的特征选择工具集合,它提供了基于滤波器特征选择算法的常用互信息的实现以及 RELIEF 的实现。所有函数都需要离散输入(RELIEF 除外,它不依赖于 MIToolbox),它们返回选定的特征索引。

Github:https://github.com/Craigacp/FEAST

该项目是为了帮助研究这些算法的相关性而开发的,其结果已经发布在下述的论文中:

Conditional Likelihood Maximisation: A Unifying Framework for Information Theoretic Feature Selection
 G. Brown, A. Pocock, M.-J. Zhao, M. Lujan
 Journal of Machine Learning Research, 13:27-66 (2012)

加权特征选择算法描述如下:

Information Theoretic Feature Selection for Cost-Sensitive Problems
 A. Pocock, N. Edakunni, M.-J. Zhao, M. Lujan, G. Brown.
 ArXiv

如果有开发者或者学者需要 FEAST 中的实现做研究,请引用上述的论文。所有的 FEAST 代码都是根据 BSD 3-Clause 许可证授权的。

包含以下实现:mim,mrmr,mifs,cmim,jmi,disr,cife,icap,condred,cmi,relief,fcbf,betagamma

加权实现:mim,cmim,jmi,disr,cmi

FEAST 适用于离散输入,所以在使用 FEAST 之前,所有连续值应该离散化。作者在实验中发现,用 10 个宽度相同的二进制文件(bins)能够适用很多问题,尽管这个跟数据集的大小有关。当 FEAST 使用连续的数据时,会生成不可靠的结果,运行速度也会变慢,内存使用量也会增加很多。

MATLAB 示例(使用「data」作为我们的特征矩阵,「label」作为类标签向量):

>> size(data)
ans = 
     (569,30)                                     %% denoting 569 examples, and 30 features
>> selectedIndices = feast('jmi',5,data,labels) %% selecting the top 5 features using the jmi algorithm
selectedIndices =

    28
    21
     8
    27
    23
>> selectedIndices = feast('mrmr',10,data,labels) %% selecting the top 10 features using the mrmr algorithm
selectedIndices =

    28
    24
    22
     8
    27
    21
    29
     4
     7
    25
>> selectedIndices = feast('mifs',5,data,labels,0.7) %% selecting the top 5 features using the mifs algorithm with beta = 0.7
selectedIndices =

    28
    24
    22
    20
    29