- #1
funyhony
- 9
- 0
how can i use gamultiobj or ga, I've input of (i, j) matrix and i want (i,j) output
i've equation to solve with ga
f = sumation from i to class[ sumation from j to rows(yij * log(pij)))]
how to solve with ga
fun f = funGa1(Pij,Yij,class,rows)
f = - symsum(symsum(Yij*log(Pij),i,1,Class-1),j,1,rows)
and in other file
f = @(Pij)funGa1(Pij,Yij,Class,rows)
% 0 =< Pij <= 1
lb = 0;
ub = 1;
options = gaoptimset('PopulationSize',rows*class,'Generations',1000, ...
'Vectorized','on','PlotFcns',@gaplotpareto);
[x fval] = gamultiobj(f,class,[],[],[],[],lb,ub,options)
i've many many errors
like :
1- mtimes Inner matrix dimensions must agree
2- ? Error using ==> mtimes
Inner matrix dimensions must agree.
3- Error in ==> validate>@(x)fitness(x,FitnessFcnArgs{:})
at 136
fitness = @(x) fitness(x,FitnessFcnArgs{:});
and much more
please tell me what i can do
i've equation to solve with ga
f = sumation from i to class[ sumation from j to rows(yij * log(pij)))]
how to solve with ga
fun f = funGa1(Pij,Yij,class,rows)
f = - symsum(symsum(Yij*log(Pij),i,1,Class-1),j,1,rows)
and in other file
f = @(Pij)funGa1(Pij,Yij,Class,rows)
% 0 =< Pij <= 1
lb = 0;
ub = 1;
options = gaoptimset('PopulationSize',rows*class,'Generations',1000, ...
'Vectorized','on','PlotFcns',@gaplotpareto);
[x fval] = gamultiobj(f,class,[],[],[],[],lb,ub,options)
i've many many errors
like :
1- mtimes Inner matrix dimensions must agree
2- ? Error using ==> mtimes
Inner matrix dimensions must agree.
3- Error in ==> validate>@(x)fitness(x,FitnessFcnArgs{:})
at 136
fitness = @(x) fitness(x,FitnessFcnArgs{:});
and much more
please tell me what i can do