Giter Site home page Giter Site logo

porgo's Introduction

porgo

When I was researching a function without given all local minima, like the underlined function:

$$ f(x)=\sum_{i=1}^{n/2}(-13+x_{2i-1}+((5-x_{2i})x_{2i}-2)x_{2i})^2+(-29+x_{2i-1}+((x_{2i}+1)x_{2i}-14)x_{2i})^2. $$

I used optimtool.unconstrain to search local minima, got an efficient experience about searching the nearest minimum point. Add a mechanism to jump out of the local area would increase the runtime of the whole script, so porgo is a new progam to accelerate to search global minima.

refer to test.py and the global minima of 4-dimensional $f(x)$ is (5, 4, 5, 4).

glos

glos is the main runtime to serve as a global search class, users can run train_gen module with given cycles at any times until the function searching process converged.

init:

  • objective_function: Callable, a high-dimensional function with convex, non-convex, and many local minima.
  • bounds: List[List[float]] | List[Tuple[float]], changes this value makes a significant influence of mini and fit_mini.
  • mutation: float=0.5, increase this value makes the search radius larger.
  • recombination: float=0.9, increase this value allows larger number of mutation.

rand_pop:

  • population_size: int=50, randomly init the population (or called initial points) with shape at (population, dimension).
  • verbose: bool=False, whether to output initial population when manually replace the random generated rule.

train_gen:

  • cycles: int=1000, try to run several times (until converged) when give a smaller cycle number if search bounds is in large space.

result:

  • verbose: bool=False, whether to output console information after search populations were updated (check self.mini and self.fit_mini, the top3 updated results are (self.mini, self.fit_mini) < (self.medi, self.fit_medi) < (self.maxi, self.fit_maxi)).

reference

Storn, R and Price, K, Differential Evolution - a Simple and Efficient Heuristic for Global Optimization over Continuous Spaces, Journal of Global Optimization, 1997, 11, 341 - 359.

LICENSE

MIT LICENSE

porgo's People

Contributors

linjing-lab avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.