JuliaStats / StatsModels.jl

Specifying, fitting, and evaluating statistical models in Julia
248 stars 30 forks source link

Distribution Term #135

Open Tokazama opened 5 years ago

Tokazama commented 5 years ago

Are there any plans to create a DistributionTerm and if so is this the place to get that rolling or would that be a separate package like DistributionModels.jl?

oxinabox commented 5 years ago

Please tell me more about how this would work, and what properties it would have

Tokazama commented 5 years ago

I was thinking something like

struct DistributionTerm <: AbstractTerm
    term::AbstractTerm
    dist::Distribution
end

Where formula syntax may be @formula(y ~ x, x ~ Normal()).

Models that utilize posterior probabilities could use the entire term and if a user mistakenly puts it in a linear model it would still have the default term information.

There are a lot of smaller details to consider, but at at this point there's an explosion of probabilistic programming going on. It would be nice if they could start to rely on a common formula syntax.