Particle Swarm Optimization in Python

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ม.ค. 2025

ความคิดเห็น • 102

  • @MOUNIAMADADI-z1r
    @MOUNIAMADADI-z1r 8 หลายเดือนก่อน +1

    Hi, thank you so much for this video. I was wondering if i can use the PSO algorithm to find the shortest path in a graph between two nodes ? if yes do you have any reference for it ?

  • @abderrahimzilali3293
    @abderrahimzilali3293 4 ปีที่แล้ว +1

    Thank you so much fellow, i just run into your channel and guess what! Incredible!!

  • @ammarshafie4860
    @ammarshafie4860 2 ปีที่แล้ว

    hi can i know what type of IDE that u use to run your program?

  • @RishiPratap-om6kg
    @RishiPratap-om6kg 2 ปีที่แล้ว

    have you worked on computation offloading using PSO

    • @SolvingOptimizationProblems
      @SolvingOptimizationProblems  2 ปีที่แล้ว

      I don't know the problems in your field. You may customize my code of PSO to solve the optimization problems in your fields. Good luck.

  • @soleneeba8906
    @soleneeba8906 2 ปีที่แล้ว

    Hello i was learning a article with a PSO-BP code for making prediction. But I want to understand the results. Can you please help?

  • @bagusaristya4510
    @bagusaristya4510 ปีที่แล้ว

    can the pso algorthm to search the best parameters of the cnn architecture for image classification? the objective is to maximize the accuracy of the model

  • @shahrulnizamibrahim6401
    @shahrulnizamibrahim6401 3 ปีที่แล้ว

    can i use this code to implement the appointment scheduling problem?

  • @RAZZKIRAN
    @RAZZKIRAN 3 ปีที่แล้ว

    can i use this algorithm for text classfication problem like spam or not spam ? Is it useful features optimization?

    • @SolvingOptimizationProblems
      @SolvingOptimizationProblems  3 ปีที่แล้ว

      Yes, it is possible but some customization is required.

    • @RAZZKIRAN
      @RAZZKIRAN 3 ปีที่แล้ว

      do one example video problem on text classification task for feature selection with PSO

    • @SolvingOptimizationProblems
      @SolvingOptimizationProblems  3 ปีที่แล้ว +1

      Hi, I don't have background on text classification. So, the only thing I can do is to advise you to customize my PSO to solve problems in your fields.

    • @RAZZKIRAN
      @RAZZKIRAN 3 ปีที่แล้ว

      @@SolvingOptimizationProblems what i have to do to solve my problem with pso?

    • @SolvingOptimizationProblems
      @SolvingOptimizationProblems  3 ปีที่แล้ว +1

      The fastest way is to study and understand the existing PSO code and then customize, change or update something to solve your problems. No need to build the PSO from scratch because it's very time consuming.

  • @samfred855
    @samfred855 2 ปีที่แล้ว

    hello sir,
    how can I adapt this PSO code for an open pit mine scheduling problem?

    • @SolvingOptimizationProblems
      @SolvingOptimizationProblems  2 ปีที่แล้ว

      Hello, I don't know that problem but the solving principle should be the same, we just we need objective function and constraints

  • @zombyzero
    @zombyzero 3 ปีที่แล้ว

    hi sir, do you have a pso code for solving cvrp? thanks

    • @SolvingOptimizationProblems
      @SolvingOptimizationProblems  3 ปีที่แล้ว

      Hello, I have PSO code for general problems but not for cvrp

    • @abdulsamad-lq9jt
      @abdulsamad-lq9jt 2 ปีที่แล้ว

      Hey did you get the PSO code for cvrp ? i need that too. Would be great if you can help

    • @zombyzero
      @zombyzero 2 ปีที่แล้ว

      @@abdulsamad-lq9jt i didn't find it till now, sorry. I was found the pso code in github but the programmer kinda modified it using mutant or something.

    • @abdulsamad-lq9jt
      @abdulsamad-lq9jt 2 ปีที่แล้ว

      @@zombyzero Ah :((( i wanted it for my FYP. Have to implement it, and it's heck of a job ;-; is there anything you can help with in terms of any CVRP algorithm that you implemented ?

    • @zombyzero
      @zombyzero 2 ปีที่แล้ว

      @@abdulsamad-lq9jt I was using Branch and Bound with python (found it in youtube as well) and Nearest Neighbor with Matlab (forgot where I found the code). I know nothing about coding, that's all I can help you with. good luck bro!

  • @yahiabousseloub9217
    @yahiabousseloub9217 2 ปีที่แล้ว

    Great work , thank you .
    The objectif function in this case just has one variable (xi) but Nv =2 ? I'm confused can you please explain

  • @zeidighalia1221
    @zeidighalia1221 3 ปีที่แล้ว

    Please can you tell me how can i use pso in community detection

  • @hestiretnosari8683
    @hestiretnosari8683 3 ปีที่แล้ว

    Sir, do you have code to solve kmeans using pso?

  • @ahmedkh3172
    @ahmedkh3172 2 ปีที่แล้ว

    May I know how get the equation please

  • @noadino
    @noadino 3 ปีที่แล้ว

    thanks for the tutorial but every time i run the code it give me this error "'Particle' object has no attribute 'update_velosity' " why?

  • @ruchirmehta
    @ruchirmehta 3 ปีที่แล้ว

    Sir, do you have code to solve TSP using PSO?

  • @haninfk9749
    @haninfk9749 4 ปีที่แล้ว

    if i want to implement the pso to chunking the dataset into multiple chunks could i do this ?

    • @SolvingOptimizationProblems
      @SolvingOptimizationProblems  4 ปีที่แล้ว

      Yes, it is possible to solve that problem using PSO.

    • @haninfk9749
      @haninfk9749 4 ปีที่แล้ว

      @@SolvingOptimizationProblems how could that done ? By passing the dataset to the fitness function or how? Would you tell me please

    • @SolvingOptimizationProblems
      @SolvingOptimizationProblems  4 ปีที่แล้ว

      Maybe, you should try the regression to find the relationship between the input (dataset) and the output (objective function) and then use the regression equation as your objective function for the PSO

    • @haninfk9749
      @haninfk9749 4 ปีที่แล้ว

      @@SolvingOptimizationProblems thank you, I'll try that

    • @SolvingOptimizationProblems
      @SolvingOptimizationProblems  4 ปีที่แล้ว

      Good luck!

  • @maherjabberi5173
    @maherjabberi5173 3 ปีที่แล้ว

    Please i need to implement SSA algorithm for localization nodes in wsn using python, can you help me

  • @kanishksaxena6552
    @kanishksaxena6552 3 ปีที่แล้ว

    Sir,
    After running the above code following error is coming:
    TypeError: can only concatenate list (not "float") to list.
    What should I do to correct this error??

    • @SolvingOptimizationProblems
      @SolvingOptimizationProblems  3 ปีที่แล้ว

      Please check the data type of the solution

    • @kanishksaxena6552
      @kanishksaxena6552 3 ปีที่แล้ว

      @@SolvingOptimizationProblems Sorry I am not able to understand what you said.
      I have gone through the whole video and used the same code mentioned and following error came:
      ---------------------------------------------------------------------------
      TypeError Traceback (most recent call last)
      in
      74 for j in range(particle_size):
      75 swarm_particle[j].update_velocity(global_best_particle_position)
      ---> 76 swarm_particle[j].update_position(bounds)
      77
      78 A.append(fitness_gobal_best_particle_position) # record the best fitness
      in update_position(self, bounds)
      37 def update_position(self, bounds):
      38 for i in range(nv):
      ---> 39 self.particle_position[i] = self.particle_position + self.particle_velocity[i]
      40
      41 # check and repair to satisfy the upper bounds
      TypeError: can only concatenate list (not "float") to list

    • @SolvingOptimizationProblems
      @SolvingOptimizationProblems  3 ปีที่แล้ว

      Can you run my PSO code (without any change)? make sure it is running properly and then customize to solve other problems.

    • @kanishksaxena6552
      @kanishksaxena6552 3 ปีที่แล้ว

      @@SolvingOptimizationProblems Sir, I have run the same PSO code without any change, still getting the same error. I can email you the code which I am trying to run.

    • @SolvingOptimizationProblems
      @SolvingOptimizationProblems  3 ปีที่แล้ว

      Really? Did you download the code from my blog? If yes, I am sure it could run as in the video.

  • @kishorebalan9902
    @kishorebalan9902 3 ปีที่แล้ว

    sir while i run this code i got error at line 89, in
    NameError: name 'particle' is not defined
    please suggest me a solution to retify this error

    • @SolvingOptimizationProblems
      @SolvingOptimizationProblems  3 ปีที่แล้ว

      Maybe because of the wrong data type/format

    • @kishorebalan9902
      @kishorebalan9902 3 ปีที่แล้ว

      @@SolvingOptimizationProblems yes sir you're correct ,I rectified the error from my side thanks for your reply sir.

    • @SolvingOptimizationProblems
      @SolvingOptimizationProblems  3 ปีที่แล้ว

      Great to hear that. Good luck!

    • @asmaezaidi3469
      @asmaezaidi3469 2 ปีที่แล้ว

      same problem can you tell me how u did please?

  • @aharoon4115
    @aharoon4115 9 หลายเดือนก่อน

    I have Matlab code for this but teacher gave me assignment for changing the beta value's to get best optimal solution but i dont get it

  • @BruceBubbleU1
    @BruceBubbleU1 4 ปีที่แล้ว

    Is it possible to solve a maze using PSO? For a project i'm comparing different methods and I wanted to compare Q-learning, PSO, and Genetic Algorithm to see which one would be ideal.

    • @SolvingOptimizationProblems
      @SolvingOptimizationProblems  4 ปีที่แล้ว +1

      I'm not sure about the maze problem. If in the maze problem, we need to find the optimal path or route, my answer is yes, it is possible to use PSO.

  • @svnsunarikani8865
    @svnsunarikani8865 3 ปีที่แล้ว

    Dear Sir
    How can I get the full codes of GA, SA, PSO, please let me know the procedure.. For payment

  • @arunpeter6280
    @arunpeter6280 2 ปีที่แล้ว

    Sir can you put video on Dingo optimization algorithm and with python code...

  • @markjone7488
    @markjone7488 4 ปีที่แล้ว

    Hello Sir, for real life applications, which algorithm is better, GA or PSO?

  • @davidgarmroudi8747
    @davidgarmroudi8747 3 ปีที่แล้ว

    educational purpose or commercial purpose?

  • @poler_hotutaj
    @poler_hotutaj 3 ปีที่แล้ว

    Why my plot updates only at the end? Regardless of variables number i can see only last draw. Good job!

  • @svnsunarikani8865
    @svnsunarikani8865 3 ปีที่แล้ว

    Also please suggest Best books that you have followed to learn python... I want to learn it... From the basics if any separate Optimization Using python related books 📚available.. Please give the information.. It will be more helpful for me in my research point of view
    Thank you Sir.
    Looking for your reply
    It wil

  • @jimmyloluolajide7777
    @jimmyloluolajide7777 4 ปีที่แล้ว

    Great Tutorial. Thanks for sharing. Please, I need your assistance on how to use genetic algorithm for a minimization objective. I have my input as [3 by 63] table and output as [1 by 63] table. I am confused about how to set the constraints. Kindly, assist. Thanks

    • @SolvingOptimizationProblems
      @SolvingOptimizationProblems  4 ปีที่แล้ว

      Hello, one method is: from that data, use regression to find the relationship between input and output. After that, apply optimization algorithm to find the optimal input variables. Thanks for watching!

    • @jimmyloluolajide7777
      @jimmyloluolajide7777 4 ปีที่แล้ว

      @@SolvingOptimizationProblems I have established the relationship between the input and outpt with neural network. My major challenge is that; I have categorical factors as input and I have to code them numerically to get the neural network function for GA optimization. I will really appreciate your assistance on this issue. I have been struggling with it for months. I can share the data if you are interested. Thanks

    • @SolvingOptimizationProblems
      @SolvingOptimizationProblems  4 ปีที่แล้ว

      I don't have background to understand your problem. So, I only give you a general advice on optimization method.

    • @jimmyloluolajide7777
      @jimmyloluolajide7777 4 ปีที่แล้ว

      @@SolvingOptimizationProblems Ok. Thanks for your time and plese keep up the good work.

    • @SolvingOptimizationProblems
      @SolvingOptimizationProblems  4 ปีที่แล้ว

      Many thanks for watching Jimmylolu!

  • @_._gh0st__
    @_._gh0st__ 4 ปีที่แล้ว

    Can u helpp me out with my project i need some ideas and referenced pls

    • @SolvingOptimizationProblems
      @SolvingOptimizationProblems  4 ปีที่แล้ว

      Hi, can you be more specific? What is your problem?

    • @_._gh0st__
      @_._gh0st__ 4 ปีที่แล้ว

      @@SolvingOptimizationProblems I got my project diagnosis of covid 19 using swarm intelligence and I have no clue abt it can u help me out

  • @diwakarchaubey3596
    @diwakarchaubey3596 3 ปีที่แล้ว +1

    There is charge for code

  • @emanali_
    @emanali_ 3 ปีที่แล้ว

    Please, I would like a code to forecast water consumption for the next five years
    Through the information for the past ten years

  • @RAZZKIRAN
    @RAZZKIRAN 3 ปีที่แล้ว

    thank u

  • @samyohangsubba3748
    @samyohangsubba3748 3 ปีที่แล้ว

    who came here to learn english?