File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 22#include < limits>
33
44const double NAN_DOUBLE{ std::numeric_limits<double >::quiet_NaN () };
5- const double MAX_PROBABILITY {0.9999999 };
6- const double MIN_PROBABILITY {0.0000001 };
5+ const double MAX_PREDICTED_PROBABILITY {0.9999999 };
6+ const double MIN_PREDICTED_PROBABILITY {0.0000001 };
Original file line number Diff line number Diff line change @@ -156,10 +156,10 @@ VectorXd transform_linear_predictor_to_predictions(const VectorXd &linear_predic
156156 VectorXd predictions{exp_of_linear_predictor.array () / (1.0 + exp_of_linear_predictor.array ())};
157157 for (size_t i = 0 ; i < static_cast <size_t >(predictions.size ()); ++i)
158158 {
159- if (std::isgreater (predictions[i],MAX_PROBABILITY ))
160- predictions[i]=MAX_PROBABILITY ;
161- else if (std::isless (predictions[i],MIN_PROBABILITY ))
162- predictions[i]=MIN_PROBABILITY ;
159+ if (std::isgreater (predictions[i],MAX_PREDICTED_PROBABILITY ))
160+ predictions[i]=MAX_PREDICTED_PROBABILITY ;
161+ else if (std::isless (predictions[i],MIN_PREDICTED_PROBABILITY ))
162+ predictions[i]=MIN_PREDICTED_PROBABILITY ;
163163 }
164164 return predictions;
165165 }
You can’t perform that action at this time.
0 commit comments