Skip to content

Sampling methods beyond non-uniform distributions #903

@ngeiswei

Description

@ngeiswei

Currently we have 3 uniform samplers in MeTTa

random-int
random-float
flip (which is temporary, and should probably be replaced by #779)

It would be nice if MeTTa had access to a standard-like library offering more sophisticated samplers based on non-uniform distributions such as Gaussian, Gamma and Beta. These samplers do not have to be in the standard library per say (as in stdlib.metta, BTW, maybe it should be renamed prelude.metta, like in Haskell, meaning it is imported in every MeTTa program by default), but it should be easy to access and part of a "standard library of modules".

One can of course do non-uniform sampling via Python, but given the AI centric nature of MeTTa, I believe it makes sense to have that
directly in a standard module.

BTW, such module could offer more than sampling, one could for instance get the mean, the mode, the standard deviation or any standard statistics defined for a particular distribution. A great example of probability distribution module can be found in the C++ Distribution STL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions