-
Notifications
You must be signed in to change notification settings - Fork 218
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
如何解决离散化处理 #10
Comments
你好,感谢对gaft的支持,其实是可以通过设置适当的精度和范围来进行离散化的变量的,例如取值范围 |
我说的离散变量其实不是这样的,虽然说以精度1.0以后来说,有0,1,2,3这些变量,但他其实还是属于连续的,离散的意思是比如[1,2,0,7,9]这样的序列,但是刚想明白了,可以用离散序列的index进行编码,然后再在适应度函数那里处理应该可以解决 |
嗯,你可以使用上面的方法。同时最近我在考虑给gaft的individual定义写个元类,这样就可以用户自定义了,写好了会进行更新。 |
大佬你好 我发现2D优化的时候 BinaryIndividual(ranges=[(0.0, 50.0), (0.0, 100.0)], eps=1.0) |
emmm,你可以去问大佬,,,我个人认为,你的参数里面都是小数,结果当然也会是小数,可能需要修改大佬的框架 @huoganji |
(先膜拜一下大佬)我看框架里面会根据取值范围和精确度确定基因长度,如果是离散的变量的话就不能这么做了,刚开始看还没看完框架,不知道是否可以有另一种方式,通过直接给出基因序列和长度来进行优化
The text was updated successfully, but these errors were encountered: