parameters: (self, sample_size=0, h=0.01, hess_tol=0.000001, tmax=15)
docstring: Routine that selects points from the sample and calculates the Hessian 3rd-order tensor in
          them by calling richardson_hessian.
  
  
          **USAGE:**
          analysis._get_hessian([sample_size=100, h=0.01, hess_tol=0.000001])
  
          * sample_size: number of points from sample to calculate hessian at. If set to 0, all points
            will be used. Defaults to 0.
          * The rest of parameters are passed to _richardson_hessian.
  
  
          **The following parameters are stored as attributes:**
  
          * analysis.hess_npoints: number of points where hessian is computed.
          * analysis.hess_points[hess_npoints]: indexes of these points in sample list.
          * analysis.hess[hess_npoints][fitness dimension][continuous search dimension][continuous
            search dimension]: hessian 3rd-order tensors computed.
  
  
          **NOTE:** all integer variables are ignored for this test.
docstring_summary: Routine that selects points from the sample and calculates the Hessian 3rd-order tensor in
          them by calling richardson_hessian.
docstring_tokens: Routine that selects points from the sample and calculates the Hessian 3rd - order tensor in them by calling richardson_hessian .
function: def _get_hessian(self, sample_size=0, h=0.01, hess_tol=0.000001, tmax=15):
          """
          Routine that selects points from the sample and calculates the Hessian 3rd-order tensor in
          them by calling richardson_hessian.
  
  
          **USAGE:**
          analysis._get_hessian([sample_size=100, h=0.01, hess_tol=0.000001])
  
          * sample_size: number of points from sample to calculate hessian at. If set to 0, all points
            will be used. Defaults to 0.
          * The rest of parameters are passed to _richardson_hessian.
  
  
          **The following parameters are stored as attributes:**
  
          * analysis.hess_npoints: number of points where hessian is computed.
          * analysis.hess_points[hess_npoints]: indexes of these points in sample list.
          * analysis.hess[hess_npoints][fitness dimension][continuous search dimension][continuous
            search dimension]: hessian 3rd-order tensors computed.
  
  
          **NOTE:** all integer variables are ignored for this test.
          """
          if self.npoints == 0:
              raise ValueError(
                  "analysis._get_hessian: sampling first is necessary")
          try:
              from numpy.random import randint
          except ImportError:
              raise ImportError(
                  "analysis._get_hessian needs numpy to run. Is it installed?")
          if sample_size <= 0 or sample_size >= self.npoints:
              self.hess_points = range(self.npoints)
              self.hess_npoints = self.npoints
  
          else:
              self.hess_npoints = sample_size
              # avoid repetition?
              self.hess_points = [randint(self.npoints)
                                  for i in range(sample_size)]
  
          self.hess = []
          for i in self.hess_points:
              self.hess.append(
                  self._richardson_hessian(x=self.points[i], h=h, hess_tol=hess_tol, tmax=tmax))
function_tokens: def _get_hessian ( self , sample_size = 0 , h = 0.01 , hess_tol = 0.000001 , tmax = 15 ) : if self . npoints == 0 : raise ValueError ( "analysis._get_hessian: sampling first is necessary" ) try : from numpy . random import randint except ImportError : raise ImportError ( "analysis._get_hessian needs numpy to run. Is it installed?" ) if sample_size <= 0 or sample_size >= self . npoints : self . hess_points = range ( self . npoints ) self . hess_npoints = self . npoints else : self . hess_npoints = sample_size # avoid repetition? self . hess_points = [ randint ( self . npoints ) for i in range ( sample_size ) ] self . hess = [ ] for i in self . hess_points : self . hess . append ( self . _richardson_hessian ( x = self . points [ i ] , h = h , hess_tol = hess_tol , tmax = tmax ) )