Advertisement

Relief特征选择的Python版

阅读量:

前言:

撰写本文的初衷源于先前实验过程中对RELIEF特征选择方法的实际需求,然而在查找相关资源时,却发现难以找到适用于Python语言的实现版本,因此便临时编写了一个简易程序以满足需求。(此处仅涉及基础版RELIEF算法,适用于二分类问题)接下来将简要说明RELIEF的基本原理。

RELIEF特征选择方法

Take a data set with n instances of p features, belonging to two known classes. Within the data set, each feature should be scaled to the interval [0 1] (binary data should remain as 0 and 1). The algorithm will be repeated m times. Start with a p -long weight vector (W) of zeros.

At each iteration, take the feature vector (X) belonging to one random instance, and the feature vectors of the instance closest to X (by Eucli

全部评论 (0)

还没有任何评论哟~