You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey!
I am recieving the following error very frequently:
"Error using *
Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the
number of rows in the second matrix. To perform elementwise multiplication, use '.*'.
Error in TSEMO_V4>hypervolumemonte (line 633)
P=P*diag(1./r);
..."
Any idea how to fix this? Let me know if further elaboration is requiered.
The text was updated successfully, but these errors were encountered:
But I would recommend everyone to use this vectorized version of that function (if compatible with your MatLab version). It should be around 12-20x faster (at the cost of a bit of memory) than the one in the original codebase as it is a bottleneck on execution speed if you are pushing the algorithm.
function v = hypervolumemonte(P,r,N)
% Check input and output
narginchk(2,3);
nargoutchk(0,1);
P=P*diag(1./r);
[~,d]=size(P);
if nargin<3
N=1000;
end
if ~isscalar(N)
C=N;
N=size(C,1);
else
C=rand(N,d);
end
C_expanded = permute(C, [1 3 2]);
P_expanded = permute(P, [3 1 2]);
domination_checks = all(C_expanded > P_expanded, 3);
fDominated = any(domination_checks, 2);
v=sum(fDominated)/N;
return
Hey!
I am recieving the following error very frequently:
"Error using *
Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the
number of rows in the second matrix. To perform elementwise multiplication, use '.*'.
Error in TSEMO_V4>hypervolumemonte (line 633)
P=P*diag(1./r);
..."
Any idea how to fix this? Let me know if further elaboration is requiered.
The text was updated successfully, but these errors were encountered: