
clear all;
close all;

data = loaddata;

err = zeros(50,1);
for k = 1:50

  % train -- run boosting algorithm for k iterations
  model = boost_logistic(data.xtrain,data.ytrain,k);

  % test
  y_est = sign(eval_boost(model,data.xtest));
  err(k) = sum(y_est ~= data.ytest);

end

plot(err,'o-');
xlabel('Number test examples misclassified');
ylabel('Number of Boosting Iterations');
refresh;
print -deps boost_plot.eps;

