npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
scalesFromHessian.hh
Go to the documentation of this file.
1 #ifndef NPSTAT_SCALESFROMHESSIAN_HH_
2 #define NPSTAT_SCALESFROMHESSIAN_HH_
3 
4 /*!
5 // \file scalesFromHessian.hh
6 //
7 // \brief Make a guess about local function scales from the function Hessian
8 //
9 // Author: I. Volobouev
10 //
11 // March 2023
12 */
13 
14 #include "npstat/nm/Matrix.hh"
15 
16 namespace npstat {
17  /**
18  // Make a guess about typical scales in various directions
19  // by looking at the Hessian diagonal elements. The Hessian
20  // matrix must be square, and the size of the "scales" array
21  // must be at least as large as the number of hessian rows.
22  //
23  // The diagonal elements of the Hessian are expected to be
24  // mostly positive. If they are negative, the "negativeScaleLimit"
25  // limit (on the maximum scale) will be imposed on them.
26  */
27  void scalesFromHessian(const Matrix<double>& hessian,
28  double negativeScaleLimit,
29  double* scales, unsigned nScales);
30 
31  /**
32  // Make a guess about the covariance matrix.
33  // This will be just the inverse of the Hessian
34  // in case the Hessian is positive-definite.
35  */
37  double negativeScaleLimit);
38 }
39 
40 #endif // NPSTAT_SCALESFROMHESSIAN_HH_
Template matrix class.
Definition: AbsArrayProjector.hh:14
void scalesFromHessian(const Matrix< double > &hessian, double negativeScaleLimit, double *scales, unsigned nScales)
Matrix< double > covmatFromHessian(const Matrix< double > &hessian, double negativeScaleLimit)