Skip to content

Commit

Permalink
logitPred.m is not finished
Browse files Browse the repository at this point in the history
  • Loading branch information
sth4nth committed Dec 7, 2015
1 parent 956f7f2 commit e5840ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion chapter04/logitPred.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
w0 = model.w0;
a = w'*X+w0;
y = a > 0;
h = ones(1,n);
h = ones(1,size(X,2));
h(~y) = -1;
p = exp(-sum(log1pexp(-h.*a)));

Expand Down
4 changes: 2 additions & 2 deletions chapter06/demo.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

x = linspace(min(X)-1,max(X)+1,n); % test data
%%
model = regressKn(X,t,1e-4,@knGauss);
y = knInfer(x,model);
model = knReg(X,t,1e-4,@knGauss);
y = knPred(x,model);
figure;
hold on;
% plotBand(x,y,2*sigma);
Expand Down
4 changes: 2 additions & 2 deletions chapter06/knInfer.m → chapter06/knPred.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function [y, sigma2, p] = knInfer(x, model, t)
% inference for kernel model
function [y, sigma2, p] = knPred(x, model, t)
% Prediction for kernel regression model
% Written by Mo Chen ([email protected]).
kn = model.kn;
a = model.a;
Expand Down

0 comments on commit e5840ba

Please sign in to comment.