fixed compile warnings from MSVC; fixed warnings in Python bindings; added some debugging code

This commit is contained in:
Vadim Pisarevsky
2014-08-03 12:46:28 +04:00
parent 9cb79b9abb
commit eeb786fcfd
10 changed files with 30 additions and 30 deletions

View File

@@ -220,12 +220,13 @@ public:
void updateWeightsAndTrim( int treeidx, vector<int>& sidx )
{
putchar('<');
int i, n = (int)w->sidx.size();
int nvars = (int)varIdx.size();
double sumw = 0., C = 1.;
cv::AutoBuffer<double> buf(n*3 + nvars);
cv::AutoBuffer<double> buf(n + nvars);
double* result = buf;
float* sbuf = (float*)(result + n*3);
float* sbuf = (float*)(result + n);
Mat sample(1, nvars, CV_32F, sbuf);
int predictFlags = bparams.boostType == Boost::DISCRETE ? (PREDICT_MAX_VOTE | RAW_OUTPUT) : PREDICT_SUM;
predictFlags |= COMPRESSED_INPUT;
@@ -373,6 +374,7 @@ public:
if( w->sample_weights[si] >= threshold )
sidx.push_back(si);
}
putchar('>'); fflush(stdout);
}
float predictTrees( const Range& range, const Mat& sample, int flags0 ) const