dmitryikh / leaves

pure Go implementation of prediction part for GBRT (Gradient Boosting Regression Trees) models from popular frameworks
MIT License
419 stars 72 forks source link

Return explicit error for predictSingle. #79

Closed fredrikluo closed 3 years ago

fredrikluo commented 3 years ago

The PredictSingle returns 0.0 when there is an error, which could be sometimes confusing what is going on unless you read the code.

Maybe it's a good idea to just return the explicit errors, in order to be more friendly for the client code.

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 171


Changes Missing Coverage Covered Lines Changed/Added Lines %
leaves.go 6 8 75.0%
<!-- Total: 6 8 75.0% -->
Files with Coverage Reduction New Missed Lines %
leaves.go 1 81.46%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 170: -0.01%
Covered Lines: 1861
Relevant Lines: 2730

💛 - Coveralls
dmitryikh commented 3 years ago

I like your idea. But let's postpone this change a little bit in order to not brake backward compatibility right now.

I have plans to introduce more compatibility breaks soon and want to ship them together.

fredrikluo commented 3 years ago

OK