Mercurial > hg > silvet
changeset 164:629c9525b815
Some measurements suggest we get slightly better results with more iterations, but not drastically worse with fewer -- so go lower for draft and higher for hq mode
author | Chris Cannam |
---|---|
date | Tue, 20 May 2014 16:21:33 +0100 |
parents | 6e9ddd07dc3c |
children | f73be84f5c90 |
files | src/EM.cpp src/Silvet.cpp |
diffstat | 2 files changed, 12 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/EM.cpp Tue May 20 15:56:57 2014 +0100 +++ b/src/EM.cpp Tue May 20 16:21:33 2014 +0100 @@ -182,12 +182,20 @@ } } - //!!! try normalising so as to sum to unity and then taking L2 - //!!! norm of the two (for measure of how close they are) - for (int i = 0; i < m_binCount; ++i) { m_q[i] = column[i] / m_estimate[i]; } + +/* + double l2norm = 0.0; + + for (int i = 0; i < m_binCount; ++i) { + l2norm += (column[i] - m_estimate[i]) * (column[i] - m_estimate[i]); + } + + l2norm = sqrt(l2norm); + cerr << "l2norm = " << l2norm << endl; +*/ } void