bayespecon.logdet.logdet_chebyshev¶
-
bayespecon.logdet.logdet_chebyshev(rho, coeffs, rmin=
-1.0, rmax=1.0)[source]¶ Evaluate Chebyshev approximation of log|I - rho*W| symbolically.
Uses Clenshaw’s algorithm for numerically stable evaluation of the Chebyshev series at a PyTensor scalar
rho.- Parameters:¶
- rho : pytensor scalar¶
Spatial autoregressive parameter symbol.
- coeffs : np.ndarray¶
Chebyshev coefficients from
chebyshev(), shape(m,).- rmin : float, default=-1.0¶
Lower bound of the rho interval (must match what was used to compute coeffs).
- rmax : float, default=1.0¶
Upper bound of the rho interval (must match what was used to compute coeffs).
- Returns:¶
Symbolic Chebyshev approximation of the log-determinant.
- Return type:¶
Notes
The mapped variable is
\[x = \frac{2\rho - r_{\max} - r_{\min}}{r_{\max} - r_{\min}}\]and the approximation is evaluated via Clenshaw’s recurrence:
\[ \begin{align}\begin{aligned}b_{m+1} = 0, \quad b_m = c_m\\b_k = 2x \, b_{k+1} - b_{k+2} + c_k\\f(x) = x \, b_1 - b_2 + c_0\end{aligned}\end{align} \]