1 #ifndef NPSTAT_BUILDINTERPOLATEDCOMPOSITEDISTROND_HH_
2 #define NPSTAT_BUILDINTERPOLATEDCOMPOSITEDISTROND_HH_
18 #include "geners/CPP11_auto_ptr.hh"
70 template <
class Po
int>
71 CPP11_auto_ptr<GridInterpolatedDistribution>
72 buildInterpolatedCompositeDistroND(
73 const std::vector<Point>& data,
74 const unsigned* dimPredictors,
unsigned nPredictors,
75 const std::string* predictorNames,
76 const unsigned* predictorNumBins,
int predictorSymbetaPower,
77 double effectiveEventsPerBin,
bool stretchPredKernels,
78 const unsigned* dimResponses,
unsigned nResponseVars,
79 const AbsCompositeDistroBuilder<Point>& builder,
80 bool interpolateCopulas,
unsigned reportFrequency = 0);
83 template <
class Po
int>
84 inline GridInterpolatedDistribution*
85 buildInterpolatedCompositeDistroND_2(
86 const std::vector<Point>& data,
87 const unsigned* dimPredictors,
unsigned nPredictors,
88 const std::vector<std::string> predictorNames,
89 const unsigned* predictorNumBins,
unsigned lenBins,
90 int predictorSymbetaPower,
91 double effectiveEventsPerBin,
bool stretchPredKernels,
92 const unsigned* dimResponses,
unsigned nResponseVars,
93 const AbsCompositeDistroBuilder<Point>& builder,
94 bool interpolateCopulas,
unsigned reportFrequency = 0)
96 if (nPredictors != lenBins)
throw std::invalid_argument(
97 "In npstat::buildInterpolatedCompositeDistroND_2: "
98 "incompatible arguments");
99 const unsigned namesSz = predictorNames.size();
100 const std::string* predNames = 0;
103 if (namesSz != nPredictors)
throw std::invalid_argument(
104 "In npstat::buildInterpolatedCompositeDistroND_2: "
105 "incompatible set of predictor names");
106 predNames = &predictorNames[0];
108 CPP11_auto_ptr<GridInterpolatedDistribution> ptr =
109 buildInterpolatedCompositeDistroND(
110 data, dimPredictors, nPredictors, predNames,
111 predictorNumBins, predictorSymbetaPower,
112 effectiveEventsPerBin, stretchPredKernels,
113 dimResponses, nResponseVars, builder,
114 interpolateCopulas, reportFrequency);
115 return ptr.release();
120 #include "npstat/stat/buildInterpolatedCompositeDistroND.icc"
Interface definition for classes which build composite distrubutions.
Multivariate distribution obtained by nonparametric interpolation of probability densities.
Definition: AbsArrayProjector.hh:14