parameters: (self, points)
return_statement: return result
docstring: Evaluate the estimated pdf on a set of points.
  
          Parameters
          ----------
          points : (# of dimensions, # of points)-array
              Alternatively, a (# of dimensions,) vector can be passed in and
              treated as a single point.
  
          Returns
          -------
          values : (# of points,)-array
              The values at each point.
  
          Raises
          ------
          ValueError : if the dimensionality of the input points is different than
                       the dimensionality of the KDE.
docstring_summary: Evaluate the estimated pdf on a set of points.
docstring_tokens: Evaluate the estimated pdf on a set of points .
function: def evaluate(self, points):
          """Evaluate the estimated pdf on a set of points.
  
          Parameters
          ----------
          points : (# of dimensions, # of points)-array
              Alternatively, a (# of dimensions,) vector can be passed in and
              treated as a single point.
  
          Returns
          -------
          values : (# of points,)-array
              The values at each point.
  
          Raises
          ------
          ValueError : if the dimensionality of the input points is different than
                       the dimensionality of the KDE.
  
          """
          points = atleast_2d(points)
  
          d, m = points.shape
          if d != self.d:
              if d == 1 and m == self.d:
                  # points was passed in as a row vector
                  points = reshape(points, (self.d, 1))
                  m = 1
              else:
                  msg = "points have dimension %s, dataset has dimension %s" % (d,
                      self.d)
                  raise ValueError(msg)
  
          result = zeros((m,), dtype=float)
  
          if m >= self.n:
              # there are more points than data, so loop over data
              for i in range(self.n):
                  diff = self.dataset[:, i, newaxis] - points
                  tdiff = dot(self.inv_cov, diff)
                  energy = sum(diff*tdiff,axis=0) / 2.0
                  result = result + exp(-energy)
          else:
              # loop over points
              for i in range(m):
                  diff = self.dataset - points[:, i, newaxis]
                  tdiff = dot(self.inv_cov, diff)
                  energy = sum(diff * tdiff, axis=0) / 2.0
                  result[i] = sum(exp(-energy), axis=0)
  
          result = result / self._norm_factor
  
          return result
function_tokens: def evaluate ( self , points ) : points = atleast_2d ( points ) d , m = points . shape if d != self . d : if d == 1 and m == self . d : # points was passed in as a row vector points = reshape ( points , ( self . d , 1 ) ) m = 1 else : msg = "points have dimension %s, dataset has dimension %s" % ( d , self . d ) raise ValueError ( msg ) result = zeros ( ( m , ) , dtype = float ) if m >= self . n : # there are more points than data, so loop over data for i in range ( self . n ) : diff = self . dataset [ : , i , newaxis ] - points tdiff = dot ( self . inv_cov , diff ) energy = sum ( diff * tdiff , axis = 0 ) / 2.0 result = result + exp ( - energy ) else : # loop over points for i in range ( m ) : diff = self . dataset - points [ : , i , newaxis ] tdiff = dot ( self . inv_cov , diff ) energy = sum ( diff * tdiff , axis = 0 ) / 2.0 result [ i ] = sum ( exp ( - energy ) , axis = 0 ) result = result / self . _norm_factor return result