class_docstr: Dimension reduction for covariance matrices (CORE).
  
  Parameters
  ----------
  endog : array_like
      The dependent variable, treated as group labels
  exog : array_like
      The independent variables.
  dim : int
      The dimension of the subspace onto which the covariance
      matrices are projected.
  
  Returns
  -------
  A model instance.  Call `fit` on the model instance to obtain
  a results instance, which contains the fitted model parameters.
  
  Notes
  -----
  This is a likelihood-based dimension reduction procedure based
  on Wishart models for sample covariance matrices.  The goal
  is to find a projection matrix P so that C_i | P'C_iP and
  C_j | P'C_jP are equal in distribution for all i, j, where
  the C_i are the within-group covariance matrices.
  
  The model and methodology are as described in Cook and Forzani.
  The optimization method follows Edelman et. al.
  
  References
  ----------
  DR Cook, L Forzani (2008).  Covariance reducing models: an alternative
  to spectral modeling of covariance matrices.  Biometrika 95:4.
  
  A Edelman, TA Arias, ST Smith (1998).  The geometry of algorithms with
  orthogonality constraints. SIAM J Matrix Anal Appl.
  http://math.mit.edu/~edelman/publications/geometry_of_algorithms.pdf
class_docstr_tok: ["Dimension","reduction","for","covariance","matrices","(","CORE",")",".","Parameters","--","--","--","--","--","endog",":","array_like","The","dependent","variable",",","treated","as","group","labels","exog",":","array_like","The","independent","variables",".","dim",":","int","The","dimension","of","the","subspace","onto","which","the","covariance","matrices","are","projected",".","Returns","--","--","--","-","A","model","instance",".","Call","`","fit","`","on","the","model","instance","to","obtain","a","results","instance",",","which","contains","the","fitted","model","parameters",".","Notes","--","--","-","This","is","a","likelihood-based","dimension","reduction","procedure","based","on","Wishart","models","for","sample","covariance","matrices",".","The","goal","is","to","find","a","projection","matrix","P","so","that","C_i","|","P'C_iP","and","C_j","|","P'C_jP","are","equal","in","distribution","for","all","i",",","j",",","where","the","C_i","are","the","within-group","covariance","matrices",".","The","model","and","methodology","are","as","described","in","Cook","and","Forzani",".","The","optimization","method","follows","Edelman","et",".","al",".","References","--","--","--","--","--","DR","Cook",",","L","Forzani","(","2008",")",".","Covariance","reducing","models",":","an","alternative","to","spectral","modeling","of","covariance","matrices",".","Biometrika","95:4",".","A","Edelman",",","TA","Arias",",","ST","Smith","(","1998",")",".","The","geometry","of","algorithms","with","orthogonality","constraints",".","SIAM","J","Matrix","Anal","Appl",".","http",":","\/\/math.mit.edu\/~edelman\/publications\/geometry_of_algorithms.pdf"]
docstr: Evaluate the score function.
  
  Parameters
  ----------
  params : array_like
      The projection matrix used to reduce the covariances,
      flattened to 1d.
  
  Returns the score function evaluated at 'params'.
docstr_tok: ["Evaluate","the","score","function",".","Parameters","--","--","--","--","--","params",":","array_like","The","projection","matrix","used","to","reduce","the","covariances",",","flattened","to","1d",".","Returns","the","score","function","evaluated","at","'params","'","."]
code: def score(self, params):
      """
      Evaluate the score function.
  
      Parameters
      ----------
      params : array_like
          The projection matrix used to reduce the covariances,
          flattened to 1d.
  
      Returns the score function evaluated at 'params'.
      """
  
      p = self.covm.shape[0]
      proj = params.reshape((p, self.dim))
  
      c0 = np.dot(proj.T, np.dot(self.covm, proj))
      cP = np.dot(self.covm, proj)
      g = self.nobs * np.linalg.solve(c0, cP.T).T
  
      for j, c in enumerate(self.covs):
          c0 = np.dot(proj.T, np.dot(c, proj))
          cP = np.dot(c, proj)
          g -= self.ns[j] * np.linalg.solve(c0, cP.T).T
  
      return g.ravel()
  
imports: import warnings
  import numpy
  import pandas
  from statsmodels.base import model
  import statsmodels.base.wrapper
  from statsmodels.tools.sm_exceptions import ConvergenceWarning
label_desc: Use image node_id 3 for calling the CovarianceReduction obj's underlying member method code with example usage: obj.score(params) and returns: g