class_docstr: Penalty for smooth term in Generalized Additive Models
  
  Parameters
  ----------
  univariate_smoother : instance
      instance of univariate smoother or spline class
  alpha : float
      default penalty weight, alpha can be provided to each method
  weights:
      TODO: not used and verified, might be removed
  
  Attributes
  ----------
  Parameters are stored, additionally
  nob s: The number of samples used during the estimation
  n_columns : number of columns in smoother basis
class_docstr_tok: ["Penalty","for","smooth","term","in","Generalized","Additive","Models","Parameters","--","--","--","--","--","univariate_smoother",":","instance","instance","of","univariate","smoother","or","spline","class","alpha",":","float","default","penalty","weight",",","alpha","can","be","provided","to","each","method","weights",":","TODO",":","not","used","and","verified",",","might","be","removed","Attributes","--","--","--","--","--","Parameters","are","stored",",","additionally","nob","s",":","The","number","of","samples","used","during","the","estimation","n_columns",":","number","of","columns","in","smoother","basis"]
docstr: evaluate penalization at params
  
  Parameters
  ----------
  params : ndarray
      coefficients for the spline basis in the regression model
  alpha : float
      default penalty weight
  
  Returns
  -------
  func : float
      value of the penalty evaluated at params
docstr_tok: ["evaluate","penalization","at","params","Parameters","--","--","--","--","--","params",":","ndarray","coefficients","for","the","spline","basis","in","the","regression","model","alpha",":","float","default","penalty","weight","Returns","--","--","--","-","func",":","float","value","of","the","penalty","evaluated","at","params"]
code: def func(self, params, alpha=None):
      """evaluate penalization at params
  
      Parameters
      ----------
      params : ndarray
          coefficients for the spline basis in the regression model
      alpha : float
          default penalty weight
  
      Returns
      -------
      func : float
          value of the penalty evaluated at params
      """
      if alpha is None:
          alpha = self.alpha
  
      f = params.dot(self.univariate_smoother.cov_der2.dot(params))
      return alpha * f / self.nobs
  
file_path: statsmodels/statsmodels/gam/gam_penalties.py
imports: import numpy
  from scipy.linalg import block_diag
  from statsmodels.base._penalties import Penalty
label_desc: Use image node_id 2 for calling the UnivariateGamPenalty obj's underlying member method code with example usage: obj.func(params, alpha) and returns: unknown