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 resultingDirichletDistributionas aNaturalPosteriorNetworkRepresentation, which letsdecompose()auto-route the output toNaturalPosteriorDecomposition.Initialize the representer with a predictor.
- Parameters:
predictor – The predictor to be used for building representations.
- 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.