class_docstr: Mixin class for Maximum Penalized Likelihood
  
  Parameters
  ----------
  args and kwds for the model super class
  penal : None or instance of Penalized function class
      If penal is None, then NonePenalty is used.
  pen_weight : float or None
      factor for weighting the penalization term.
      If None, then pen_weight is set to nobs.
  
  
  TODO: missing **kwds or explicit keywords
  
  TODO: do we adjust the inherited docstrings?
  We would need templating to add the penalization parameters
docstr: score based on finite difference derivative
          
docstr_tok: ["score","based","on","finite","difference","derivative"]
code: def score_numdiff(self, params, pen_weight=None, method="fd", **kwds):
      """score based on finite difference derivative"""
      if pen_weight is None:
          pen_weight = self.pen_weight
  
      loglike = lambda p: self.loglike(p, pen_weight=pen_weight, **kwds)
  
      if method == "cs":
          return approx_fprime_cs(params, loglike)
      elif method == "fd":
          return approx_fprime(params, loglike, centered=True)
      else:
          raise ValueError(
              'method not recognized, should be "fd" or "cs"'
          )
  
file_path: statsmodels/statsmodels/base/_penalized.py
imports: import numpy
  from ._penalties import NonePenalty
  from statsmodels.tools.numdiff import approx_fprime_cs, approx_fprime
label_desc: Use image node_id 5 for calling the PenalizedMixin obj's underlying member method code with example usage: obj.score_numdiff(params, pen_weight, method) and returns: approx_fprime_cs, approx_fprime