This device is not compatible.
PROJECT
Use Particle Swarm Optimizer to Optimize a Non-convex Function
In this project, we will use the Particle Swarm Optimizer (PSO) to optimize a non-convex function. We will implement PSO from scratch and observe its performance on a non-convex function.
You will learn to:
Implement the Particle Swarm Optimizer algorithm using Python.
Use an optimization algorithm to find the global minima of a non-convex function.
Visualize the performance of Particle Swarm Optimizer.
Plot data using Python libraries.
Skills
Optimization
Data Plotting
Prerequisites
Basic knowledge of optimization
Experience with Python
Technologies
NumPy
Python
Matplotlib
Project Description
Particle Swarm Optimizer (PSO) is a type of
This algorithm is well-suited for optimizing a non-convex function that has multiple local minima. For such functions, local optimization algorithms like gradient descent optimizer will not perform very well as the optimal solution is highly dependent on the starting point.
In this project, we will implement PSO and apply it to a non-convex function.
Project Tasks
1
Implementing the Algorithm
Task 0: Introduction
Task 1: Import Libraries
Task 2: Create Data Arrays
Task 3: Instantiate the Agents and Their Personal Bests
Task 4: Instantiate the Velocities of the Agents
Task 5: Update the Global Best Agent
Task 6: Update the Positions of the Agents
Task 7: Update the Data Arrays
2
Applying PSO to the Non-convex Function
Task 8: Define the Cost Function
Task 9: Optimize the Cost Function
Task 10: Plot the Results
Task 11: Visualize the Swarm Motion
Congratulations!
Relevant Courses
Use the following content to review prerequisites or explore specific concepts in detail.