class_docstr: Nested Multinomial Logit with Random Utility 2 parameterization
  
  
  Parameters
  ----------
  endog : ndarray
      not used in this part
  exog : dict_like
      dictionary access to data where keys correspond to branch and leaf
      names. The values are the data arrays for the exog in that node.
  tree : nested tuples and lists
      each branch, tree or subtree, is defined by a tuple
      (branch_name, [subtree1, subtree2, ..., subtreek])
      Bottom branches have as subtrees the list of leaf names.
  paramsind : dictionary
      dictionary that maps branch and leaf names to the names of parameters,
      the coefficients for exogs)
  
  Methods
  -------
  get_probs
  
  Attributes
  ----------
  branches
  leaves
  paramsnames
  parinddict
  
  Notes
  -----
  endog needs to be encoded so it is consistent with self.leaves, which
  defines the columns for the probability array. The ordering in leaves is
  determined by the ordering of the tree.
  In the dummy encoding of endog, the columns of endog need to have the
  same order as self.leaves. In the integer encoding, the integer for a
  choice has to correspond to the index in self.leaves.
  (This could be made more robust, by handling the endog encoding internally
  by leaf names, if endog is defined as categorical variable with
  associated category level names.)
docstr: obtain the probability array given an array of parameters
  
  This is the function that can be called by loglike or other methods
  that need the probabilities as function of the params.
  
  Parameters
  ----------
  params : 1d array, (nparams,)
      coefficients and tau that parameterize the model. The required
      length can be obtained by nparams. (and will depend on the number
      of degenerate leaves - not yet)
  
  Returns
  -------
  probs : ndarray, (nobs, nchoices)
      probabilities for all choices for each observation. The order
      is available by attribute leaves. See note in docstring of class
code: def get_probs(self, params):
      """
      obtain the probability array given an array of parameters
  
      This is the function that can be called by loglike or other methods
      that need the probabilities as function of the params.
  
      Parameters
      ----------
      params : 1d array, (nparams,)
          coefficients and tau that parameterize the model. The required
          length can be obtained by nparams. (and will depend on the number
          of degenerate leaves - not yet)
  
      Returns
      -------
      probs : ndarray, (nobs, nchoices)
          probabilities for all choices for each observation. The order
          is available by attribute leaves. See note in docstring of class
  
  
  
      """
      self.recursionparams = params
      self.calc_prob(self.tree)
      probs_array = np.array([self.probs[leaf] for leaf in self.leaves])
      return probs_array
  
file_path: statsmodels/statsmodels/sandbox/regression/treewalkerclass.py
imports: from statsmodels.compat.python import lrange
  from pprint import pprint
  import numpy
label_desc: Use image node_id 2 for calling the RU2NMNL obj's underlying member method code with example usage: obj.get_probs(params) and returns: probs_array