Skip to content

Commit

Permalink
tweak nbBernPred
Browse files Browse the repository at this point in the history
  • Loading branch information
sth4nth committed Mar 11, 2017
1 parent 0c32f99 commit 9465a1f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions chapter08/nbBernPred.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,5 @@
% Written by Mo Chen ([email protected]).
mu = model.mu;
w = model.w;
X = sparse(X);
R = log(mu)'*X+log(1-mu)'*(1-X);
R = bsxfun(@plus,R,log(w(:)));
[~,y] = max(R,[],1);
[~,y] = max(log(mu)'*X+log(1-mu)'*(1-X)+log(w(:)),[],1);

0 comments on commit 9465a1f

Please sign in to comment.