pangolin.interface.Interface.bernoulli_logit#
- Interface.bernoulli_logit(theta)[source]#
Create a
BernoulliLogitdistributed RV.All arguments must either be scalar or mutually broadcastable according to the broadcasting policy selected when constructing the interface or within an overload block.
- Parameters:
theta (RVLike) – logit of probability (unbounded).
- Returns:
ir.RV – RV whose operation is
pangolin.ir.BernoulliLogitwhen all parents are scalar, or one or more nestedpangolin.ir.VMapoperations around that type when broadcasting is required. The operation has 1 parent.- Return type:
Examples
>>> pi = Interface() >>> x = pi.bernoulli_logit(0.1) >>> x RV(BernoulliLogit(), RV(Constant(0.1))) >>> x.shape () >>> y = pi.bernoulli_logit([0.1, 0.1]) >>> y RV(VMap(BernoulliLogit(), [0], 2), RV(Constant([0.1,0.1]))) >>> y.shape (2,)
See also