spleaf.term.MultiFourierKernel#
- class spleaf.term.MultiFourierKernel(P, alpha, beta, series_index=None, vectorize=False)#
Multivariate Fourier series kernel.
For \(m\) times series (\(y_1,\dots y_m\)), the covariance between two time series \(y_i, y_j\) follows:
\[k_{i,j}(\Delta t) = \sum_{k=0}^{n_\mathrm{harm}} a_{k; i,j} \cos(k \nu \Delta t) + b_{k; i,j} \sin(k \nu \Delta t),\]where \(a_k\) and \(b_k\) are the \(m\times m\) matrices given by:
\[a_k = \alpha_k \alpha_k^\mathrm{T} + \beta_k \beta_k^\mathrm{T},\]\[b_k = \alpha_k \beta_k^\mathrm{T} - \beta_k \alpha_k^\mathrm{T},\]and \(\alpha_k\), \(\beta_k\) are \(m\times r\) matrices.
- Parameters:
- nufloat
Fundamental angular frequency.
- alpha, beta: (nharm + 1, m, r) ndarrays
Fourier coefficients. beta[0] should be filled with zeros.
- series_indexlist of ndarrays
Indices corresponding to each original time series in the merged time series.
- vectorize
Whether alpha, beta should be directly passed as parameters or split by index.
Methods
eval
(dt[, series_id])Evaluate the kernel at lag dt.
set_conditional_coef
([alpha, beta, series_id])Set the coefficients used for the conditional computations.