%Doug Van Nort  MUMT 611  Final Project: Timbre Recognition via HMM's
%
%Compute the probability of the observation sequence O, given the model H:
%   P(O| H)  


%We compute the log-likelihood for each model - the highest prob is the
%chosen class

function P = classify(test_data)

test_data = OTR(2,:);

loglik_V = dhmm_logprob(test_data, prior_V, transmat_V, obsmat_V);

loglik_F = dhmm_logprob(test_data, prior_F, transmat_F, obsmat_F);

loglik_T = dhmm_logprob(test_data, prior_T, transmat_T, obsmat_T);

probs = [loglik_V loglik_F loglik_T];

P = argmax(probs);

if(P==1)
    fprintf(1, 'Violin\n');
end

if(P==2)
    fprintf(1, 'Flute\n');
end

if(P==3)
    fprintf(1, 'Trumpet\n');
end

