@@ -1761,16 +1761,16 @@ class _OrderedProbit(Categorical):
1761
1761
rv_op = categorical
1762
1762
1763
1763
@classmethod
1764
- def dist (cls , eta , cutpoints , * args , ** kwargs ):
1764
+ def dist (cls , eta , cutpoints , sigma = 1 , * args , ** kwargs ):
1765
1765
eta = at .as_tensor_variable (floatX (eta ))
1766
1766
cutpoints = at .as_tensor_variable (cutpoints )
1767
1767
1768
1768
probits = at .shape_padright (eta ) - cutpoints
1769
1769
_log_p = at .concatenate (
1770
1770
[
1771
- at .shape_padright (normal_lccdf (0 , 1 , probits [..., 0 ])),
1772
- log_diff_normal_cdf (0 , 1 , probits [..., :- 1 ], probits [..., 1 :]),
1773
- at .shape_padright (normal_lcdf (0 , 1 , probits [..., - 1 ])),
1771
+ at .shape_padright (normal_lccdf (0 , sigma , probits [..., 0 ])),
1772
+ log_diff_normal_cdf (0 , sigma , probits [..., :- 1 ], probits [..., 1 :]),
1773
+ at .shape_padright (normal_lcdf (0 , sigma , probits [..., - 1 ])),
1774
1774
],
1775
1775
axis = - 1 ,
1776
1776
)
@@ -1816,12 +1816,12 @@ class OrderedProbit:
1816
1816
The length K - 1 array of cutpoints which break :math:`\eta` into
1817
1817
ranges. Do not explicitly set the first and last elements of
1818
1818
:math:`c` to negative and positive infinity.
1819
+ sigma: float, default 1.0
1820
+ Standard deviation of the probit function.
1819
1821
compute_p: boolean, default True
1820
1822
Whether to compute and store in the trace the inferred probabilities of each categories,
1821
1823
based on the cutpoints' values. Defaults to True.
1822
1824
Might be useful to disable it if memory usage is of interest.
1823
- sigma: float
1824
- The standard deviation of probit function.
1825
1825
Example
1826
1826
--------
1827
1827
.. code:: python
0 commit comments