Mercurial > hg > silvet
diff yeti/silvet.yeti @ 28:cd9fd74931bb
Reuse some calculations, plot some plots
author | Chris Cannam |
---|---|
date | Mon, 31 Mar 2014 17:21:51 +0100 |
parents | 9ec18d453889 |
children |
line wrap: on
line diff
--- a/yeti/silvet.yeti Mon Mar 31 17:06:24 2014 +0100 +++ b/yeti/silvet.yeti Mon Mar 31 17:21:51 2014 +0100 @@ -5,7 +5,6 @@ { loadTemplates, extractRanges } = load templates; em = load em; -em1 = load em_onecolumn; mat = load may.matrix; vec = load may.vector; @@ -44,7 +43,9 @@ eprintln "we have \(length chunks) chunks of size \(mat.size (head chunks))"; oneIteration emdata chunk n = - ({ estimate, q } = em.performExpectation emdata chunk; + (eprintln "E"; + { estimate, q } = em.performExpectation emdata chunk; + eprintln "M"; newdata = em.performMaximisation emdata chunk q; if (n % 6 == 0) then \() (plot.plot [ Grid chunk ]); @@ -60,7 +61,10 @@ d := oneIteration d (head chunks) i; done; -eprintln "done"; +eprintln "done, plotting pitch activation matrix"; + +\() (plot.plot [Grid d.pitches]); +\() (plot.plot [Contour d.pitches]); ();