projects
/
platform
/
upstream
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ecbec72
)
Correction of the integer data treated as floating point data bug, already corrected...
author
Benoit Seguin
<seg.benoit@gmail.com>
Tue, 23 Sep 2014 12:03:20 +0000
(14:03 +0200)
committer
Benoit Seguin
<seg.benoit@gmail.com>
Tue, 23 Sep 2014 12:03:20 +0000
(14:03 +0200)
modules/ml/src/gbt.cpp
patch
|
blob
|
history
diff --git
a/modules/ml/src/gbt.cpp
b/modules/ml/src/gbt.cpp
index b186abf672b067bdafde8256a6cda3767f078717..0ebe19ea309193f7cfaeaf51a189dd1902e85713 100644
(file)
--- a/
modules/ml/src/gbt.cpp
+++ b/
modules/ml/src/gbt.cpp
@@
-268,6
+268,7
@@
CvGBTrees::train( const CvMat* _train_data, int _tflag,
sample_idx = cvCreateMat( 1, sample_idx_len, CV_32S );
for (int i=0; i<sample_idx_len; ++i)
sample_idx->data.i[i] = _sample_idx->data.i[i];
+ std::sort(sample_idx->data.i, sample_idx->data.i + sample_idx_len);
} break;
case CV_8S:
case CV_8U:
@@
-284,7
+285,6
@@
CvGBTrees::train( const CvMat* _train_data, int _tflag,
} break;
default: CV_Error(CV_StsUnmatchedFormats, "_sample_idx should be a 32sC1, 8sC1 or 8uC1 vector.");
}
- std::sort(sample_idx->data.fl, sample_idx->data.fl + sample_idx_len);
}
else
{