필터 지우기
필터 지우기

How to use PSO (Particle swarm optimization) to optimize objective function containing two terms one of them kmeans clustering?

조회 수: 2 (최근 30일)
Hi
I used PSO before to optimize an objective function.Now I have an objective(fitness) function containing two terms; one of them described by k-means clustering ..Euclidean distance?

채택된 답변

Walter Roberson
Walter Roberson 2019년 1월 19일
You have to pass a function handle as the objective function, but it does not have to be an anonymous function. You can pass the handle to a function that does extensive computation based on the inputs. The only requirement is that the output has to be a scalar.
If you are trying to minimize two distinct things simultaneously then you either need to decide their relative weighting to combine them into a scalar, or else you need to use gamultiobj() to find pareto fronts.
  댓글 수: 14
M.Shaarawy
M.Shaarawy 2019년 1월 22일
Dear Walter Roberson,
Is there is compact code after the description in the last two images?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Particle Swarm에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by