-
Notifications
You must be signed in to change notification settings - Fork 0
Assignment 2 Particle Swarm Optimization
shanmuga sudan edited this page Aug 2, 2017
·
1 revision
Welcome to Shanmuga's Wiki Page
Algorithms & Data Structures - Particle swarm optimization
Objective: To devise a supervised Learning Model that would aid in Pattern Classifications and Hyper Text Documents Classification generally used as Support Vector Machines
Steps involved in PSO:
- Initialize the swarm: We create a swarm of particles each representing a ArrayList of Characters in our case, along with velocity and fitness value.
- Initiate PSO: We start our algorithm with every object located at different positions at start time. As the time progresses, we update the position of particle by updating the velocity of each particle. Velocity of each particle is updated by identifying the global best location, current location of the particle.
- Terminate PSO: Once a particle reaches the desired position as marked in the beginning the PSO algorithm is terminated. In our case, we utilize the pattern target as the desired output.
Working:
- We initialize the particle with an ArrayList of characters. We compare the characters to our desired output and make the minimum updates to the characters so that we get the desired output.
- We use Liechtenstein Distance as a function to compute the distance between two strings (desired and actual) to figure out the perfect solution.
PSO Parameters:
- Target – Desired ArrayList of characters in the same order.
- Char Set- Input ArrayList consisting of Alphabets in English
- Epochs- Iterations that help determine the value at which a particle of PSO arrived at solution.
- Swarm Size- Maximum Number of Particles involved in the process
- Velocity Minimum – Minimum Velocity at which a particle travels in our space towards the output
- Velocity Maximum- Maximum Velocity at which the particle can travel towards the target
- Minimum Length – Least number of characters from Char set considered for a particle operation
- Maximum Length – Maximum number of characters from Char set that can be used by particle during the process.
JFree chart: I plot the JFree chart of Epoch (The number of iterations ) vs PBest value( local best of particle at that time) to derive the results.
PSO Flow Chart:
PSO Chart:
PSO Sample Output: