Unverified Commit 60710c70 authored by Alberto Ferreira's avatar Alberto Ferreira Committed by GitHub
Browse files

Fix SingleRowPredictor::IsPredictorEqual comparison (invert) (#2799)

parent 060c681d
......@@ -77,13 +77,15 @@ class SingleRowPredictor {
predict_function = predictor_->GetPredictFunction();
num_total_model_ = boosting->NumberOfTotalModel();
}
~SingleRowPredictor() {}
bool IsPredictorEqual(const Config& config, int iter, Boosting* boosting) {
return early_stop_ != config.pred_early_stop ||
early_stop_freq_ != config.pred_early_stop_freq ||
early_stop_margin_ != config.pred_early_stop_margin ||
iter_ != iter ||
num_total_model_ != boosting->NumberOfTotalModel();
return early_stop_ == config.pred_early_stop &&
early_stop_freq_ == config.pred_early_stop_freq &&
early_stop_margin_ == config.pred_early_stop_margin &&
iter_ == iter &&
num_total_model_ == boosting->NumberOfTotalModel();
}
private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment