ljvmiranda921/pyswarms: Minor Release (v0.2.0)
Authors/Creators
- 1. Waseda University
- 2. @pyupio
Description
- Added
pyswarms.backendmodule for custom swarm algorithms. Users can now use some primitives provided in this module to write their own optimzation loop, providing a more "white-box" approach in swarm intelligence. (#119) (PR #115) (PR #116) (PR #117) - Port all unit tests into pytest. We're now dropping the unittest module. Pytest's parameterized tests enables our test cases to scale much better. (PR #114)
- Drop Python 2.7 support. Given the imminent end-of-life of Python 2, we'll be fully-supporting Python 3.4 and above. (#113)
- Port PSO algorithms to the new PySwarms backend (PR #115)
- Updated documentation in ReadTheDocs and new Jupyter notebook example (PR #124)
The new backend module exposes some swarm optimization primitives so that users can create their custom swarm implementations without relying too much from our base classes. There are two main components for backend, the Swarm class and the Topology base class. Using these classes, you can construct your own optimization loop like the one below:
This class acts as a data class that holds all necessary attributes in a given swarm. The idea is to continually update the attributes located there. You can easily initialize this class by providing the initial position and velocity matrices.
The Topology classThe topology class abstracts away common operations in swarm optimization: (1) determining the best particle in the swarm, (2) computing the next position, and (3) computing the velocity matrix. As of now, we only have the Ring and Star topologies implemented. Hopefully we can add more in the future.
Files
ljvmiranda921/pyswarms-v.0.2.0.zip
Files
(3.8 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:c1d73aad2f064d24c720782cfcbdceac
|
3.8 MB | Preview Download |
Additional details
Related works
- Is supplement to
- https://github.com/ljvmiranda921/pyswarms/tree/v.0.2.0 (URL)