NaturalPosteriorNetworkRepresenter

class probly.method.natural_posterior_network.NaturalPosteriorNetworkRepresenter(predictor: Predictor[In, Out], *_args: CtrIn.args, **_kwargs: CtrIn.kwargs)[source]

Bases: Representer[Any, In, NaturalPosteriorNetworkRepresentation, NaturalPosteriorNetworkRepresentation], Generic[In]

Representer for Natural Posterior Network predictors.

Calls predict() on the wrapped NatPN predictor and marks the resulting DirichletDistribution as a NaturalPosteriorNetworkRepresentation, which lets decompose() auto-route the output to NaturalPosteriorDecomposition.

Initialize the representer with a predictor.

Parameters:

predictor – The predictor to be used for building representations.

__call__(*args: In.args, **kwargs: In.kwargs) → R[source]

Alias for the represent method.

predict(*args: In.args, **kwargs: In.kwargs) → R[source]

Predict the representation for a given input.

represent(*args: In.args, **kwargs: In.kwargs) → NaturalPosteriorNetworkRepresentation[source]

Return a marked NatPN representation for a given input.

Examples using probly.method.natural_posterior_network.NaturalPosteriorNetworkRepresenter

Natural Posterior Network on Two Moons

Natural Posterior Network on Two Moons