class_docstr: A class to model one-parameter exponential
  families.
  
  INPUTS:
     link      -- a Link instance
     variance  -- a variance function (models means as a function
                  of mean)
class_docstr_tok: ["A","class","to","model","one-parameter","exponential","families",".","INPUTS",":","link","--","a","Link","instance","variance","--","a","variance","function","(","models","means","as","a","function","of","mean",")"]
docstr: Deviance of (Y,mu) pair. Deviance is usually defined
  as the difference
  
  DEV = (SUM_i -2 log Likelihood(Y_i,mu_i) + 2 log Likelihood(mu_i,mu_i)) / scale
  
  INPUTS:
     Y     -- response variable
     mu    -- mean parameter
     scale -- optional scale in denominator of deviance
  
  OUTPUTS: dev
     dev   -- DEV, as described above
docstr_tok: ["Deviance","of","(","Y",",","mu",")","pair",".","Deviance","is","usually","defined","as","the","difference","DEV","=","(","SUM_i","-2","log","Likelihood","(","Y_i",",","mu_i",")","+","2","log","Likelihood","(","mu_i",",","mu_i",")",")","\/","scale","INPUTS",":","Y","--","response","variable","mu","--","mean","parameter","scale","--","optional","scale","in","denominator","of","deviance","OUTPUTS",":","dev","dev","--","DEV",",","as","described","above"]
code: def deviance(self, Y, mu, scale=1.0):
      """
      Deviance of (Y,mu) pair. Deviance is usually defined
      as the difference
  
      DEV = (SUM_i -2 log Likelihood(Y_i,mu_i) + 2 log Likelihood(mu_i,mu_i)) / scale
  
      INPUTS:
         Y     -- response variable
         mu    -- mean parameter
         scale -- optional scale in denominator of deviance
  
      OUTPUTS: dev
         dev   -- DEV, as described above
  
      """
  
      return np.power(self.devresid(Y, mu), 2).sum() / scale
  
imports: import numpy
  from .None import links
  from .None import varfuncs
label_desc: Use image node_id 5 for calling the Family obj's underlying member method code with example usage: obj.deviance(Y, mu, scale) and returns: unknown