thaddeusdiamond/Social-Hierarchical-Learning — comment on commit 70a9f915d3f758f29a337227dace74f681fc6228
File: src/Observation/Changepoint/VarianceDetector.cc line 62
By thaddeusdiamond:

Shouldn't these all be fabs(d)? I think like the following:

if (fabs(d) > max_first_derivative)
max_first_derivative = fabs(d);
moving_variance_derivative.push_back(fabs(d));

Actually, the third one I could see as being OK for just d. But if you set inside the if statement to just d then no negative derivatives will ever be counted (unless they happen to be the very last derivative).