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 7e743ad commit e27f116Copy full SHA for e27f116
cpp/APLRRegressor.h
@@ -456,7 +456,8 @@ VectorXd APLRRegressor::differentiate_predictions()
456
else if(link_function=="tweedie")
457
{
458
VectorXd transformed_linear_predictor{transform_linear_predictor_to_negative(linear_predictor_current)};
459
- return ((1-tweedie_power)*transformed_linear_predictor.array()).pow(tweedie_power/(1-tweedie_power));
+ double scaling{std::pow((1-tweedie_power)*transformed_linear_predictor.mean(),tweedie_power/(1-tweedie_power))};
460
+ return scaling*((1-tweedie_power)*transformed_linear_predictor.array()).pow(tweedie_power/(1-tweedie_power));
461
}
462
else if(link_function=="inverse")
463
0 commit comments