ex-1: use a constant for number of resamples
This commit is contained in:
parent
b8571eaee8
commit
72fa3ad2e7
@ -81,8 +81,10 @@ int main(int argc, char** argv) {
|
|||||||
pdf.function = &landau_pdf;
|
pdf.function = &landau_pdf;
|
||||||
pdf.params = NULL;
|
pdf.params = NULL;
|
||||||
|
|
||||||
|
const size_t boots = 100;
|
||||||
|
|
||||||
double mode_e = numeric_mode(min, max, &pdf, 1);
|
double mode_e = numeric_mode(min, max, &pdf, 1);
|
||||||
uncert mode_o = bootstrap_mode(r, sample, samples, 100);
|
uncert mode_o = bootstrap_mode(r, sample, samples, boots);
|
||||||
|
|
||||||
// print the results
|
// print the results
|
||||||
fprintf(stderr, "\n## Results\n");
|
fprintf(stderr, "\n## Results\n");
|
||||||
@ -109,7 +111,7 @@ int main(int argc, char** argv) {
|
|||||||
fprintf(stderr, "\n\n# FWHM comparison\n");
|
fprintf(stderr, "\n\n# FWHM comparison\n");
|
||||||
|
|
||||||
double fwhm_e = numeric_fwhm(min, max, &pdf, 1);
|
double fwhm_e = numeric_fwhm(min, max, &pdf, 1);
|
||||||
uncert fwhm_o = bootstrap_fwhm(r, min, max, sample, samples, 100);
|
uncert fwhm_o = bootstrap_fwhm(r, min, max, sample, samples, boots);
|
||||||
|
|
||||||
// print the results
|
// print the results
|
||||||
fprintf(stderr, "\n## Results\n");
|
fprintf(stderr, "\n## Results\n");
|
||||||
@ -131,7 +133,7 @@ int main(int argc, char** argv) {
|
|||||||
*/
|
*/
|
||||||
fprintf(stderr, "\n\n# Median comparison\n");
|
fprintf(stderr, "\n\n# Median comparison\n");
|
||||||
double med_e = landau_qdf(0.5);
|
double med_e = landau_qdf(0.5);
|
||||||
uncert med_o = bootstrap_median(r, sample, samples, 100);
|
uncert med_o = bootstrap_median(r, sample, samples, boots);
|
||||||
|
|
||||||
// print the results
|
// print the results
|
||||||
fprintf(stderr, "\n## Results\n");
|
fprintf(stderr, "\n## Results\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user