PosteriorNetworkRepresenter¶
- class probly.method.posterior_network.PosteriorNetworkRepresenter(predictor: Predictor[In, Out], *_args: CtrIn.args, **_kwargs: CtrIn.kwargs)[source]¶
Bases:
Representer[Any,In,PosteriorNetworkRepresentation,PosteriorNetworkRepresentation],Generic[In]Representer for Posterior Network predictors.
Calls
predict()on the wrapped PostNet predictor and marks the resultingDirichletDistributionas aPosteriorNetworkRepresentation, which letsdecompose()auto-route the output toPosteriorNetworkDecomposition.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) PosteriorNetworkRepresentation[source]¶
Return a marked PostNet representation for a given input.