function P = CheapClassify(Px_obs,eig,T)

% Probs = CheapClassify(P(X|obs), Est.Info.Gain, Threshold)
%
% Compute Probs = P(X | reduced set of observations), using only the observation
% with the maximum a priori estimated information gain (entropy reduction), and assuming
% it also surpasse a given threshold.
%
% Probs         = [N,1], in [0,1]
% P(X|obs)      = [N,k+1] = [P(X) P(X|O1) ... P(X|Ok)]
% Est.Info.Gain = [N,k]   = [est.info.gain(O1) ... est.info.gain(Ok)]
% Threshold     = scalar.

% Liam Pedersen, CMU, May 1999.

% version 1.0

[N,K] = size(Px_obs);
k = K-1;

P = zeros(N,1);
for i = 1:N
   [p,j] = max(eig(i,:));
   if (p >= T)
      P(i) = Px_obs(i,j+1);
   else
      P(i) = Px_obs(i,1);
   end
end

   