Social-Inspired API
API reference for the 4 classes of opt.social_inspired. This page is generated from the source; see the algorithm pages for formulations and references.
Imports
python
from opt.social_inspired import (
PoliticalOptimizer,
SoccerLeagueOptimizer,
SocialGroupOptimizer,
TeachingLearningOptimizer,
)1
2
3
4
5
6
2
3
4
5
6
Common interface
Every class takes the objective func, the search-space lower_bound, upper_bound and dim, usually max_iter and seed, and implements search() -> tuple[np.ndarray, float]. See AbstractOptimizer.
Classes
| Class | Algorithm | Additional parameters |
|---|---|---|
PoliticalOptimizer | Political Optimizer | num_parties=5 |
SoccerLeagueOptimizer | Soccer League Competition | num_teams=10 |
SocialGroupOptimizer | Social Group Optimization | c=0.2, track_convergence=False, early_stopping=False, tolerance=1e-06, patience=10, verbose=False |
TeachingLearningOptimizer | Teaching-Learning Based Optimization | - |