From 1f01052955b2e003c2484e49857fef9ad6d41116 Mon Sep 17 00:00:00 2001 From: "marina.kolpakova" Date: Thu, 13 Dec 2012 14:31:28 +0400 Subject: [PATCH] fix inintial weighting --- apps/sft/octave.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/sft/octave.cpp b/apps/sft/octave.cpp index e886fbd..6a02d54 100644 --- a/apps/sft/octave.cpp +++ b/apps/sft/octave.cpp @@ -382,8 +382,8 @@ void sft::Octave::write( cv::FileStorage &fso, const Mat& thresholds) const void sft::Octave::initial_weights(double (&p)[2]) { double n = data->sample_count; - p[0] = n / (double)(nnegatives) ; - p[1] = n / (double)(npositives); + p[0] = n / (2. * (double)(nnegatives)); + p[1] = n / (2. * (double)(npositives)); } bool sft::Octave::train(const Dataset& dataset, const FeaturePool& pool, int weaks, int treeDepth) -- 2.7.4