class_docstr: Representation of a kernel-density estimate using Gaussian kernels.
  
  Parameters
  ----------
  dataset : array-like
      Datapoints to estimate from. In case of univariate data this is a 1-D
      array, otherwise a 2D array with shape (# of dims, # of data).
  bw_method : str, scalar or callable, optional
      The method used to calculate the estimator bandwidth.  This can be
      'scott', 'silverman', a scalar constant or a callable.  If a
      scalar, this will be used directly as `kde.factor`.  If a
      callable, it should take a `GaussianKDE` instance as only
      parameter and return a scalar. If None (default), 'scott' is used.
  
  Attributes
  ----------
  dataset : ndarray
      The dataset passed to the constructor.
  dim : int
      Number of dimensions.
  num_dp : int
      Number of datapoints.
  factor : float
      The bandwidth factor, obtained from `kde.covariance_factor`, with which
      the covariance matrix is multiplied.
  covariance : ndarray
      The covariance matrix of *dataset*, scaled by the calculated bandwidth
      (`kde.factor`).
  inv_cov : ndarray
      The inverse of *covariance*.
  
  Methods
  -------
  kde.evaluate(points) : ndarray
      Evaluate the estimated pdf on a provided set of points.
  kde(points) : ndarray
      Same as kde.evaluate(points)
class_docstr_tok: ["Representation","of","a","kernel-density","estimate","using","Gaussian","kernels",".","Parameters","--","--","--","--","--","dataset",":","array-like","Datapoints","to","estimate","from",".","In","case","of","univariate","data","this","is","a","1-D","array",",","otherwise","a","2D","array","with","shape","(","#","of","dims",",","#","of","data",")",".","bw_method",":","str",",","scalar","or","callable",",","optional","The","method","used","to","calculate","the","estimator","bandwidth",".","This","can","be","'scott","'",",","'silverman","'",",","a","scalar","constant","or","a","callable",".","If","a","scalar",",","this","will","be","used","directly","as","`","kde.factor","`",".","If","a","callable",",","it","should","take","a","`","GaussianKDE","`","instance","as","only","parameter","and","return","a","scalar",".","If","None","(","default",")",",","'scott","'","is","used",".","Attributes","--","--","--","--","--","dataset",":","ndarray","The","dataset","passed","to","the","constructor",".","dim",":","int","Number","of","dimensions",".","num_dp",":","int","Number","of","datapoints",".","factor",":","float","The","bandwidth","factor",",","obtained","from","`","kde.covariance_factor","`",",","with","which","the","covariance","matrix","is","multiplied",".","covariance",":","ndarray","The","covariance","matrix","of","*","dataset","*",",","scaled","by","the","calculated","bandwidth","(","`","kde.factor","`",")",".","inv_cov",":","ndarray","The","inverse","of","*","covariance","*",".","Methods","--","--","--","-","kde.evaluate","(","points",")",":","ndarray","Evaluate","the","estimated","pdf","on","a","provided","set","of","points",".","kde","(","points",")",":","ndarray","Same","as","kde.evaluate","(","points",")"]
code: def scotts_factor(self):
      return np.power(self.num_dp, -1.0 / (self.dim + 4))
  
imports: import functools
  from numbers import Number
  import numpy
  from matplotlib import _api, _docstring, cbook
label_desc: Use image node_id 2 for calling the GaussianKDE obj's underlying member method code with example usage: obj.scotts_factor() and returns: np