class_docstr: Base probability distribution.
docstr: a-norm of pdf, defaults to 2-norm.
  
  computes a-norm of the entry marginal pdf, i.e.,
  :math:`\mathbb{E}[p_X(X)^{a-1}] = \int p(x)^a dx`,
  where :math:`X` is a random variable distributed according to the entry marginal
  of `self`, and :math:`p_X` is its pdf
  
  Parameters
  ----------
  a: int or float, optional, default=2
  
  Returns
  -------
  pd.DataFrame with same rows and columns as `self`
  each entry is :math:`\mathbb{E}[p_X(X)^{a-1}] = \int p(x)^a dx`, see above
docstr_tok: ["a-norm","of","pdf",",","defaults","to","2-norm",".","computes","a-norm","of","the","entry","marginal","pdf",",","i.e.",",",":","math",":","`","\\mathbb","{","E","}","[","p_X","(","X",")","^","{","a-1","}","]","=","\\int","p","(","x",")","^a","dx","`",",","where",":","math",":","`","X","`","is","a","random","variable","distributed","according","to","the","entry","marginal","of","`","self","`",",","and",":","math",":","`","p_X","`","is","its","pdf","Parameters","--","--","--","--","--","a",":","int","or","float",",","optional",",","default=2","Returns","--","--","--","-","pd.DataFrame","with","same","rows","and","columns","as","`","self","`","each","entry","is",":","math",":","`","\\mathbb","{","E","}","[","p_X","(","X",")","^","{","a-1","}","]","=","\\int","p","(","x",")","^a","dx","`",",","see","above"]
code: def pdfnorm(self, a=2):
      r"""a-norm of pdf, defaults to 2-norm.
  
      computes a-norm of the entry marginal pdf, i.e.,
      :math:`\mathbb{E}[p_X(X)^{a-1}] = \int p(x)^a dx`,
      where :math:`X` is a random variable distributed according to the entry marginal
      of `self`, and :math:`p_X` is its pdf
  
      Parameters
      ----------
      a: int or float, optional, default=2
  
      Returns
      -------
      pd.DataFrame with same rows and columns as `self`
      each entry is :math:`\mathbb{E}[p_X(X)^{a-1}] = \int p(x)^a dx`, see above
      """
      # special case: if a == 1, this is just the integral of the pdf, which is 1
      if a == 1:
          return pd.DataFrame(
              1.0, index=self.index, columns=self.columns
          )
  
      approx_spl_size = self.get_tag("approx_spl")
      approx_method = (
          f"by approximating the {a}-norm of the pdf by the arithmetic mean of "
          f"{approx_spl_size} samples"
      )
      warn(self._method_error_msg("pdfnorm", fill_in=approx_method))
  
      # uses formula int p(x)^a dx = E[p(X)^{a-1}], and MC approximates the RHS
      spl = [
          self.pdf(self.sample()) ** (a - 1)
          for _ in range(approx_spl_size)
      ]
      return pd.concat(spl, axis=0).groupby(level=1, sort=False).mean()
  
imports: from warnings import warn
  import numpy
  import pandas
  from sktime.base import BaseObject
  from sktime.utils.pandas import df_map
  from sktime.utils.validation._dependencies import _check_estimator_deps
label_desc: Use image node_id 19 for calling the BaseDistribution obj's underlying member method code with example usage: obj.pdfnorm(a) and returns: pd, pd