JuliaAI / ScientificTypesBase.jl

Base interface for dispatching on the "scientific" type of data instead of the machine type
MIT License
9 stars 4 forks source link

Proposal to add Sampleable{K} and Distribution{K} scitypes #9

Closed ablaom closed 3 years ago

ablaom commented 4 years ago

Sampleable{K} - represents statistical objects that can be sampled in some way, where the objects sampled are guaranteed to have scientific type K.

Distribution{K} <: Sampleable{K} - represents sampleable objects with "inspectable" probability measures.

I don't propose ScientificTypes defines "inspectable", but a particular scitype convention may want to clarify this in terms of the interface such objects implement. So, for example, given the current state of Julia's stats ecosystem, a reasonable choice might be:

"inspectable" = "K is Finite or Count and the objects implement pdf as the probability mass function, or K is Continuous or AbstractArray{<:Continuous} and the objects implement pdf as the probability distribution function." although this rules out mixed type pdfs. This would cover all the Distributions.Distribution objects plus MLJ's UnivariateFinite.

ablaom commented 4 years ago

"inspectable" = "K is Finite or Count and the objects implement pdf as the probability mass function, or K is Continuous or AbstractArray{<:Continuous} and the objects implement pdf as the probability distribution function." although this rules out mixed type pdfs. This would cover all the Distributions.Distribution objects plus MLJ's UnivariateFinite.

Not general enough, as I have forgotten about multivariate distributions. In any case, I think this is an issue for debate in MLJScientificTypes (or other convention).