Comments (2)
非常感谢。元宵节快乐~~
from gaft.
无论是多少参数,gaft的使用方式都是相同的,这边我写了两个例子分别是优化有一个参数和两个参数的目标函数,更多参数可以通过在定义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对适应度函数的值进行操作。
from gaft.
Related Issues (20)
- 多进程运行大量重复参数 HOT 2
- ImportError: cannot import name 'GAEngine' HOT 4
- 那个染色体的单词好像是chromosome HOT 2
- question: individual, binary_individual, decimal_individual HOT 2
- fitness函数没有并行 HOT 4
- sum_fit maybe is 0 that causes error:ZeroDivisionError: float division by zero HOT 3
- decimal_individual中decode问题
- How to initial population with a specified solution
- Come in and have a look! 作为一名老用户,中肯地对此框架作出一些评价,走过路过的也希望来看一下。 HOT 1
- 请问我该怎么添加等式约束 HOT 3
- Weight optimization in order to minimize correlation
- RouletteWheelSelection ZeroDivisionError
- gaft 是否已经不再维护? HOT 1
- 多进程运行时,请问如何仅仅让主程序执行一些log文件? HOT 1
- The mutation operator occurs only at level of bits
- 自定义Individual类
- 自定义个体的过程中,mutate需要重载怎么做
- Question in RouletteWheelSelection?
- Windows10无法识别mpirun HOT 1
- Question: Best fitness values are written to best_fit.py
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gaft.