Home > Source > Model > measure_model.m

measure_model

PURPOSE

MEASURE_MODEL: Measure the "goodness" of a model given some

SYNOPSIS

function score = measure_model(combined_variances, n_modes, model_evaluation_method, combined_model)

DESCRIPTION

``` MEASURE_MODEL: Measure the "goodness" of a model given some
of its properties.

Code written by Katherine Smith, 2003

GENERAL

score = measure_model(combined_variances, n_modes, model_evaluation_method, combined_model)

INPUT/S

-combined_model:
The full combined model

-combined_variances: (obsolete)
The combined variances of the model.

-n_modes:
The total number of modes of the model.

-method:
Method of evaluating a model.

OUTPUT/S

-score:
A score indicating the "goodness" of the model.

PENDING WORK

KNOWN BUG/S

-None.

COMMENT/S

-Smith: add a small error to avoid zero values

RELATED FUNCTION/S

-Created:     November 23rd, 2003
-Last update: February 10th, 2004
-Revision:    0.0.9
-Author:      R. S. Schestowitz, University of Manchester
==============================================================```

CROSS-REFERENCE INFORMATION

This function calls:
This function is called by:

SOURCE CODE

```0001 function score = measure_model(combined_variances, n_modes, model_evaluation_method, combined_model)
0002 % MEASURE_MODEL: Measure the "goodness" of a model given some
0003 %                of its properties.
0004 %
0005 % Code written by Katherine Smith, 2003
0006 %
0007 %    GENERAL
0008 %
0009 %      score = measure_model(combined_variances, n_modes, model_evaluation_method, combined_model)
0010 %
0011 %    INPUT/S
0012 %
0013 %      -combined_model:
0014 %             The full combined model
0015 %
0016 %      -combined_variances: (obsolete)
0017 %           The combined variances of the model.
0018 %
0019 %      -n_modes:
0020 %           The total number of modes of the model.
0021 %
0022 %      -method:
0023 %           Method of evaluating a model.
0024 %
0025 %    OUTPUT/S
0026 %
0027 %      -score:
0028 %           A score indicating the "goodness" of the model.
0029 %
0030 %    PENDING WORK
0031 %
0033 %
0034 %    KNOWN BUG/S
0035 %
0036 %      -None.
0037 %
0038 %    COMMENT/S
0039 %
0040 %      -Smith: add a small error to avoid zero values
0041 %
0042 %    RELATED FUNCTION/S
0043 %
0044 %
0045 %
0047 %
0048 %      -Created:     November 23rd, 2003
0049 %      -Last update: February 10th, 2004
0050 %      -Revision:    0.0.9
0051 %      -Author:      R. S. Schestowitz, University of Manchester
0052 % ==============================================================
0053
0054 Epsilon = 0.0001;
0055 current_method = model_evaluation_method;
0056
0057 % size(combined_variances,2) % see number of modes
0058 if (strcmp(current_method,'determinant')),
0059           % see Kotcheff
0061           % a vector of zeroes the size of modes number
0062     if(size(combined_variances,2)<= n_modes),
0064     else
0066     end
0068           % Smith: add a small error to avoid 0
0070           % product of vector components i.e. determinant (Kotcheff)
0071 elseif (strcmp(current_method,'minimum_description_length')),
0072     msgbox('MDL: Not yet implemented');
0073 elseif (strcmp(current_method,'sum_of_log_eigenvalues')),
0075           % a vector of zeroes the size of modes number
0076     if(size(combined_variances,2)<= n_modes),
0078     else