Comments (4)
In my opinion, you should define your library under classes. I just have look at L-shade method only. I think it would be easier to pass global variables to different methods and give more flexibility by creating possibility of adjusting inputs rather than using only your default parameters.
For adding extra fixed parameters, I think you should add more extra arbitrary positional inputs (e.g *arg
) to pyade.commons.apply_fitness
and to optimisation functions in methods (for L-SHADE it is apply
function).
from pyade.
Another question about DE: Why do you compare the population of current generation to 4 (for example:
in current_to_pbest_mutation: if len(population) < 4: return population
or in L-SHADE: # Adapt population size new_population_size = round((4 - init_size) / max_evals * num_evals + init_size)
Where does '4' stand for? I understand it should be the smallest possible size of current generation? but why it is 4?
from pyade.
Currently I don't have enought time to change the entire library to use classes.
Now you can use a new parameter called 'opts' that will be passed to the fitness function in which you can include whatever you. See the simple example at the end of README.md
You can change all of the parameters that the function apply gets by modifying the params dict. There may be some parameters fixed in the code by default to the values used by the author of each algorithm. If that's the case and you need access to some of them, open a new issue and I will work on that when possible.
4 is not the mimimum size of the current generation but the minimum size of a generation during the algorithm (reached at the end). That's because the current-to-pbest mutation, requires at least 4 individuals to work. See Eq. 10 on L-SHADE paper
Thanks for your feedback.
from pyade.
For those who would need to do such a thing: don't forget python's functools.
from functools import partial
def objective_function(x, param1, param2, param3):
pass
objective_function_cmplt = partial(objective_function, param1=..., param2=..., param3=...)
from pyade.
Related Issues (3)
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 pyade.