From 83a4a21e1fdaa73ea8e402be845991226ffdc49d Mon Sep 17 00:00:00 2001 From: Dongryeol Lee Date: Tue, 26 Feb 2008 18:52:02 +0000 Subject: [PATCH] There was a problem in reference-side initialization - needed to clear out the Epanechnikov moments, but didn't. Now the reference stats are reset everytime the dual-tree multiplier call is made --- .../contrib/dongryel/regression/krylov_lpr_setup_impl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fastlib2/contrib/dongryel/regression/krylov_lpr_setup_impl.h b/fastlib2/contrib/dongryel/regression/krylov_lpr_setup_impl.h index 62d2ff8ec2..9f5033bd39 100644 --- a/fastlib2/contrib/dongryel/regression/krylov_lpr_setup_impl.h +++ b/fastlib2/contrib/dongryel/regression/krylov_lpr_setup_impl.h @@ -24,16 +24,16 @@ void KrylovLpr::InitializeQueryTree_(QueryTree *qnode) { template void KrylovLpr::InitializeReferenceStatistics_ (ReferenceTree *rnode, int column_index, const Vector &weights) { - + + // Clear the sum statistics before accumulating. + rnode->stat().Reset(); + if(rnode->is_leaf()) { // Temporary vector for computing the reference point expansion. Vector reference_point_expansion; reference_point_expansion.Init(row_length_); - // Clear the sum statistics before accumulating. - rnode->stat().Reset(); - // For a leaf reference node, iterate over each reference point // and compute the weighted vector and tally these up for the // sum statistics owned by the reference node.