mfasiolo / qgam

Additive quantile regression R package
http://mfasiolo.github.io/qgam/
30 stars 7 forks source link

Better dynamic bracket size in tuneLearnFast() #11

Open mfasiolo opened 8 years ago

mfasiolo commented 8 years ago

The way this function shrinks the bracket size is not entirely satisfactory at the moment. In particular, the methods often shrinks the bracket when fitting central quantiles, but the optimal log(sigma) oscillates quite a lot when extreme quantiles are considered. Hence, using a narrow bracket for extreme quantiles is inefficient.

In addition, the algorithm does not recognise immediately that the bracket is too narrow, because it does not look at derivative at the limits of the bracket. What happens is that, when the bracket is too narrow, the algorithms slowly moves toward the one end of the bracket, wasting quite a lot of function evaluations in that way.

mfasiolo commented 8 years ago

Partially addressed here

af959f9d1f48ac7edde550ef45205b5c6449fd4a

now inside Brent() we monitor if we are getting too close to the boundary and, if we are too close, we exit. tuneLearnFast will then enlarge and shift the bracket.