Kernels¶
- TS_PCA.kernel.Varifold_TSLDDMM_Gaussian_Kernel(t_sigma_1, s_sigma_1, t_sigma_2, s_sigma_2, np_dtype=<class 'numpy.float32'>)¶
Generate TS-LDDMM Varifold kernel function, using the notations of the paper “Shape analysis for time series” \(k((x,v),(x',v'))=k_{\text{pos}}(x,x')k_{\text{dir}}(v,v')\) where \(k_{\text{pos}}((t,x),(t',x'))=K^{(1)}_{\sigma_{\text{pos},t}}(t,t')K^{(d)}_{\sigma_{\text{pos},x}}(x,x')\), \(k_{\text{dir}}((t,x),(t',x'))=K^{(1)}_{\sigma_{\text{dir},t}}(t,t')K^{(d)}_{\sigma_{\text{dir},x}}(x,x')\) and \(K_{\sigma}^{(a)}(w,w')=\exp(-|w-w'|^2/\sigma))\) the \(a\) dimensional isotropic Gaussian kernel of variance \(\sigma\).
- Parameters:
t_sigma_1 ((float)) – variance of the kernel related to time coordinate of the kernel related to position \(\sigma_{\text{pos},t}\)
s_sigma_1 ((float)) – variance of the kernel related to space coordinate of the kernel related to position \(\sigma_{\text{pos},x}\)
t_sigma_2 ((float)) – variance of the kernel related to time coordinate of the kernel related to direction \(\sigma_{\text{dir},t}\)
s_sigma_2 ((float)) – variance of the kernel related to space coordinate of the kernel related to direction \(\sigma_{\text{dir},x}\)
np_dtype ((_type_, optional):) – Defaults to np.float32.
- Returns:
- kernel function(X,mask_X,Y,mask_Y,b)-> array of the shape of b
\(K(X,Y)b\) where X and Y are array of size (n_samples,d+1), \(K(X,Y)\) is the kernel matrix \((k(x_i,y_j))\) and b is an array of shape (n_samples,d) with d the dimension of the problem
- TS_PCA.kernel.Velocity_TSLDDMM_Cauchy_Kernel(c_0, c_1, t_sigma_1, t_sigma_2, s_sigma)¶
Function related to the velocity TSLDDMM cauchy kernel defined as, using the notations of the paper “Shape analysis for time series” \(K_G((t,x),(t',x'))=\begin{pmatrix} c_0 K_{\text{time}}(t,t') & 0 \\ 0& c_1 K_{\text{space}}((t,x),(t',x'))\end{pmatrix}\) with \(K_{\text{time}}=K_{\sigma_{T,0}}^{(1)}(t,t')\), \(K_{\text{space}}=K_{\sigma_{T,1}}^{(1)}(t,t')K_{\sigma_{x}}^{(d)}(x,x')\) and \(K_{\sigma}^{(a)}(w,w')=\frac{1}{1+|w-w'|^2/\sigma)}\) the \(a\) dimensional isotropic Cauchy kernel of variance \(\sigma\).
- Parameters:
c_0 ((float)) – time scaling \(c_0\)
c_1 ((float)) – space scaling \(c_1\)
t_sigma_1 ((float)) – the time variance parameter 1 \(\sigma_{T,0}\)
t_sigma_2 ((float)) – the time variance parameter 2 \(\sigma_{T,1}\)
s_sigma ((float)) – the space variance parameter \(\sigma_{x}\)
- Returns:
- kernel function(X,mask_X,Y,mask_Y,b)-> array of the shape of b
\(K_G(X,Y)b\) where X and Y are array of size (n_samples,d+1), \(K(X,Y)\) is the kernel matrix \((k(x_i,y_j))\) and b is an array of shape (d,) with d the dimension of the problem
- TS_PCA.kernel.Velocity_TSLDDMM_Gaussian_Kernel(c_0, c_1, t_sigma_1, t_sigma_2, s_sigma)¶
Function related to the velocity TSLDDMM gaussian kernel defined as, using the notations of the paper “Shape analysis for time series” \(K_G((t,x),(t',x'))=\begin{pmatrix} c_0 K_{\text{time}}(t,t') & 0 \\ 0& c_1 K_{\text{space}}((t,x),(t',x'))\end{pmatrix}\) with \(K_{\text{time}}=K_{\sigma_{T,0}}^{(1)}(t,t')\), \(K_{\text{space}}=K_{\sigma_{T,1}}^{(1)}(t,t')K_{\sigma_{x}}^{(d)}(x,x')\) and \(K_{\sigma}^{(a)}(w,w')=\exp(-|w-w'|^2/\sigma))\) the \(a\) dimensional isotropic Gaussian kernel of variance \(\sigma\).
- Parameters:
c_0 ((float)) – time scaling \(c_0\)
c_1 ((float)) – space scaling \(c_1\)
t_sigma_1 ((float)) – the time variance parameter 1 \(\sigma_{T,0}\)
t_sigma_2 ((float)) – the time variance parameter 2 \(\sigma_{T,1}\)
s_sigma ((float)) – the space variance parameter \(\sigma_{x}\)
- Returns:
- kernel function(X,mask_X,Y,mask_Y,b)-> array of the shape of b
\(K_G(X,Y)b\) where X and Y are array of size (n_samples,d+1), \(K(X,Y)\) is the kernel matrix \((k(x_i,y_j))\) and b is an array of shape (d,) with d the dimension of the problem