Mercurial > hg > camir-aes2014
comparison toolboxes/FullBNT-1.0.7/netlab3.3/gtmmag.m @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:e9a9cd732c1e |
---|---|
1 function mags = gtmmag(net, latent_data) | |
2 %GTMMAG Magnification factors for a GTM | |
3 % | |
4 % Description | |
5 % MAGS = GTMMAG(NET, LATENTDATA) takes a GTM structure NET, and | |
6 % computes the magnification factors for each point the latent space | |
7 % contained in LATENTDATA. | |
8 % | |
9 % See also | |
10 % GTM, GTMPOST, GTMLMEAN | |
11 % | |
12 | |
13 % Copyright (c) Ian T Nabney (1996-2001) | |
14 | |
15 errstring = consist(net, 'gtm'); | |
16 if ~isempty(errstring) | |
17 error(errstring); | |
18 end | |
19 | |
20 Jacs = rbfjacob(net.rbfnet, latent_data); | |
21 nlatent = size(latent_data, 1); | |
22 mags = zeros(nlatent, 1); | |
23 temp = zeros(net.rbfnet.nin, net.rbfnet.nout); | |
24 for m = 1:nlatent | |
25 temp = squeeze(Jacs(m, :, :)); % Turn into a 2d matrix | |
26 mags(m) = sqrt(det(temp*temp')); | |
27 end |