class_docstr: Performs temporal random walks on the given graph. The graph should contain numerical edge
  weights that correspond to the time at which the edge was created. Exact units are not relevant
  for the algorithm, only the relative differences (e.g. seconds, days, etc).
  
  .. seealso::
  
     Example using this random walk: `link prediction with CTDNE <https://stellargraph.readthedocs.io/en/stable/demos/link-prediction/ctdne-link-prediction.html>`__
  
     Related functionality: other random walks: :class:`.UniformRandomWalk`, :class:`.BiasedRandomWalk`, :class:`.UniformRandomMetaPathWalk`.
  
  Args:
      graph (StellarGraph): Graph to traverse
      cw_size (int, optional): Size of context window. Also used as the minimum walk length,
          since a walk must generate at least 1 context window for it to be useful.
      max_walk_length (int, optional): Maximum length of each random walk. Should be greater
          than or equal to the context window size.
      initial_edge_bias (str, optional): Distribution to use when choosing a random
          initial temporal edge to start from. Available options are:
  
          * None (default) - The initial edge is picked from a uniform distribution.
          * "exponential" - Heavily biased towards more recent edges.
  
      walk_bias (str, optional): Distribution to use when choosing a random
          neighbour to walk through. Available options are:
  
          * None (default) - Neighbours are picked from a uniform distribution.
          * "exponential" - Exponentially decaying probability, resulting in a bias towards shorter time gaps.
  
      p_walk_success_threshold (float, optional): Lower bound for the proportion of successful
          (i.e. longer than minimum length) walks. If the 95% percentile of the
          estimated proportion is less than the provided threshold, a RuntimeError
          will be raised. The default value of 0.01 means an error is raised if less than 1%
          of the attempted random walks are successful. This parameter exists to catch any
          potential situation where too many unsuccessful walks can cause an infinite or very
          slow loop.
      seed (int, optional): Random number generator seed.
class_docstr_tok: ["Performs","temporal","random","walks","on","the","given","graph",".","The","graph","should","contain","numerical","edge","weights","that","correspond","to","the","time","at","which","the","edge","was","created",".","Exact","units","are","not","relevant","for","the","algorithm",",","only","the","relative","differences","(","e.g",".","seconds",",","days",",","etc",")",".","..","seealso",":",":","Example","using","this","random","walk",":","`","link","prediction","with","CTDNE","<","https",":","\/\/stellargraph.readthedocs.io\/en\/stable\/demos\/link-prediction\/ctdne-link-prediction.html",">","`","__","Related","functionality",":","other","random","walks",":",":","class",":","`",".UniformRandomWalk","`",",",":","class",":","`",".BiasedRandomWalk","`",",",":","class",":","`",".UniformRandomMetaPathWalk","`",".","Args",":","graph","(","StellarGraph",")",":","Graph","to","traverse","cw_size","(","int",",","optional",")",":","Size","of","context","window",".","Also","used","as","the","minimum","walk","length",",","since","a","walk","must","generate","at","least","1","context","window","for","it","to","be","useful",".","max_walk_length","(","int",",","optional",")",":","Maximum","length","of","each","random","walk",".","Should","be","greater","than","or","equal","to","the","context","window","size",".","initial_edge_bias","(","str",",","optional",")",":","Distribution","to","use","when","choosing","a","random","initial","temporal","edge","to","start","from",".","Available","options","are",":","*","None","(","default",")","-","The","initial","edge","is","picked","from","a","uniform","distribution",".","*","``","exponential","''","-","Heavily","biased","towards","more","recent","edges",".","walk_bias","(","str",",","optional",")",":","Distribution","to","use","when","choosing","a","random","neighbour","to","walk","through",".","Available","options","are",":","*","None","(","default",")","-","Neighbours","are","picked","from","a","uniform","distribution",".","*","``","exponential","''","-","Exponentially","decaying","probability",",","resulting","in","a","bias","towards","shorter","time","gaps",".","p_walk_success_threshold","(","float",",","optional",")",":","Lower","bound","for","the","proportion","of","successful","(","i.e",".","longer","than","minimum","length",")","walks",".","If","the","95","%","percentile","of","the","estimated","proportion","is","less","than","the","provided","threshold",",","a","RuntimeError","will","be","raised",".","The","default","value","of","0.01","means","an","error","is","raised","if","less","than","1","%","of","the","attempted","random","walks","are","successful",".","This","parameter","exists","to","catch","any","potential","situation","where","too","many","unsuccessful","walks","can","cause","an","infinite","or","very","slow","loop",".","seed","(","int",",","optional",")",":","Random","number","generator","seed","."]
code: def _exp_biases(self, times, t_0, decay):
      # t_0 assumed to be smaller than all time values
      return softmax(
          t_0 - np.array(times) if decay else np.array(times) - t_0
      )
  
imports: import numpy
  import warnings
  from collections import defaultdict, deque
  from scipy import stats
  from scipy.special import softmax
  from ..core.schema import GraphSchema
  from ..core.graph import StellarGraph
  from ..core.utils import is_real_iterable
  from ..core.validation import require_integer_in_range, comma_sep
  from ..random import random_state
  from abc import ABC, abstractmethod
label_desc: Use image node_id 4 for calling the TemporalRandomWalk obj's underlying member method code with example usage: obj._exp_biases(times, t_0, decay) and returns: softmax