python - Scikit-feature CFS 在 python 上崩溃
问题描述
我正在尝试在 python 中对我的数据框执行基于相关的特征选择(CFS)。我使用来自 scikit-feature 的 CFS:https ://github.com/jundongl/scikit-feature/blob/master/skfeature/function/statistical_based/CFS.py - 这是算法
我的数据集有100+ features
和2119 rows
。当我通过算法运行它时,它并没有结束。它最终崩溃了,我不知道为什么。
我通过同一个存储库中的其他算法运行我的数据集,我没有问题。当我这样做时,我在 WEKA 中也没有问题。
这是我的代码:
self.dataset = pd.DataFrame(pd.read_csv(filenames[0], encoding = 'latin-1'))
self.X = self.dataset.iloc[:, :-1].values
self.y = self.dataset.iloc[:, -1].values
X_train, X_test, y_train, y_test = train_test_split(self.X, self.y, test_size=0.2,random_state=0)
score = CFS.cfs(X_train, y_train) # this doesn't end and eventually crashes
print(score)
关于为什么会发生这种情况以及如何解决这个问题的任何想法?
谢谢!
解决方案
推荐阅读
- javascript - 单击活动 div 外部以停用功能
- android - 如何动态设置工具栏的颜色
- php - 如何将数据从 android 应用程序发送到 Laravel 宅基地
- augmented-reality - 如何掩盖另一个透明物体后面的物体?
- php - Laravel 不在数据库中存储额外的会话属性
- python-3.x - 如何在 python 代码中创建源类型图像?
- excel - Excel 工作表中的 Word 文本框
- java - Hibernate : 将单个表的属性分组到一个子类中
- python - scipy.optimize.minimize 返回“ValueError:系列的真值不明确”
- laravel - Request::is() 带变量