class_docstr: Broyden-Fletcher-Goldfarb-Shanno (BFGS) Hessian update strategy.
  
  Parameters
  ----------
  exception_strategy : {'skip_update', 'damp_update'}, optional
      Define how to proceed when the curvature condition is violated.
      Set it to 'skip_update' to just skip the update. Or, alternatively,
      set it to 'damp_update' to interpolate between the actual BFGS
      result and the unmodified matrix. Both exceptions strategies
      are explained  in [1]_, p.536-537.
  min_curvature : float
      This number, scaled by a normalization factor, defines the
      minimum curvature ``dot(delta_grad, delta_x)`` allowed to go
      unaffected by the exception strategy. By default is equal to
      1e-8 when ``exception_strategy = 'skip_update'`` and equal
      to 0.2 when ``exception_strategy = 'damp_update'``.
  init_scale : {float, 'auto'}
      Matrix scale at first iteration. At the first
      iteration the Hessian matrix or its inverse will be initialized
      with ``init_scale*np.eye(n)``, where ``n`` is the problem dimension.
      Set it to 'auto' in order to use an automatic heuristic for choosing
      the initial scale. The heuristic is described in [1]_, p.143.
      By default uses 'auto'.
  
  Notes
  -----
  The update is based on the description in [1]_, p.140.
  
  References
  ----------
  .. [1] Nocedal, Jorge, and Stephen J. Wright. "Numerical optimization"
         Second Edition (2006).
class_docstr_tok: ["Broyden-Fletcher-Goldfarb-Shanno","(","BFGS",")","Hessian","update","strategy",".","Parameters","--","--","--","--","--","exception_strategy",":","{","'skip_update","'",",","'damp_update","'","}",",","optional","Define","how","to","proceed","when","the","curvature","condition","is","violated",".","Set","it","to","'skip_update","'","to","just","skip","the","update",".","Or",",","alternatively",",","set","it","to","'damp_update","'","to","interpolate","between","the","actual","BFGS","result","and","the","unmodified","matrix",".","Both","exceptions","strategies","are","explained","in","[","1","]","_",",","p.536-537",".","min_curvature",":","float","This","number",",","scaled","by","a","normalization","factor",",","defines","the","minimum","curvature","``","dot","(","delta_grad",",","delta_x",")","``","allowed","to","go","unaffected","by","the","exception","strategy",".","By","default","is","equal","to","1e-8","when","``","exception_strategy","=","'skip_update","'","``","and","equal","to","0.2","when","``","exception_strategy","=","'damp_update","'","``",".","init_scale",":","{","float",",","'auto","'","}","Matrix","scale","at","first","iteration",".","At","the","first","iteration","the","Hessian","matrix","or","its","inverse","will","be","initialized","with","``","init_scale","*","np.eye","(","n",")","``",",","where","``","n","``","is","the","problem","dimension",".","Set","it","to","'auto","'","in","order","to","use","an","automatic","heuristic","for","choosing","the","initial","scale",".","The","heuristic","is","described","in","[","1","]","_",",","p.143",".","By","default","uses","'auto","'",".","Notes","--","--","-","The","update","is","based","on","the","description","in","[","1","]","_",",","p.140",".","References","--","--","--","--","--","..","[","1","]","Nocedal",",","Jorge",",","and","Stephen","J.","Wright",".","``","Numerical","optimization","''","Second","Edition","(","2006",")","."]
docstr: Update the Hessian matrix.
  
  BFGS update using the formula:
  
      ``B <- B - (B*s)*(B*s).T/s.T*(B*s) + y*y^T/s.T*y``
  
  where ``s`` is short for ``delta_x`` and ``y`` is short
  for ``delta_grad``. Formula (6.19) in [1]_.
  
  References
  ----------
  .. [1] Nocedal, Jorge, and Stephen J. Wright. "Numerical optimization"
         Second Edition (2006).
docstr_tok: ["Update","the","Hessian","matrix",".","BFGS","update","using","the","formula",":","``","B","<","-","B","-","(","B","*","s",")","*","(","B","*","s",")",".T\/s.T","*","(","B","*","s",")","+","y","*","y^T\/s.T","*","y","``","where","``","s","``","is","short","for","``","delta_x","``","and","``","y","``","is","short","for","``","delta_grad","``",".","Formula","(","6.19",")","in","[","1","]","_.","References","--","--","--","--","--","..","[","1","]","Nocedal",",","Jorge",",","and","Stephen","J.","Wright",".","``","Numerical","optimization","''","Second","Edition","(","2006",")","."]
code: def _update_hessian(self, ys, Bs, sBs, y):
      """Update the Hessian matrix.
  
      BFGS update using the formula:
  
          ``B <- B - (B*s)*(B*s).T/s.T*(B*s) + y*y^T/s.T*y``
  
      where ``s`` is short for ``delta_x`` and ``y`` is short
      for ``delta_grad``. Formula (6.19) in [1]_.
  
      References
      ----------
      .. [1] Nocedal, Jorge, and Stephen J. Wright. "Numerical optimization"
             Second Edition (2006).
      """
      self.B = self._syr(1.0 / ys, y, a=self.B)
      self.B = self._syr(-1.0 / sBs, Bs, a=self.B)
  
imports: import numpy
  from numpy.linalg import norm
  from scipy.linalg import get_blas_funcs
  from warnings import warn
label_desc: Use image node_id 3 for calling the BFGS obj's underlying member method code with example usage: obj._update_hessian(ys, Bs, sBs, y) without return types