You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@assertcheck_dims(K,X,Y,obsdim) "Dimensions of the target array are not consistent with X and Y"
30
+
@assertcheck_dims(K,X,Y,feature_dim(obsdim),obsdim)"Dimensions $(size(K))of the target array K are not consistent with X ($(size(X))) and Y ($(size(Y)))"
Calculate the base matrix of `X` and `Y` with respect to kernel `κ`.
76
+
`obsdim=1` means the matrices `X` and `Y` have sizes #samples x #dimension
77
+
`obsdim=2` means the matrices `X` and `Y` have size #dimension x #samples
76
78
"""
77
79
functionkernelmatrix(
78
80
κ::Kernel{T},
79
81
X::AbstractMatrix{T₁},
80
82
Y::AbstractMatrix{T₂};
81
83
obsdim=defaultobs
82
84
) where {T,T₁<:Real,T₂<:Real}
85
+
@assertcheck_dims(X,Y,feature_dim(obsdim),obsdim) "X ($(size(X))) and Y ($(size(Y))) do not have the same number of features on the dimension obsdim : $(feature_dim(obsdim))"
83
86
K =map(x->kappa(κ,x),pairwise(metric(κ),transform(κ,X,obsdim),transform(κ,Y,obsdim),dims=obsdim))
0 commit comments