about summary refs log tree commit diff
path: root/sourcecodes/bnt-master/netlab3.3/gtmlmean.m
diff options
context:
space:
mode:
Diffstat (limited to 'sourcecodes/bnt-master/netlab3.3/gtmlmean.m')
-rw-r--r--sourcecodes/bnt-master/netlab3.3/gtmlmean.m22
1 files changed, 22 insertions, 0 deletions
diff --git a/sourcecodes/bnt-master/netlab3.3/gtmlmean.m b/sourcecodes/bnt-master/netlab3.3/gtmlmean.m
new file mode 100644
index 00000000..8aad8103
--- /dev/null
+++ b/sourcecodes/bnt-master/netlab3.3/gtmlmean.m
@@ -0,0 +1,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;