File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -146,12 +146,13 @@ def unroll_responses(number_of_class, responses):
146146
147147 unrolled_testing_examples = unroll_sample (number_of_classes , testing_attributes [i ,:])
148148
149- # we perform testing over the unrolled example by specifying the returnSum parameter to
150- # to return the sum of the number of trees that classified a given example as 1.
151- # This is repeated over all of the unrolled examples, with the most voted for unrolled
152- # class returned as the final classification result
149+ # we perform testing over all the unrolled examples and take the maximum result
150+ # following the example at:
151+ # https://github.com/opencv/opencv/blob/master/samples/python/letter_recog.py
152+
153+ # result should contain the number of trees that voted for each unrolled
154+ # example, hence each class
153155
154- # _, result = np.array([boostedTree.predict(ex, returnSum = True) for ex in unrolled_testing_examples] );
155156 _ , result = boostedTree .predict (unrolled_testing_examples );
156157
157158 result = result .reshape (- 1 , number_of_classes ).argmax (1 );
You can’t perform that action at this time.
0 commit comments