Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

well , you're right in both cases, and the tutorial sure needs an update !

for a classification, the responses need to be integer, indeed. and the weird tuple from the prediction maybe gets easier to understand, if we look at the c++ signature . a single float value is returned, if you predict on a single feature (which is probably the most common case). if you predict on several features (all 250 at once in the demo), you'd pass an empty result Mat to hold the 250 results in c++, while in python a tuple of both the single value and the responses array is returned (yea, clumsy).