Added cast to float to remove warning

This commit is contained in:
Abe Friesen 2015-11-02 17:36:27 -08:00
parent db78fcd11a
commit d367e159c1

View File

@ -303,7 +303,7 @@ float LogisticRegressionImpl::predict(InputArray samples, OutputArray results, i
}
}
return ( pred_labs.empty() ? 0 : pred_labs.at< int >( 0 ) );
return ( pred_labs.empty() ? 0.f : (float) pred_labs.at< int >( 0 ) );
}
Mat LogisticRegressionImpl::calc_sigmoid(const Mat& data) const