We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
how to optimize multi-parameters by using your library? just like parameters in pid:(kp,ki,kd)
The text was updated successfully, but these errors were encountered:
无论是多少参数,gaft的使用方式都是相同的,这边我写了两个例子分别是优化有一个参数和两个参数的目标函数,更多参数可以通过在定义Individual的时候的给ranges再添加一个元素就好了,例如:
Individual
ranges
indv_template = BinaryIndividual(ranges=[(-2, 2), (-10, 2), (-10, 10)], eps=0.001) population = Population(indv_template=indv_template, size=50).init()
这样你就创建了含有三个变量的大小为50的种群
剩下的就可以通过定义你自己的适应度函数就好了,注意适应度函数需要返回一个float类型的返回值,方便gaft对适应度函数的值进行操作。
float
Sorry, something went wrong.
非常感谢。元宵节快乐~~
No branches or pull requests
how to optimize multi-parameters by using your library?
just like parameters in pid:(kp,ki,kd)
The text was updated successfully, but these errors were encountered: