genetic algorithm matlab minimization

조회 수: 2 (최근 30일)
Anass
Anass 2015년 11월 11일
댓글: Anass 2015년 11월 12일
Hi, I would like to use the Optimization-ToolBox of Matlab that provide a tool for the Genetic Algorithms. I have a small equation (Score= alpha*(\sum(L[i])^(1/alpha) + Beta*(\sum(R[i])^(1/Beta)) that compute a score where L and R are vectors of values that I computed before and alpha and beta are parameters that I want to optimize via the GA. The constraint is that the scores should be close to another vector of scores called ground truth. We can formalize this constraint by : " |score - ground_truth_score|_2^{2}=0"
So for every L[i] and R[i], an Alpha and Beta would optimize the constraint defined before.
I'm trying to discover the GA in Matlab, however, I don't know how to formalize the constraint with the fitness function (the equation).

답변 (1개)

Alan Weiss
Alan Weiss 2015년 11월 11일
Perhaps the constrained minimization example will help.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
  댓글 수: 2
Anass
Anass 2015년 11월 11일
편집: Anass 2015년 11월 11일
Hi, thank you for your response, but i've already seen this example, they are talking about the constraint on the input data (variable x of the function), however, in my case, i'm talking about the constraint on the value returned by the function. This one must be close to my ground truth. I don't find a way to make a constraint on this.
Anass
Anass 2015년 11월 12일
I made this objective function to manage the minimization of my problem, however i'm not sure if it's the right answer:
function y=parametrized_fitness_fct(x,ground_truth_score)
y=x(1)*(L^(1/x(1))) + x(2)*(R^(1/x(2))) + ground_truth_score;
% ground_truth_score, L and R are single values
end
FitnessFunction =@(x) parametrized_fitness_fct(x,ground_truth_score);
[x,score] = ga(FitnessFunction,numberOfVariables)%numberOfVariables=2
%x will be a vector containing the searched values "alpha and beta",
%and score is the score optimized to be close to the ground_truth_score

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

카테고리

Help CenterFile Exchange에서 Genetic Algorithm에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by