Skip to content

Commit

Permalink
fix bugs reported by @Amadeus96
Browse files Browse the repository at this point in the history
  • Loading branch information
anonymone committed Jul 23, 2019
1 parent c85432d commit 9ffa34c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Binary file removed PlatEMO/Problems/Sparse MOPs/Dataset_FS_NN.mat
Binary file not shown.
Binary file added PlatEMO/Problems/Sparse MOPs/Dataset_NN.mat
Binary file not shown.
8 changes: 4 additions & 4 deletions PlatEMO/Problems/Sparse MOPs/Sparse_NN.m
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ function Draw(obj,PopDec)
D1 = 0;
D2 = 0;
for i = 1 : size(X,1)
D2 = D2 + [0,Y(i,:)]'*P(i,:);
D1 = D1 + [0,X(i,:)]'*Q(i,:);
D2 = D2 + [1,Y(i,:)]'*P(i,:);
D1 = D1 + [1,X(i,:)]'*Q(i,:);
end
W1 = W1 - D1/size(X,1);
W2 = W2 - D2/size(X,1);
end
end

function [Z,Y] = Predict(X,W1,W2)
Y = 1 - 2./(1+exp(2*[zeros(size(X,1),1),X]*W1));
Z = 1./(1+exp(-[zeros(size(Y,1),1),Y]*W2));
Y = 1 - 2./(1+exp(2*[ones(size(X,1),1),X]*W1));
Z = 1./(1+exp(-[ones(size(Y,1),1),Y]*W2));
end

0 comments on commit 9ffa34c

Please sign in to comment.