pyhctsa.robust.bf_exp_fit¶
-
pyhctsa.robust.bf_exp_fit(x, y, with_offset=
True, max_rate=20)¶ Global least-squares fit of
a*exp(b*x) + cby variable projection (hctsaBF_ExpFit).For a given rate
bthe besta(andc) follow in closed form, so onlybis searched: on a grid of 401 rates between-max_rate/range(x)andmax_rate/range(x)(including 0, a constant), then refined by 40 golden-section steps around the best grid point. The result is the global optimum within the allowed range of rates and needs no starting point. If the best rate is at the edge of the range,bis that limiting value.- Parameters:¶
- Returns:¶
a, b, c(c = 0without offset),r2(in [0,1]),adjr2,rmse(sqrt(SSE/(n-p)), p = 3 or 2). All NaN ifyis constant (to within 1e-12 of its largest magnitude, so that rounding differences between equal values are not fitted) or not finite, or if there are not more points than parameters.- Return type:¶
dict