about summary refs log tree commit diff
path: root/sourcecodes/bnt-master/netlab3.3/gtmlmean.m
blob: 8aad8103fd1a4873ee264af14becdb33002e8638 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function means = gtmlmean(net, data)
%GTMLMEAN Mean responsibility for data in a GTM.
%
%	Description
%	 MEANS = GTMLMEAN(NET, DATA) takes a GTM structure NET, and computes
%	the means of the responsibility  distributions for each data point in
%	DATA.
%
%	See also
%	GTM, GTMPOST, GTMLMODE
%

%	Copyright (c) Ian T Nabney (1996-2001)

% Check for consistency
errstring = consist(net, 'gtm', data);
if ~isempty(errstring)
  error(errstring);
end

R = gtmpost(net, data);
means = R*net.X;