Commit 1f010529 authored by marina.kolpakova's avatar marina.kolpakova

fix inintial weighting

parent a8d0e049
...@@ -382,8 +382,8 @@ void sft::Octave::write( cv::FileStorage &fso, const Mat& thresholds) const ...@@ -382,8 +382,8 @@ void sft::Octave::write( cv::FileStorage &fso, const Mat& thresholds) const
void sft::Octave::initial_weights(double (&p)[2]) void sft::Octave::initial_weights(double (&p)[2])
{ {
double n = data->sample_count; double n = data->sample_count;
p[0] = n / (double)(nnegatives) ; p[0] = n / (2. * (double)(nnegatives));
p[1] = n / (double)(npositives); p[1] = n / (2. * (double)(npositives));
} }
bool sft::Octave::train(const Dataset& dataset, const FeaturePool& pool, int weaks, int treeDepth) bool sft::Octave::train(const Dataset& dataset, const FeaturePool& pool, int weaks, int treeDepth)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment