We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04a316f commit 2a6ba95Copy full SHA for 2a6ba95
cpp/APLRRegressor.h
@@ -461,7 +461,8 @@ VectorXd APLRRegressor::differentiate_predictions()
461
else if(link_function=="inverse")
462
{
463
VectorXd transformed_linear_predictor{transform_linear_predictor_to_negative(linear_predictor_current)};
464
- return 1.0 * transformed_linear_predictor.array().pow(-2);
+ double scaling{std::pow(transformed_linear_predictor.mean(),2)};
465
+ return scaling * transformed_linear_predictor.array().pow(-2);
466
}
467
return VectorXd(0);
468
0 commit comments