1 #ifndef NPSTAT_PLOGLIOSDE1D_HH_
2 #define NPSTAT_PLOGLIOSDE1D_HH_
26 template<
typename Numeric>
27 PLogliOSDE1D(
const Numeric* coords,
unsigned long lenCoords,
28 double xmin,
double xmax,
double logTruncationX,
29 unsigned nLogTaylorTerms);
31 inline double xmin()
const {
return xmin_;}
32 inline double xmax()
const {
return xmax_;}
33 inline unsigned long sampleSize()
const {
return nCoords_;}
34 inline double coord(
unsigned long i)
const
35 {
return scale_*coords_.at(i) + shift_;}
36 inline double logTruncationX()
const {
return trlog_.truncationX();}
37 inline unsigned logTaylorTerms()
const {
return trlog_.nTaylorTerms();}
48 double pseudoLogli(
const double* coeffs,
unsigned nCoeffs,
49 double* gradient)
const;
54 void sampleCoeffs(
double* coeffs,
unsigned maxdeg)
const;
61 unsigned nCoeffs)
const;
66 inline bool isPositive(
const double* coeffs,
67 const unsigned nCoeffs)
const
68 {
return densityEstimate(coeffs, nCoeffs).isPositive();}
71 void moveCoordsToStandardInterval();
72 void fillDerivativeTables(
unsigned maxdeg)
const;
75 std::vector<double> coords_;
76 unsigned long nCoords_;
83 mutable std::vector<double> derivs_;
84 mutable unsigned currentMaxDeg_;
88 #include "npstat/stat/PLogliOSDE1D.icc"
Statistical distribution constructed using orthonormal Legendre polynomial series.
Truncated log function useful in maximum likelihood fitting of densities for which positivity conditi...
Definition: LegendreDistro1D.hh:26
Definition: PLogliOSDE1D.hh:24
Definition: AbsArrayProjector.hh:14