Pulsar::CrossValidatedSmooth2D Class Reference

Determines the spline smoothing factor as in Clark (1977) More...

#include <SplineSmooth.h>

Public Member Functions

void set_gof_filename (const std::string &name)
 
void set_spline (SplineSmooth2D *_spline)
 
void set_npartition (unsigned m)
 Set the number of cross-validation iterations, m. More...
 
unsigned get_npartition () const
 
void set_validation_fraction (double f)
 Set the fraction of data reserved for validation. More...
 
double get_validation_fraction () const
 
void set_iqr_threshold (double t)
 Set the multiple of IQR used to implement Tukey's fence outlier detection. More...
 
double get_iqr_threshold () const
 
void set_gof_step_threshold (double s)
 Set the goodness-of-fit step threshold. More...
 
double get_gof_step_threshold () const
 
void fit (std::vector< std::pair< double, double > > &data_x, std::vector< Estimate< double > > &data_y)
 Fit spline to data using current configuration.
 
void remove_iqr_outliers (std::vector< std::pair< double, double > > &x, std::vector< Estimate< double > > &y)
 
unsigned get_nflagged_iqr () const
 
void find_optimal_smoothing_factor (const std::vector< std::pair< double, double > > &dat_x, const std::vector< Estimate< double > > &dat_y)
 
void remove_gof_outliers (std::vector< std::pair< double, double > > &x, std::vector< Estimate< double > > &y)
 
unsigned get_nflagged_gof () const
 
double get_mean_gof (const std::vector< std::pair< double, double > > &data_x, const std::vector< Estimate< double > > &data_y)
 Return the mean goodness-of-fit for the current smoothing.
 
double get_mean_gof (double log_10_alpha, const std::vector< std::pair< double, double > > &data_x, const std::vector< Estimate< double > > &data_y)
 Return the mean goodness-of-fit for the specified smoothing.
 

Detailed Description

Determines the spline smoothing factor as in Clark (1977)

The m-fold cross-validation technique is described in Section 4 of

R. M. Clark, Non-Parametric Estimation of a Smooth Regression Function, Journal of the Royal Statistical Society. Series B (Methodological), 1977, Vol. 39, No. 1 (1977), pp. 107-113 https://www.jstor.org/stable/2984885

Member Function Documentation

◆ set_gof_step_threshold()

void Pulsar::CrossValidatedSmooth2D::set_gof_step_threshold ( double  s)
inline

Set the goodness-of-fit step threshold.

s=1.5 by default ... set to 0 to disable

◆ set_iqr_threshold()

void Pulsar::CrossValidatedSmooth2D::set_iqr_threshold ( double  t)
inline

Set the multiple of IQR used to implement Tukey's fence outlier detection.

t=2.0 by default ... set to 0 to disable

◆ set_npartition()

void Pulsar::CrossValidatedSmooth2D::set_npartition ( unsigned  m)
inline

Set the number of cross-validation iterations, m.

m=40 in Clark (1977) ... m=5 by default

◆ set_validation_fraction()

void Pulsar::CrossValidatedSmooth2D::set_validation_fraction ( double  f)
inline

Set the fraction of data reserved for validation.

f=0.1 in Clark (1977) ... f=0.2 by default


The documentation for this class was generated from the following files:

Generated using doxygen 1.8.17