class_docstr: Stopping ratio logistic distribution.
  
  The StoppingRatioLogistic distribution is parameterized by a location and a
  set of non-decreasing cutpoints. It is defined over the integers
  `{0, 1, ..., K}` for `K` non-decreasing cutpoints.
  
  The difference to the OrderedLogistic is that categories can only be reached
  one after another, i.e., sequentially. Specifically, while the probability
  of an ordinal random variable `X` to be in category `c`
  for the OrderedLogistic reads as
  
  ```none
  P(X = c; cutpoints, loc) = P(X > c - 1) - P(X > c)
                       = sigmoid(loc - concat([-inf, cutpoints, inf])[c]) -
                         sigmoid(loc - concat([-inf, cutpoints, inf])[c + 1])
  ```
  
  the StoppingRatioLogistic distribution models the probability of an ordinal
  random variable `X` to be in category `c` given `X >= c` as
  
  ```none
  P(X = c; X >= c, cutpoints, loc) = sigmoid(cutpoints[c] - loc)
  ```
  
  The sequential mechanism for `X` starts in category `c = 0` where a binary
  decision between `c = 0` and `c > 0` is made:
  
  ```none
  P(X = 0; cutpoints, loc) = sigmoid(cutpoints[0] - loc)
  ```
  
  If `X = 0`, the process stops. Otherwise the process continues with
  
  ```none
  P(X = 1; X >= 1, cutpoints, loc) = sigmoid(cutpoints[1] - loc)
  ```
  
  The process continues to move on to higher level categories until it stops at
  some category `X = c`.
  
  This distribution is useful for ordinal variables where lower categories
  need to be reached first, for instance modelling the degree of a person
  where the categories are `[Bachelor, Master, PhD]`. In order to obtain a PhD
  title, first the degrees `Bachelor` and `Master` need to be reached.
  
  #### Mathematical Details
  
  The probability mass function (pmf) is
  
  ```none
  pmf(x; cutpoints, loc) =
                    sigmoid(cutpoints[x] - loc) *
                    prod_{s=0}^{x - 1} (1 - sigmoid(cutpoints[s] - loc))
  ```
  
  where `loc` is the location of a latent logistic distribution and
  `cutpoints` define points to split up this latent distribution.
  
  #### Examples
  
  To expand on the `[Bachelor, Master, PhD]` from above, create a distribution
  of three ordered categories:
  
  ```python
  import tensorflow_probability as tfp
  tfd = tfp.distributions
  
  dist = tfd.StoppingRatioLogistic(cutpoints=[-1.0, 1.0], loc=0.)
  
  dist.categorical_probs()
  # ==> array([0.2689414  0.53444666 0.19661193], dtype=float32)
  ```
  
  Here, the probability of finishing one's education with a Bachelor would be
  approx. 26% in this example, while the probability of continuing to pursue
  a Master's would be approx. 53% and the probability of even attaining a PhD
  would be 20%.
  
  Some further functionality:
  
  ```python
  dist = tfd.StoppingRatioLogistic(cutpoints=[-2., 0., 2.], loc=0.)
  
  dist.prob([0, 3])
  # ==> array([0.11920291, 0.05249681], dtype=float32)
  
  dist.log_prob(1)
  # ==> -0.82007515
  
  dist.sample(3)
  # ==> array([2, 1, 2], dtype=int32)
  ```
class_docstr_tok: ["Stopping","ratio","logistic","distribution",".","The","StoppingRatioLogistic","distribution","is","parameterized","by","a","location","and","a","set","of","non-decreasing","cutpoints",".","It","is","defined","over","the","integers","`","{","0",",","1",",","...",",","K","}","`","for","`","K","`","non-decreasing","cutpoints",".","The","difference","to","the","OrderedLogistic","is","that","categories","can","only","be","reached","one","after","another",",","i.e.",",","sequentially",".","Specifically",",","while","the","probability","of","an","ordinal","random","variable","`","X","`","to","be","in","category","`","c","`","for","the","OrderedLogistic","reads","as","``","`","none","P","(","X","=","c",";","cutpoints",",","loc",")","=","P","(","X",">","c","-","1",")","-","P","(","X",">","c",")","=","sigmoid","(","loc","-","concat","(","[","-inf",",","cutpoints",",","inf","]",")","[","c","]",")","-","sigmoid","(","loc","-","concat","(","[","-inf",",","cutpoints",",","inf","]",")","[","c","+","1","]",")","``","`","the","StoppingRatioLogistic","distribution","models","the","probability","of","an","ordinal","random","variable","`","X","`","to","be","in","category","`","c","`","given","`","X",">","=","c","`","as","``","`","none","P","(","X","=","c",";","X",">","=","c",",","cutpoints",",","loc",")","=","sigmoid","(","cutpoints","[","c","]","-","loc",")","``","`","The","sequential","mechanism","for","`","X","`","starts","in","category","`","c","=","0","`","where","a","binary","decision","between","`","c","=","0","`","and","`","c",">","0","`","is","made",":","``","`","none","P","(","X","=","0",";","cutpoints",",","loc",")","=","sigmoid","(","cutpoints","[","0","]","-","loc",")","``","`","If","`","X","=","0","`",",","the","process","stops",".","Otherwise","the","process","continues","with","``","`","none","P","(","X","=","1",";","X",">","=","1",",","cutpoints",",","loc",")","=","sigmoid","(","cutpoints","[","1","]","-","loc",")","``","`","The","process","continues","to","move","on","to","higher","level","categories","until","it","stops","at","some","category","`","X","=","c","`",".","This","distribution","is","useful","for","ordinal","variables","where","lower","categories","need","to","be","reached","first",",","for","instance","modelling","the","degree","of","a","person","where","the","categories","are","`","[","Bachelor",",","Master",",","PhD","]","`",".","In","order","to","obtain","a","PhD","title",",","first","the","degrees","`","Bachelor","`","and","`","Master","`","need","to","be","reached",".","#","#","#","#","Mathematical","Details","The","probability","mass","function","(","pmf",")","is","``","`","none","pmf","(","x",";","cutpoints",",","loc",")","=","sigmoid","(","cutpoints","[","x","]","-","loc",")","*","prod_","{","s=0","}","^","{","x","-","1","}","(","1","-","sigmoid","(","cutpoints","[","s","]","-","loc",")",")","``","`","where","`","loc","`","is","the","location","of","a","latent","logistic","distribution","and","`","cutpoints","`","define","points","to","split","up","this","latent","distribution",".","#","#","#","#","Examples","To","expand","on","the","`","[","Bachelor",",","Master",",","PhD","]","`","from","above",",","create","a","distribution","of","three","ordered","categories",":","``","`","python","import","tensorflow_probability","as","tfp","tfd","=","tfp.distributions","dist","=","tfd.StoppingRatioLogistic","(","cutpoints=","[","-1.0",",","1.0","]",",","loc=0",".",")","dist.categorical_probs","(",")","#","==",">","array","(","[","0.2689414","0.53444666","0.19661193","]",",","dtype=float32",")","``","`","Here",",","the","probability","of","finishing","one","'s","education","with","a","Bachelor","would","be","approx",".","26","%","in","this","example",",","while","the","probability","of","continuing","to","pursue","a","Master","'s","would","be","approx",".","53","%","and","the","probability","of","even","attaining","a","PhD","would","be","20","%",".","Some","further","functionality",":","``","`","python","dist","=","tfd.StoppingRatioLogistic","(","cutpoints=","[","-2.",",","0.",",","2",".","]",",","loc=0",".",")","dist.prob","(","[","0",",","3","]",")","#","==",">","array","(","[","0.11920291",",","0.05249681","]",",","dtype=float32",")","dist.log_prob","(","1",")","#","==",">","-0.82007515","dist.sample","(","3",")","#","==",">","array","(","[","2",",","1",",","2","]",",","dtype=int32",")","``","`"]
code: def _event_shape(self):
      return tf.TensorShape([])
  
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import ascending
  from tensorflow_probability.python.distributions import categorical
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.math import generic
label_desc: Use image node_id 10 for calling the StoppingRatioLogistic obj's underlying member method code with example usage: obj._event_shape() and returns: tf