ZongSingHuang / Binary-Whale-Optimization-Algorithm

Tawhid, M.A., Ibrahim, A.M. Feature selection based on rough set approach, wrapper approach, and binary whale optimization algorithm. Int. J. Mach. Learn. & Cyber. 11, 573–602 (2020). https://doi.org/10.1007/s13042-019-00996-5
MIT License
15 stars 4 forks source link

尊敬的作者您好 #3

Open loseyourself99 opened 3 years ago

loseyourself99 commented 3 years ago

尊敬的作者,您好。我是一名从事特征选择相关研究的新手,最近在学习您的代码,有几点疑惑的地方,例如我没有找到如何去print适应度函数的值的代码,以及已经选择特征数量的代码,您可以帮我指出具体是哪一句代码吗?

ZongSingHuang commented 3 years ago

main_5050.py和main_9010.py本質是相同的

這是被選到的特徵 image

這是計算適應值 image

loseyourself99 commented 3 years ago

main_5050.py和main_9010.py本質是相同的

這是被選到的特徵 image

這是計算適應值 image

谢谢您百忙之中的回复。确实,我也发现了这一点,就是我想请教一下您,如何在运行程序的时候能否用print的方式观察到每次训练的适应度值,以及选择到的特征的个数呢?

ZongSingHuang commented 3 years ago

image

在BWOA.py的49行加入面兩行,注意別加到45行if裡面 print(self.gBest_X) print(self.gBest_score)

loseyourself99 commented 3 years ago

image

在BWOA.py的49行加入面兩行,注意別加到45行if裡面 print(self.gBest_X) print(self.gBest_score) 好的,谢谢。