function h = density_model_quality_measure( X, model_density, varargin)
%h = density_model_quality_measure( X, model_density, model_parameters, ...)
%
% X ... observations of a random (vector) variable
%       size(X): #observations rows by #vector_dimensions columns
% model_density ... string, name of MATLAB function with following syntax
%                   name(X, model_parametrers, ...), which returns one density
%                   value per observation
% model_parameters ... list of parameters needed by model_density
% h ... ? (should be answered by you)
%
% Example: 
% >> X=randn(1000,2);
% >> density_model_quality_measure( X, 'mvnpdf', mean(X), cov(X))
%
% (C) by C. Feldbauer, 2008


h = -mean( log2( eval([model_density '(X,varargin{:})']) ) );
