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"]
code: def __init__(self, univariate_smoother, alpha=1, weights=1):
      self.weights = weights
      self.alpha = alpha
      self.univariate_smoother = univariate_smoother
      self.nobs = self.univariate_smoother.nobs
      self.n_columns = self.univariate_smoother.dim_basis
  
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 1 to create a new UnivariateGamPenalty object from inherited base classes: Penalty with example: obj = UnivariateGamPenalty(univariate_smoother, alpha, weights)