duxuhao / Feature-Selection

Features selector based on the self selected-algorithm, loss function and validation method
https://pypi.org/project/MLFeatureSelection/
MIT License
672 stars 201 forks source link

win10正常运行,Ubuntu报错 #7

Closed InvictusY closed 6 years ago

InvictusY commented 6 years ago

Features Quantity Limit: inf Time Limit: inf min(s) Traceback (most recent call last): File "xulie.py", line 69, in main() File "xulie.py", line 66, in main sf.run(validation) File "/home/dc2-user/anaconda3/lib/python3.5/site-packages/MLFeatureSelection/FeatureSelection.py", line 470, in run columnname = self.ColumnName[:], AttributeError: 'Select' object has no attribute 'ColumnName' 请问这是怎么回事呢?

duxuhao commented 6 years ago

神奇,我一直都是在ubuntu下面搞的,问一下您跑sf.GenerateCol()了吗?你现在的版本号是多少?

InvictusY commented 6 years ago

我是跑的demo_IJCAI_2018.py 这个,把里面的数据集换成了我自己的,在win10下,可以正常跑,也可以出结果,但是放到云服务器上,就会报上面那个错,我没找到sf.GenerateCol()这个

InvictusY commented 6 years ago

对了ubuntu 是16.04

InvictusY commented 6 years ago

谢谢大神,已经解决了,可以正常运行了,但是我还有一个疑问,用代码选择出来的特征,然后放进原来的模型,损失怎么要比特征选择时显示的损失要高一些呢?

duxuhao commented 6 years ago

之前一直没看到😂,一般损失出来是一样的,可能会是sample设置不为1导致的?

duxuhao commented 6 years ago

谢谢你的提醒,是pandas.DataFrame.sample在设置的时候的原因,已经修复了。