
function [theta] = ml_theta(X,y)

theta = zeros(2,size(X,2));
for i=1:2,
  I = find(y==i); 
  theta(i,:) = sum(X(I,:))/(sum(sum(X(I,:))));
end;
