function ct=lrTest(x,Est,al)
  // ct=lrTest(x,Est,al)      test data with model from "lrLearn"
  //                          Mixture logistic regressiom
  // x    tested data item  (row)
  // Est  estimation structure  Est.th, Est.cv
  // al   stationary komponents probabilities
  // ct   estimated class labels

  [n1,n2]=size(x);
  if n1>n2, disp('Variables in x should be its rows'), end

  nc=max(size(Est));
  nd=size(x,2);
  md=zeros(nc,nd);
  for t=1:nd
    xt=x(:,t);
    dL=zeros(1,nc);
    for i=1:nc
      [xxx dL(1,i)]=GaussN(xt,Est(i).th,Est(i).cv);
    end
    dL=dL-max(dL);
    d=exp(dL);
    mm=(d(:)').*(al(:)');
    md(:,t)=mm'/sum(mm);
  end
  [xxx ct]=max(md,'r');
endfunction
