22void exampleTKDE(
int n = 1000) {
34 std::vector<double> data(
n);
35 for (
int i = 0; i <
n; ++i) {
47 h1->Scale(1./
h1->Integral(),
"width" );
49 h1->SetTitle(
"Bi-Gaussian");
53 TF1 *
f1 =
new TF1(
"f1",
"0.4*ROOT::Math::normal_pdf(x,1,2)+0.6*ROOT::Math::normal_pdf(x,1.5,7)",
xmin,
xmax);
1-D histogram with a double per channel (see TH1 documentation)
Kernel Density Estimation class.
TF1 * GetDrawnUpperFunction()
TF1 * GetDrawnLowerFunction()
void Draw(const Option_t *option="") override
Draws either the KDE functions or its errors.
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
void Draw(Option_t *option="") override
Draw this box with its current attributes.