parameters: (self)
return_statement: return math.exp(self._sum_metric / self._num_inst)
docstring: r"""
          Returns the current evaluation result.
  
          Returns:
              numpy.float64. The computed result.
  
          Raises:
              RuntimeError: If the sample size is 0.
docstring_summary: r"""
          Returns the current evaluation result.
docstring_tokens: r Returns the current evaluation result .
function: def eval(self):
          r"""
          Returns the current evaluation result.
  
          Returns:
              numpy.float64. The computed result.
  
          Raises:
              RuntimeError: If the sample size is 0.
          """
          if self._num_inst == 0:
              raise RuntimeError("The 'Perplexity' can not be calculated, because the number of samples is 0, please "
                                 "check whether has called update method before calling eval method.")
  
          return math.exp(self._sum_metric / self._num_inst)
function_tokens: def eval ( self ) : if self . _num_inst == 0 : raise RuntimeError ( "The 'Perplexity' can not be calculated, because the number of samples is 0, please " "check whether has called update method before calling eval method." ) return math . exp ( self . _sum_metric / self . _num_inst )