Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问, def getOne(self): (选择一个个体)函数抛出错误raise Exception("选择错误", self.bounds) #6

Open
JustAHB opened this issue Nov 11, 2021 · 2 comments

Comments

@JustAHB
Copy link

JustAHB commented Nov 11, 2021

作者您好,我是机器学习初学者,目前在做特征选择看到您的代码,遗传算法代码了解不多
运行时候出现:
Exception: ('选择错误', -0.006116157324444815)
您在使用手册时候说这个地方要修改
Genetic_algorithm.py众初始化种群initPopulation那里也要做相应修改
不知道如何修改这个部分
我的QQ:916087344

@rogeroyer
Copy link
Owner

默认所有个体的适应度都是大于0的,所以self.bounds(所有个体适应度之和)也大于0。

@JustAHB
Copy link
Author

JustAHB commented Nov 12, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants