Questions tagged [particle-swarm]

In computer science, particle swarm optimization (PSO) is a computational method that optimizes a problem by iteratively trying to improve a candidate solution with regard to a given measure of quality.

In computer science, particle swarm optimization (PSO) is a computational method that optimizes a problem by iteratively trying to improve a candidate solution with regard to a given measure of quality.

Algorithm:

Initialize all agents;
while (not maximum iterations nor minimum error )
{
    foreach(agent in agents) 
     {
        Calculate function value at agent position;
        If (value < best_value_in_history)
            best_value_in_history= value;
    }

    current_best_value= calculate best value of all current agents positions;

    foreach(agent in agents)
    { 
         agent current_velocity =
             w * current_velocity + 
             p * random_double() * (current_best_value.position - current_position) + 
             g * random_double * (best_value_in_history.position - current_position);
         update_agent_position(current_velocity);
    }

}

where w,p,g are selected by the practitioner and control the behaviour and efficacy of the PSO method.

Third party implementations:

  • RRSI is a C# project to simulate particle swarm optimization on communicating robots.
  • SwarmOps C# and ANSI C codes for several optimization methods, including a few global best PSO variants.
  • Java Based PSO Framework part of the open-source project CIlib (Computational Intelligence Library).
  • PSO visualisation applet randomly generated particle swarm of 12 particles attempts to find the "global maximum" on the landscape.
175 questions
12
votes
1 answer

How to build hybrid model of RF(Random Forest) and PSO(Particle Swarm Optimizer) to find optimal discount of products?

I need to find optimal discount for each product (in e.g. A, B, C) so that I can maximize total sales. I have existing Random Forest models for each product that map discount and season to sales. How do I combine these models and feed them to an…
11
votes
1 answer

Implementation of Particle Swarm Optimization Algorithm in R

I'm checking a simple moving average crossing strategy in R. Instead of running a huge simulation over the 2 dimenional parameter space (length of short term moving average, length of long term moving average), I'd like to implement the Particle…
Eva
  • 917
  • 4
  • 18
  • 23
7
votes
1 answer

Neural Network training using PSO in R

I need to train a neural network using PSO algorithm in R enviroment. I already know all the R packages about neural networks ( neuralnet, AMORE, etc. ), but no one of these includes PSO training ( only backpropagation ). Ideas? Thanks for the help.
6
votes
1 answer

Conceptual issues on training neural network wih particle swarm optimization

I have a 4 Input and 3 Output Neural network trained by particle swarm optimization (PSO) with Mean square error (MSE) as the fitness function using the IRIS Database provided by MATLAB. The fitness function is evaluated 50 times. The experiment is…
SKM
  • 959
  • 2
  • 19
  • 45
6
votes
2 answers

My Particle Swarm Optimization code generates different answers in C++ and MATLAB

I have written a global version of Particle Swarm Optimization algorithm in C++. I tried to write it exactly as same as my MATLAB PSO code that have written before, but this code generates different and so worst answers. The MATLAB code is: clear…
Hamed
  • 202
  • 1
  • 4
  • 10
5
votes
1 answer

Why my code in Julia is getting slower for higher iteration?

I wrote a main function which uses a stochastic optimization algorithm (Particle Swarm Optimization) to found optimal solution for a ODE system. I would run 50 times to make sure the optimal can be found. At first, it operates normally, but now I…
Wang
  • 105
  • 5
5
votes
1 answer

Use multiple training methods to train a ANN with Encog

I would like to know if training a feed forward neural network with Genetic Algorithms, Particle Swarm Optimization and Simulated Annealing before using resilient propagation training does improve the result. Here is the code I am using: …
4
votes
2 answers

Simple 1-D particle swarm optimization algorithm for a noisy environment

I'm experimenting with particle swarm optimisation and am trying to determine the best approach for the following simple scenario: Optimizing a 1-dimensional function (i.e. particles are moving along a single line) The function to be optimised can…
mikera
  • 105,238
  • 25
  • 256
  • 415
3
votes
2 answers

Dimension in particle swarm optimization algorithm

In particle swarm optimization algorithm, what is the dimension exactly mean. Is it the number of particles (population size) in the search space? or it is the coordinates of each particle?
shdotcom
  • 125
  • 1
  • 1
  • 11
3
votes
2 answers

Is this java project idea practical? (Thread scheduler and Particle Swarm Optimization)

On a multicore box, the java thread schedulers decisions are rather arbitrary, it assigns thread priorities based on when the thread was created, from which thread it was created etc. The idea is to run a tuning process using pso that would randomly…
MEURSAULT
  • 8,307
  • 4
  • 24
  • 23
3
votes
2 answers

Quantum PSO and Charged PSO (PSO = Particle Swarm Optimizer)

I need to implement PSO's (namely charged and quantum PSO's). My questions are these: What Velocity Update strategy do each PSO's use (Synchronous or Asynchronous particle update) What social networking topology does each of the PSO's use (Von…
Buhake Sindi
  • 87,898
  • 29
  • 167
  • 228
3
votes
1 answer

Particle Swarm Optimization in C++

I need to implement the PSO algorithm in C++. Is there any C++ library I can use to start with?
Bob
  • 10,741
  • 27
  • 89
  • 143
2
votes
1 answer

How to choose Xmax,min (range of weights) for a PSO-trained MLP Neural Network?

I'm training a MLP Neural Network using Particle Swarm Optimization for classification using datasets from UCI. I'm using PyBrain to construct NNs and my custom code to train the network. My question is, how do I choose the Xmax, Xmin parameter for…
sham
  • 33
  • 4
2
votes
2 answers

Combinatorial optimization with discrete options in R

I have a function with five variables that I want to maximize using only an specific set of parameters for each variable. Are there any methods in R that can do this, other than by brutal force? (e.g. Particle Swarm Optimization, Genetic Algorithm,…
2
votes
0 answers

I keep getting the error "Index exceeds array bounds"

there are some issues, my input is 30*27 and output is 1*30 but this code is making some issue. keep getting the error Index exceeds array bounds from the matlab own code file, input matrix is 27x30 double % INITIALIZE THE NEURAL NETWORK…
1
2 3
11 12