HighDimensionalEconLab / DifferentiableStateSpaceModels.jl

MIT License
46 stars 1 forks source link

Cleanup interface for the D #101

Closed jlperla closed 2 years ago

jlperla commented 2 years ago

After #100 we can cleanup the interface for the diagonal matrix.

jlperla commented 2 years ago

And just to verify, it is important to create this as a MvNormal with a diagonal.

julia> MvNormal(Diagonal([0.1, 0.2])) |> typeof
ZeroMeanDiagNormal{Tuple{Base.OneTo{Int64}}} (alias for MvNormal{Float64, PDMats.PDiagMat{Float64, Array{Float64, 1}}, FillArrays.Zeros{Float64, 1, Tuple{Base.OneTo{Int64}}}})

Which has a very specialized type. If we wanted to backprop, then those tangent types should be easy as well.