We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spectral_mixture_kernel
Here is a MWE:
julia> v = ones(2); julia> rbf = rand(2); julia> cos = rand(2); julia> spectral_mixture_kernel(v, rbf', cos') Sum of 2 kernels: Product of 2 kernels: Squared Exponential Kernel (metric = Distances.Euclidean(0.0)) - Linear transform (size(A) = (1, 1)) - σ² = 1.0 Cosine Kernel (metric = Distances.Euclidean(0.0)) - Linear transform (size(A) = (1, 1)) Product of 2 kernels: Squared Exponential Kernel (metric = Distances.Euclidean(0.0)) - Linear transform (size(A) = (1, 1)) - σ² = 1.0 Cosine Kernel (metric = Distances.Euclidean(0.0)) - Linear transform (size(A) = (1, 1)) julia> @inferred spectral_mixture_kernel(v, rbf', cos') ERROR: return type KernelSum{Tuple{KernelProduct{Tuple{ScaledKernel{TransformedKernel{SqExponentialKernel{Distances.Euclidean}, LinearTransform{LinearAlgebra.Adjoint{Float64, SubArray{Float64, 1, LinearAlgebra.Adjoint{Float64, Vector{Float64}}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64}, true}}}}, Float64}, TransformedKernel{CosineKernel{Distances.Euclidean}, LinearTransform{LinearAlgebra.Adjoint{Float64, SubArray{Float64, 1, LinearAlgebra.Adjoint{Float64, Vector{Float64}}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64}, true}}}}}}, KernelProduct{Tuple{ScaledKernel{TransformedKernel{SqExponentialKernel{Distances.Euclidean}, LinearTransform{LinearAlgebra.Adjoint{Float64, SubArray{Float64, 1, LinearAlgebra.Adjoint{Float64, Vector{Float64}}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64}, true}}}}, Float64}, TransformedKernel{CosineKernel{Distances.Euclidean}, LinearTransform{LinearAlgebra.Adjoint{Float64, SubArray{Float64, 1, LinearAlgebra.Adjoint{Float64, Vector{Float64}}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64}, true}}}}}}}} does not match inferred return type Any Stacktrace: [1] error(s::String) @ Base ./error.jl:35 [2] top-level scope @ REPL[56]:1
The text was updated successfully, but these errors were encountered:
Now that I think about it, it makes sense. There is no way the size of the mixture can be inferred unless we would pass some static vectors or tuples.
Sorry, something went wrong.
StaticArrays
Successfully merging a pull request may close this issue.
Here is a MWE:
The text was updated successfully, but these errors were encountered: