Recover MLE fit parameters in vector form

,

Suppose I fit some data

using Distributions, Random;
DGP_True = LogNormal(0,1);
Random.seed!(123);
const d_train = rand(DGP_True, 1_000);
D1=Distributions.fit_mle(LogNormal, d_train)

#Gives a fit distribution
julia> D1
LogNormal{Float64}(μ=0.03421345999528483, σ=0.9966633047846717)

Question: how can I recover the fit parameters from D1 in vector form?
ie: [μ=0.03421345999528483, σ=0.9966633047846717]
or: ie: [0.03421345999528483, 0.9966633047846717]

try this

julia> temp = [D1.μ, D1.σ]

1 Like

Thanks but I’m looping over 52 distributions. Some have 1 parameters, others 2, 3, 4.
I want some function where f(D1) automatically gives me the fit params.
So: f(D1)=[μ=0.03421345999528483, σ=0.9966633047846717]
Or: f(D1)= [0.03421345999528483, 0.9966633047846717]

Does params(D1) work for you?

1 Like

Thank you! I totally forgot params(d) works on fitted distributions.