Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 to classify features. I have a few doubts

(1) Does the PSO iterations/generations = number of times the fitness function is evaluated?

(2) In many papersTraining Curve I have seen the training curve of MSE vs generations being plot. In the picture, the graph (a) on left side is a model similar to NN. It is a 4 input-0 hidden layer-3 output cognitive map. And graph (b) is a NN trained by the same PSO. The purpose of this paper was to show the effectiveness of the new model in (a) over NN.

But they mention that the experiment is conducted say Cycles = 100 times with Generations =300. In that case, the Training curve for (a) and (b) should have been MSE vs Cycles and not MSE vs PSO generations ? For ex, Cycle1 : PSO iteration 1-50 --> Result(Weights_1,Bias_1, MSE_1, Classification Rate_1). Cycle2: PSO iteration 1- 50 -->Result(Weights_2,Bias_2, MSE_2, Classification Rate_2) and so on for 100 Cycles. How come the X axis in (a),(b) is different and what do they mean?

(3) Lastly, for every independent run of the program (Running the m file several times independently, through the console) , I never get the same classification rate (CR) or the same set of weights. Concretely, when I first run the program I get W (Weights) values and CR =100%. When I again run the Matlab code program, I may get CR = 50% and another set of weights!! As shown below for an example,

%Run1 (PSO generaions 1-50) 
>>PSO_NN.m

Correlation =

     0

Classification rate = 25



FinalWeightsBias =

   -0.1156    0.2487    2.2868    0.4460    0.3013    2.5761

%Run2 (PSO generaions 1-50) 
>>PSO_NN.m
Correlation =

     1

Classification rate = 100

%Run3 (PSO generaions 1-50) 
>>PSO_NN.m
Correlation =

   -0.1260

Classification rate = 37.5

    FinalWeightsBias =

   -0.1726    0.3468    0.6298   -0.0373    0.2954   -0.3254

What should be the correct method? So, which weight set should I finally take and how do I say that the network has been trained? I am aware that evolutionary algorithms due to their randomness will never give the same answer, but then how do I ensure that the network has been trained? Shall be obliged for clarification.

like image 746
SKM Avatar asked Apr 10 '14 01:04

SKM


People also ask

What is particle swarm optimization neural network?

The goal is to find a position/weights so that the network generates computed outputs that match the outputs of the training data. PSO uses a collection of particles and is an iterative process. In each iteration, every particle moves to a new position which, hopefully, represents a better problem solution.

What is Particle Swarm Optimization in Artificial Intelligence?

Particle swarm optimization (PSO) is an artificial intelligence (AI) technique that can be used to find approximate solutions to extremely difficult or impossible numeric maximization and minimization problems.


1 Answers

  1. As in most machine learning methods, the number of iterations in PSO is the number of times the solution is updated. In the case of PSO, this is the number of update rounds over all particles. The cost function here is evaluated after every particle is updated, so more than the number of iterations. Approximately, (# cost function calls) = (# iterations) * (# particles).
  2. The graphs here are comparing different classifiers, fuzzy cognitive maps for graph (a) and a neural network for graph (b). So the X-axis displays the relevant measures of learning iterations for each.
  3. Every time you run your NN you initialize it with different random values, so the results are never the same. The fact that the results vary greatly from one run to the next means you have a convergence problem. The first thing to do in this case is to try running more iterations. In general convergence is a rather complicated issue and the solutions vary greatly with applications (and read carefully through the answer and comments Isaac gave you on your other question). If your problem persists after increasing the number of iterations, you can post it as a new question, providing a sample of your data and the actual code you use to construct and train the network.
like image 145
buzjwa Avatar answered Nov 15 '22 09:11

buzjwa