Skip to content

Commit 32a1e68

Browse files
committed
Added missing kernelmatrix function for piecewisepolynomial
1 parent d57ab6b commit 32a1e68

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/basekernels/piecewisepolynomial.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,17 @@ function kernelmatrix(
5252
return map(r->_piecewisepolynomial(κ, r, j), pairwise(metric(κ), X; dims=obsdim))
5353
end
5454

55+
function kernelmatrix(
56+
κ::PiecewisePolynomialKernel{V},
57+
X::AbstractMatrix,
58+
Y::AbstractMatrix;
59+
obsdim::Int = defaultobs
60+
) where {V}
61+
j = div(size(X, feature_dim(obsdim)), 2) + V + 1
62+
return map(r->_piecewisepolynomial(κ, r, j), pairwise(metric(κ), X, Y; dims=obsdim))
63+
end
64+
65+
5566
function _kernelmatrix::PiecewisePolynomialKernel{V}, X, Y, obsdim) where {V}
5667
j = div(size(X, feature_dim(obsdim)), 2) + V + 1
5768
return map(r->_piecewisepolynomial(κ, r, j), pairwise(metric(κ), X, Y; dims=obsdim))

0 commit comments

Comments
 (0)