function [ loglik y_classified] = gmm_classification(features, gmmParam)
%%
%   Mobilab 2012-2013  
%   
%   Input arguments:
%       - features is a matrix structure:: 
%               *) rows: different coefficients
%               *) columns: different frames
%       - gmmParem is a cellStructure:
%            As many cells as GMM models:
%       - Config:
%               *) windowClassification_ms: the size of the for classification
%               *) samplfeFrequency: the sample frequency of the .wav files
%               *) framelen_ms: is the size of the frames where the MFCC are
%               on computed
%   Output arguments
%       - probs is a matrix structure:
%               *) rows: the prob of the corresponding event
%               %) columns: the corresponding window
%%
%Prealloction for speed
nrEvents=length(features);
nrClasses=length(gmmParam);
loglik=zeros(nrClasses, nrEvents);
%Do a classification
for(classNr=1:nrClasses)
    for(eventNr=1:nrEvents)
         loglik(classNr,eventNr) = mean(log(pdf(gmmParam{classNr},features{eventNr,1}')));         
    end,
end,
[ignore y_classified] = max(loglik);
end


