Home > Source > Model > find_generalisability.m

# find_generalisability

## PURPOSE

FIND_GENERALISABILITY: Find the generalisability of a model.

## SYNOPSIS

function [mean_generalisability, std_generalisability] = find_generalisability(model, n_iterations, verbose)

## DESCRIPTION

``` FIND_GENERALISABILITY: Find the generalisability of a model.

Code written by Katherine Smith, 2003

GENERAL

[mean_generalisability, std_generalisability] =
find_generalisability(model, n_iterations, verbose)

INPUT/S

-model:
The model for which generalisability is calculated.

-n_iteration:
Number of iterations to control the complexity of
this function?

-verbose:
Verbose flag.

OUTPUT/S

-mean_generalisability:
The mean generalisability.

-mean_generalisability:
The standard deviation (?) of the generalisability values?

PENDING WORK

-Resolve meaning of inputs and outputs.

KNOWN BUG/S

-None.

COMMENT/S

-Smith: Attempt to reconstruct an unseen example
and measure distance from the example
(mean squared difference).

RELATED FUNCTION/S

FIND_SPECIFICITY

-Created:     November 23rd, 2003
-Last update: Novermber 25th, 2003
-Revision:    0.0.2
-Author:      R. S. Schestowitz, University of Manchester
==============================================================```

## CROSS-REFERENCE INFORMATION

This function calls:
This function is called by:
• measure_model MEASURE_MODEL: Measure the "goodness" of a model given some

## SOURCE CODE

```0001 function [mean_generalisability, std_generalisability] = find_generalisability(model, n_iterations, verbose)
0002 % FIND_GENERALISABILITY: Find the generalisability of a model.
0003 %
0004 % Code written by Katherine Smith, 2003
0005 %
0006 %    GENERAL
0007 %
0008 %      [mean_generalisability, std_generalisability] =
0009 %       find_generalisability(model, n_iterations, verbose)
0010 %
0011 %    INPUT/S
0012 %
0013 %
0014 %      -model:
0015 %           The model for which generalisability is calculated.
0016 %
0017 %      -n_iteration:
0018 %           Number of iterations to control the complexity of
0019 %           this function?
0020 %
0021 %      -verbose:
0022 %           Verbose flag.
0023 %
0024 %    OUTPUT/S
0025 %
0026 %      -mean_generalisability:
0027 %           The mean generalisability.
0028 %
0029 %      -mean_generalisability:
0030 %           The standard deviation (?) of the generalisability values?
0031 %
0032 %    PENDING WORK
0033 %
0034 %      -Resolve meaning of inputs and outputs.
0036 %
0037 %    KNOWN BUG/S
0038 %
0039 %      -None.
0040 %
0041 %    COMMENT/S
0042 %
0043 %      -Smith: Attempt to reconstruct an unseen example
0044 %              and measure distance from the example
0045 %              (mean squared difference).
0046 %
0047 %    RELATED FUNCTION/S
0048 %
0049 %      FIND_SPECIFICITY
0050 %
0052 %
0053 %      -Created:     November 23rd, 2003
0054 %      -Last update: Novermber 25th, 2003
0055 %      -Revision:    0.0.2
0056 %      -Author:      R. S. Schestowitz, University of Manchester
0057 % ==============================================================
0058
0059 % search parameters with simplex
0060 % hack in white width for now
0061
0062 verbose='off';
0063     % RSS, added 8th December 2003 to get eval_1d_app_model_obj_fn to run
0064
0065 white_width = 0.2;
0066 %subs = figure;
0067 for i=1:n_iterations
0068   [imagelist,example,points, his, los] = make_1d_images(1, size(model.intensity_model.pcs(:,1),1), white_width);
0069   [params, scores(i)] = fminsearch(@eval_msd,zeros(1,size(model.params,2)),optimset('Display',verbose,'TolX',0.001,'TolFun',0.001),model,example);
0070 %  scores(i)
0071 %  difference_image = abs(example - construct_model_example(params, model, 1:50));
0072 %  figure(subs),hold on,subplot(5,1,i),plot(difference_image),gca,title(['score: ' num2str(scores(i))]);
0073 end
0074 mean_generalisability = mean(scores);
0075 std_generalisability = std(scores);```

Generated on Fri 14-May-2004 10:05:30 by m2html © 2003