#include <LocalLogisticRegression.hh>
|
| LogisticRegressionBase (const QuadraticOrthoPolyND &poly, bool calculateLikelihoodGradient) |
|
unsigned | dim () const |
|
const QuadraticOrthoPolyND & | getPoly () const |
|
bool | calculatingGradient () const |
|
const std::vector< double > & | lastCoeffs () const |
|
void | getGradient (double *buffer, unsigned bufLen) const |
|
double | getPassCount () const |
|
double | getFailCount () const |
|
void | setRegressionBox (const BoxND< Numeric > &box) |
|
void | setLinearMapping (const double *location, const double *scale, unsigned locationAndScaleArraySize) |
|
double | calculateLogLikelihood (const double *coeffs, unsigned nCoeffs) |
|
|
void | resetAccumulators () |
|
|
const QuadraticOrthoPolyND & | poly_ |
|
BoxND< Numeric > | regressionBox_ |
|
std::vector< double > | location_ |
|
std::vector< double > | scale_ |
|
std::vector< double > | coords_ |
|
std::vector< double > | coeffs_ |
|
std::vector< double > | gradBuffer_ |
|
std::vector< long double > | gradient_ |
|
long double | logli_ |
|
long double | passCount_ |
|
long double | failCount_ |
|
const double | minlog_ |
|
const double | maxlog_ |
|
const unsigned | mydim_ |
|
const bool | calcGradient_ |
|
template<class Numeric>
class npstat::LogisticRegressionBase< Numeric >
Base class for logistic regression
◆ calculateLogLikelihood()
The next method calculates the negative log-likelihood of the local logistic regression fit for the current mapping. In case the corresponding flag was set "true" in the constructor, the gradient of this quantity will be calculated as well. The gradient can be subsequently retrieved with the "getGradient" method.
◆ dim()
Inspect object properties
◆ lastCoeffs()
Inspect results of the most recent fit
◆ setLinearMapping()
template<class Numeric >
void npstat::LogisticRegressionBase< Numeric >::setLinearMapping |
( |
const double * |
location, |
|
|
const double * |
scale, |
|
|
unsigned |
locationAndScaleArraySize |
|
) |
| |
The next method sets up a mapping from the fitted region into the region which was used to create the orthogonal polynomials. The mapping is linear in every coordinate separately: ortho[i] = fitted[i]*scale[i] + location[i]. Note that the "setRegressionBox" method automatically sets up the default mapping which will be adequate for most applications.
◆ setRegressionBox()
Only the data inside the regression box will be used in the fit (and some points may be subsequently weighted down to zero by the weight function).
Note that the "setRegressionBox" method automatically sets up the standard mapping: the edges of the regression box are mapped into the boundaries which were used to create the orthogonal polynomials. If the standard mapping is not what you want (for example, this might be the case near the boundaries of the fitted region), you must call "setLinearMapping" after calling "setRegressionBox" in order to override the standard mapping.
This method must be called at least once after the object is constructed and before any call to "calculateLogLikelihood".
The documentation for this class was generated from the following file: