{'fraction_non_alphanumeric': 0.01912928759894459, 'fraction_numerical': 0.0, 'mean_word_length': 5.6535087719298245, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Smooth Location-Dependent Bandwidth Selection for Local Polynomial Regression

A bandwidth function for local polynomial models is commonly obtained by optimizing a pointwise penalty criterion, such as an estimated mean squared error (MSE), over a grid of predictor locations. A resultant regression estimate may suffer from irregularities, such as discontinuities, and contextual information over nearby predictor locations is not used. To mediate these difficulties, ad hoc postprocessing is sometimes carried out in the form of smoothing of the penalty criterion and/or the bandwidth estimates. In this work a technique is developed for choosing a smooth bandwidth function that uses a smoothing spline selected based on new “fit” and “roughness” penalties. The fit penalty pushes the bandwidth estimate to adhere to the chosen pointwise criterion, whereas the roughness penalty is imposed on the fitted regression estimate as opposed to the bandwidth estimate, which usually is not of direct interest. The technique can be used in conjunction with various adaptive bandwidth selection methods and provides a systematic way of incorporating contextual information into bandwidth estimation. To justify a spline bandwidth function, we show that under mild regularity conditions, there exists a smooth, asymptotically optimal bandwidth function. We also demonstrate empirically that the technique outperforms the empirical-bias bandwidth selector (EBBS) of Ruppert when using an EBBS MSE pointwise penalty estimate.