Adaptive Nonparametric Density Estimation with B-Spline Bases
Abstract
:1. Introduction
2. B-Splines
3. Density Estimation with B-Splines
3.1. Selecting the Degree and the Knot Vector
- (1)
- and (i.e., , in the knot vector), which determines the endpoints of the interval of the piecewise polynomial space ;
- (2)
- the bandwidth .
3.2. Computing the Coefficients
- (1)
- , so that is always positive in the distribution range.
- (2)
- , which can be simplified to
4. Knot Refinement
4.1. A Residual-Based Posteriori Error Estimator Based on B-Splines
4.2. Adaptive Refinement Strategy
Algorithm 1: Refinement algorithm |
Algorithm 2: Adaptive probability density function estimation |
|
5. Numerical Experiments
5.1. Comparison Measures
- The measured entropy (ME) of the samples given by the estimator, which is defined as (5).
- The BIC score of the samples given by the estimator, which is defined as (4).
- The root mean square error (root-MSE) between the estimation and the true density :
- The mean absolute error (MAE) between the estimation and the true density :
5.2. Uniform B-Spline Estimators vs. Nonuniform B-Spline Estimators
5.3. Comparison with Orthogonal Sequence and Kernel Estimators
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Siegel, S. Nonparametric statistics. Am. Stat. 1957, 11, 13–19. [Google Scholar]
- Gibbons, J.D.; Chakraborti, S. Nonparametric Statistical Inference; CRC Press: Boca Raton, FL, USA, 2014. [Google Scholar]
- García, S.; Luengo, J.; Sáez, J.A.; López, V.; Herrera, F. A survey of discretization techniques: Taxonomy and empirical analysis in supervised learning. IEEE Trans. Knowl. Data Eng. 2013, 25, 734–750. [Google Scholar] [CrossRef]
- Bhattacharya, A.; Dunson, D.B. Nonparametric Bayesian density estimation on manifolds with applications to planar shapes. Biometrika 2010, 97, 851–865. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Hall, P. Cross-validation and the smoothing of orthogonal series density estimators. J. Multivar. Anal. 1987, 21, 189–206. [Google Scholar] [CrossRef] [Green Version]
- Dai, X.; Müller, H.-G.; Yao, F. Optimal bayes classifiers for functional data and density ratios. Biometrika 2017, 104, 545–560. [Google Scholar]
- Leitao, Á.; Oosterlee, C.W.; Ortiz-Gracia, L.; Bohte, S.M. On the data-driven cos method. Appl. Math. Comput. 2018, 317, 68–84. [Google Scholar] [CrossRef] [Green Version]
- Ait-Hennani, L.; Kaid, Z.; Laksaci, A.; Rachdi, M. Nonparametric estimation of the expected shortfall regression for quasi-associated functional data. Mathematics 2022, 10, 4508. [Google Scholar] [CrossRef]
- Terrell, G.R.; Scott, D.W. Variable kernel density estimation. Ann. Stat. 1992, 1236–1265. [Google Scholar] [CrossRef]
- Lamnii, A.; Nour, M.Y.; Zidna, A. A reverse non-stationary generalized b-splines subdivision scheme. Mathematics 2021, 9, 2628. [Google Scholar] [CrossRef]
- Fan, J.; Gijbels, I. Local Polynomial Modelling and Its Applications; Routledge: London, UK, 2018. [Google Scholar]
- Redner, R.A. Convergence rates for uniform B-spline density estimators part i: One dimension. SIAM J. Sci. Comput. 1999, 20, 1929–1953. [Google Scholar] [CrossRef]
- Cui, Z.; Kirkby, J.L.; Nguyen, D. Nonparametric density estimation by b-spline duality. Econom. Theory 2020, 36, 250–291. [Google Scholar] [CrossRef]
- Cui, Z.; Kirkby, J.L.; Nguyen, D. A data-driven framework for consistent financial valuation and risk measurement. Eur. J. Oper. Res. 2021, 289, 381–398. [Google Scholar] [CrossRef]
- Cui, Z.; Kirkby, J.L.; Nguyen, D. Efficient simulation of generalized sabr and stochastic local volatility models based on markov chain approximations. Eur. J. Oper. Res. 2021, 290, 1046–1062. [Google Scholar] [CrossRef]
- Kooperberg, C.; Stone, C.J. Comparison of parametric and bootstrap approaches to obtaining confidence intervals for logspline density estimation. J. Comput. Graph. Stat. 2004, 13, 106–122. [Google Scholar] [CrossRef]
- Koo, J.-Y. Bivariate b-splines for tensor logspline density estimation. Comput. Stat. Data Anal. 1996, 21, 31–42. [Google Scholar] [CrossRef]
- Gu, C. Smoothing spline density estimation: A dimensionless automatic algorithm. J. Am. Stat. Assoc. 1993, 88, 495–504. [Google Scholar] [CrossRef]
- Eilers, P.H.; Marx, B.D. Flexible smoothing with b-splines and penalties. Stat. Sci. 1996, 11, 89–121. [Google Scholar] [CrossRef]
- Papp, D.; Alizadeh, F. Shape-constrained estimation using nonnegative splines. J. Comput. Graph. Stat. 2014, 23, 211–231. [Google Scholar] [CrossRef]
- Kirkby, J.L.; Leitao, Á.; Nguyen, D. Nonparametric density estimation and bandwidth selection with b-spline bases: A novel galerkin method. Comput. Stat. Data Anal. 2021, 159, 107202. [Google Scholar] [CrossRef]
- Oliveira, M.; Crujeiras, R.M.; Rodríguez-Casal, A. A plug-in rule for bandwidth selection in circular density estimation. Comput. Stat. Data Anal. 2012, 56, 3898–3908. [Google Scholar] [CrossRef] [Green Version]
- Boente, G.; Rodriguez, D. Robust bandwidth selection in semiparametric partly linear regression models: Monte carlo study and influential analysis. Comput. Stat. Data Anal. 2008, 52, 2808–2828. [Google Scholar] [CrossRef]
- Hall, P.; Kang, K.-H. Bandwidth choice for nonparametric classification. Ann. Stat. 2005, 33, 284–306. [Google Scholar] [CrossRef]
- Loader, C. Bandwidth selection: Classical or plug-in? Ann. Stat. 1999, 27, 415–438. [Google Scholar] [CrossRef]
- Boor, C.D.; Boor, C.D. A Practical Guide to Splines; Springer: New York, NY, USA, 1978; Volume 27. [Google Scholar]
- Farin, G. Curves and Surfaces for Computer-Aided Geometric Design: A Practical Guide; Elsevier: Amsterdam, The Netherlands, 2014. [Google Scholar]
- Ezhov, N.; Neitzel, F.; Petrovic, S. Spline approximation, part 2: From polynomials in the monomial basis to b-splines—A derivation. Mathematics 2021, 9, 2198. [Google Scholar] [CrossRef]
- Curry, H.B.; Schoenberg, I.J. On spline distributions and their limits-the polya distribution functions. Bull. Am. Math. Soc. 1947, 53, 1114. [Google Scholar]
- Lyche, T.; Manni, C.; Speleers, H. Foundations of spline theory: B-splines, spline approximation, and hierarchical refinement. In Splines and PDEs: From Approximation Theory to Numerical Linear Algebra; Springer: Berlin/Heidelberg, Germany, 2018; pp. 1–76. [Google Scholar]
- Zong, Z.; Lam, K. Estimation of complicated distributions using B-spline functions. Struct. Saf. 1998, 20, 341–355. [Google Scholar] [CrossRef]
- López-Cruz, P.L.; Bielza, C.; Larranaga, P. Learning mixtures of polynomials of multidimensional probability densities from data using b-spline interpolation. Int. J. Approx. Reason. 2014, 55, 989–1010. [Google Scholar] [CrossRef]
- Loock, W.V.; Pipeleers, G.; Schutter, J.D.; Swevers, J. A convex optimization approach to curve fitting with b-splines. IFAC Proc. Vol. 2011, 44, 2290–2295. [Google Scholar] [CrossRef] [Green Version]
- Bastian, P.; Wittum, G. Adaptive multigrid methods: The ug concept. In Adaptive Methods—Algorithms, Theory and Applications; Springer: Berlin/Heidelberg, Germany, 1994; pp. 17–37. [Google Scholar]
- Urth, R.V. A Review of a Posteriori Error Estimation and Adaptive Mesh-Refinement Techniques; BG Teubner: Leipzig, Germany, 1996. [Google Scholar]
- Dörfel, M.R.; Jüttler, B.; Simeon, B. Adaptive isogeometric analysis by local h-refinement with t-splines. Comput. Methods Appl. Mech. Eng. 2010, 199, 264–275. [Google Scholar] [CrossRef] [Green Version]
- Morin, P.; Nochetto, R.H.; Siebert, K.G. Data oscillation and convergence of adaptive fem. SIAM J. Numer. Anal. 2000, 38, 466–488. [Google Scholar] [CrossRef]
- Węglarczyk, S. Kernel density estimation and its application. In ITM Web of Conferences; EDP Sciences: Les Ulis, France, 2018; p. 00037. [Google Scholar]
- Troudi, M.; Alimi, A.M.; Saoudi, S. Analytical plug-in method for kernel density estimator applied to genetic neutrality study. EURASIP J. Adv. Signal Process. 2008, 2008, 1–8. [Google Scholar] [CrossRef]
Name | Distribution | Domain |
---|---|---|
Gauss | ||
Exp | Exp | |
Chisq | ||
MixGauss | ||
Mix1d | ||
MixGauss2 |
Gauss | Exp | Chisq | MixGauss | Mix1d | MixGauss2 | |
---|---|---|---|---|---|---|
uniform B-spline | ||||||
ME | 1.4152 | 0.7975 | 2.6337 | 1.6083 | 2.1494 | 1.8671 |
H | 1.3993 | 0.7391 | 2.6151 | 0.8857 | 2.1060 | 0.4424 |
root-MSE | 0.0632 | 0.0360 | 0.0032 | 0.1245 | 0.0044 | 0.1766 |
MAE | 0.0163 | 0.0321 | 0.0027 | 0.1116 | 0.0048 | 0.1506 |
BIC | 2.8749 | 1.6417 | 5.3196 | 3.2501 | 4.3413 | 3.7524 |
non-uniform B-spline | ||||||
ME | 1.4202 | 0.7991 | 2.6352 | 1.5978 | 2.1500 | 1.8855 |
H | 1.3962 | 0.7381 | 2.6144 | 0.8854 | 2.1039 | 0.4615 |
root-MSE | 0.0032 | 0.0360 | 0.0026 | 0.1216 | 0.0032 | 0.1780 |
MAE | 0.0046 | 0.0313 | 0.0022 | 0.1109 | 0.0032 | 0.1506 |
BIC | 2.8836 | 1.6443 | 5.3206 | 3.2346 | 4.3438 | 3.7578 |
N | Case | Uniform B-spline | Nonuniform B-spline | Ratio-root- MSE | Ratio- MAE | ||
---|---|---|---|---|---|---|---|
root-MSE | MAE | root-MSE | MAE | ||||
50 | Gauss | 0.1308 | 0.0737 | 0.1140 | 0.0804 | 0.8719 | 1.0909 |
100 | 0.0794 | 0.0701 | 0.0714 | 0.0592 | 0.8997 | 0.8445 | |
500 | 0.0412 | 0.0340 | 0.0387 | 0.0310 | 0.9393 | 0.9118 | |
1000 | 0.0200 | 0.0163 | 0.0071 | 0.0046 | 0.355 | 0.2822 | |
5000 | 0.0100 | 0.0063 | 0.0071 | 0.0039 | 0.7143 | 0.6190 | |
50 | Exp | 0.1612 | 0.1339 | 0.1411 | 0.1127 | 0.8749 | 0.8417 |
100 | 0.1625 | 0.1077 | 0.1507 | 0.1142 | 0.92728 | 1.0604 | |
500 | 0.0458 | 0.0393 | 0.0412 | 0.0375 | 0.8997 | 0.9542 | |
1000 | 0.0361 | 0.0321 | 0.0361 | 0.0313 | 1.0000 | 0.9751 | |
5000 | 0.0224 | 0.0205 | 0.0245 | 0.0216 | 1.0954 | 1.0537 | |
50 | Chisq | 0.0305 | 0.0266 | 0.0879 | 0.0231 | 2.8820 | 0.8684 |
100 | 0.0208 | 0.0178 | 0.0643 | 0.0172 | 3.0913 | 0.9663 | |
500 | 0.0106 | 0.0091 | 0.0106 | 0.0091 | 1.0000 | 1.0000 | |
1000 | 0.0032 | 0.0027 | 0.0088 | 0.0075 | 2.7500 | 2.7778 | |
5000 | 0.0115 | 0.0098 | 0.0115 | 0.0098 | 1.0000 | 1.0000 | |
50 | MixGauss | 0.1288 | 0.1074 | 0.1327 | 0.1078 | 1.0303 | 0.0037 |
100 | 0.1187 | 0.1091 | 0.1170 | 0.1085 | 0.9857 | 0.9945 | |
500 | 0.1200 | 0.1097 | 0.1196 | 0.1100 | 0.9967 | 1.0027 | |
1000 | 0.1245 | 0.1116 | 0.1217 | 0.1109 | 0.9775 | 0.9937 | |
5000 | 0.1175 | 0.1059 | 0.1158 | 0.1045 | 0.9855 | 0.9868 | |
50 | Mix1d | 0.0906 | 0.0724 | 0.1039 | 0.0747 | 1.1476 | 1.0318 |
100 | 0.0866 | 0.0526 | 0.0663 | 0.0515 | 0.7659 | 0.9791 | |
500 | 0.0173 | 0.0131 | 0.0173 | 0.0136 | 1.0000 | 1.0382 | |
1000 | 0.0053 | 0.0048 | 0.0044 | 0.0032 | 0.8148 | 0.6667 | |
5000 | 0.0077 | 0.0028 | 0.0063 | 0.0028 | 0.8182 | 1.0000 | |
50 | MixGauss2 | 0.1780 | 0.1588 | 0.1766 | 0.1578 | 0.9921 | 0.9937 |
100 | 0.1929 | 0.1735 | 0.1881 | 0.1688 | 0.9951 | 0.9729 | |
500 | 0.1709 | 0.1537 | 0.1685 | 0.1498 | 0.9860 | 0.9746 | |
1000 | 0.1766 | 0.1506 | 0.1780 | 0.1506 | 1.0079 | 1.000 | |
5000 | 0.1744 | 0.1540 | 0.1735 | 0.1514 | 1.9948 | 0.9831 |
Gauss | Exp | Chisq | MixGauss | Mix1d | MixGauss2 | |
---|---|---|---|---|---|---|
Non-uniform B-spline | ||||||
root-MSE | 0.0566 | 0.0361 | 0.0026 | 0.1217 | 0.0032 | 0.1780 |
MAE | 0.0046 | 0.0313 | 0.0022 | 0.1109 | 0.0032 | 0.1506 |
Orthogonal sequence | ||||||
root-MSE | 0.1442 | 0.1860 | 0.0097 | 0.1204 | 0.0332 | 0.1020 |
MAE | 0.1329 | 0.1508 | 0.0087 | 0.1035 | 0.0280 | 0.0958 |
kernal ROT | ||||||
root-MSE | 0.2848 | 0.5742 | 0.0217 | 0.1273 | 0.0843 | 0.0309 |
MAE | 0.2655 | 0.5084 | 0.0198 | 0.1163 | 0.0779 | 0.0280 |
kernal LCV | ||||||
root-MSE | 0.2871 | 0.5896 | 0.0574 | 0.1364 | 0.1292 | 0.0539 |
MAE | 0.2676 | 0.5229 | 0.0528 | 0.1247 | 0.1214 | 0.0479 |
kernal HALL | ||||||
root-MSE | 0.3003 | 0.5887 | 0.0831 | 0.1442 | 0.1285 | 0.0539 |
MAE | 0.2802 | 0.5222 | 0.0769 | 0.1317 | 0.1204 | 0.0481 |
N | Gauss | Exp | Chisq | MixGauss | Mix1d | MixGauss2 | |
---|---|---|---|---|---|---|---|
Nonuniform B-spline | |||||||
50 | root-MSE | 0.1140 | 0.1411 | 0.0879 | 0.1327 | 0.1039 | 0.1766 |
MAE | 0.0804 | 0.1127 | 0.0231 | 0.1078 | 0.0747 | 0.1578 | |
100 | root-MSE | 0.0714 | 0.1507 | 0.0643 | 0.1170 | 0.0663 | 0.1881 |
MAE | 0.0592 | 0.1142 | 0.0172 | 0.1085 | 0.0515 | 0.1688 | |
500 | root-MSE | 0.0387 | 0.0412 | 0.0106 | 0.1196 | 0.0173 | 0.1685 |
MAE | 0.0310 | 0.0375 | 0.0091 | 0.1100 | 0.0136 | 0.1498 | |
1000 | root-MSE | 0.0043 | 0.0361 | 0.0026 | 0.1217 | 0.0032 | 0.1780 |
MAE | 0.0046 | 0.0313 | 0.0022 | 0.1109 | 0.0032 | 0.1506 | |
5000 | root-MSE | 0.0063 | 0.0245 | 0.0115 | 0.1158 | 0.0023 | 0.1735 |
MAE | 0.0039 | 0.0216 | 0.0098 | 0.1045 | 0.0028 | 0.1514 | |
Orthogonal sequence | |||||||
50 | root-MSE | 0.1149 | 0.2006 | 0.0159 | 0.0837 | 0.0265 | 0.0640 |
MAE | 0.1097 | 0.1618 | 0.0136 | 0.0696 | 0.0204 | 0.0585 | |
100 | root-MSE | 0.1175 | 0.2102 | 0.0216 | 0.1095 | 0.0265 | 0.0207 |
MAE | 0.1087 | 0.1602 | 0.0165 | 0.0952 | 0.0220 | 0.0169 | |
500 | root-MSE | 0.1530 | 0.1817 | 0.0056 | 0.0608 | 0.0436 | 0.0943 |
MAE | 0.1412 | 0.1484 | 0.0049 | 0.0137 | 0.0391 | 0.0844 | |
1000 | root-MSE | 0.1442 | 0.1860 | 0.0097 | 0.1204 | 0.0332 | 0.1020 |
MAE | 0.1329 | 0.1508 | 0.0087 | 0.1035 | 0.0280 | 0.0958 | |
5000 | root-MSE | 0.1490 | 0.1819 | 0.0132 | 0.1253 | 0.0346 | 0.1109 |
MAE | 0.1369 | 0.1470 | 0.0117 | 0.1083 | 0.0302 | 0.0990 | |
kernal ROT | |||||||
50 | root-MSE | 0.2577 | 0.5544 | 0.1162 | 0.0707 | 0.0548 | 0.0469 |
MAE | 0.2362 | 0.4932 | 0.1111 | 0.0595 | 0.0496 | 0.0438 | |
100 | root-MSE | 0.2390 | 0.5840 | 0.0748 | 0.1005 | 0.0436 | 0.0235 |
MAE | 0.2163 | 0.5223 | 0.0719 | 0.0908 | 0.0346 | 0.0202 | |
500 | root-MSE | 0.2835 | 0.5700 | 0.0096 | 0.1187 | 0.0721 | 0.0216 |
MAE | 0.2663 | 0.5059 | 0.0078 | 0.1086 | 0.0673 | 0.0193 | |
1000 | root-MSE | 0.2848 | 0.5742 | 0.0217 | 0.1273 | 0.0843 | 0.0309 |
MAE | 0.2655 | 0.5084 | 0.0198 | 0.1163 | 0.0779 | 0.0280 | |
5000 | root-MSE | 0.2926 | 0.5778 | 0.0548 | 0.1338 | 0.1058 | 0.0424 |
MAE | 0.2714 | 0.5095 | 0.0505 | 0.1221 | 0.0987 | 0.0385 | |
kernal LCV | |||||||
50 | root-MSE | 0.2366 | 0.5916 | 0.1916 | 0.0566 | 0.0548 | 0.0632 |
MAE | 0.2161 | 0.5209 | 0.1842 | 0.471 | 0.0465 | 0.595 | |
100 | root-MSE | 0.2332 | 0.6084 | 0.0200 | 0.1127 | 0.0964 | 0.0480 |
MAE | 0.2107 | 0.5459 | 0.0174 | 0.1024 | 0.0888 | 0.4310 | |
500 | root-MSE | 0.2751 | 0.5902 | 0.0244 | 0.1356 | 0.1265 | 0.0500 |
MAE | 0.2584 | 0.5251 | 0.0207 | 0.1242 | 0.1191 | 0.0453 | |
1000 | root-MSE | 0.2871 | 0.5896 | 0.0574 | 0.1364 | 0.1292 | 0.0539 |
MAE | 0.2676 | 0.5229 | 0.0528 | 0.1247 | 0.1214 | 0.0479 | |
5000 | root-MSE | 0.2888 | 0.5868 | 0.0787 | 0.1393 | 0.1330 | 0.0548 |
MAE | 0.2679 | 0.5178 | 0.0730 | 0.1268 | 0.1244 | 0.0496 | |
kernal HALL | |||||||
50 | root-MSE | 0.2848 | 0.5873 | 0.0332 | 0.1158 | 0.0964 | 0.0314 |
MAE | 0.2619 | 0.5264 | 0.0239 | 0.1020 | 0.0867 | 0.0273 | |
100 | root-MSE | 0.2729 | 0.6083 | 0.0539 | 0.1338 | 0.1068 | 0.0436 |
MAE | 0.2498 | 0.5458 | 0.0485 | 0.1216 | 0.0992 | 0.0397 | |
500 | root-MSE | 0.3030 | 0.5886 | 0.0762 | 0.1421 | 0.1277 | 0.0520 |
MAE | 0.2846 | 0.5236 | 0.0701 | 0.1300 | 0.1200 | 0.0471 | |
1000 | root-MSE | 0.3003 | 0.5887 | 0.0831 | 0.1442 | 0.1285 | 0.0539 |
MAE | 0.2802 | 0.5222 | 0.0769 | 0.1317 | 0.1204 | 0.0481 | |
5000 | root-MSE | 0.3013 | 0.5863 | 0.0883 | 0.1439 | 0.1319 | 0.0557 |
MAE | 0.2796 | 0.5174 | 0.0816 | 0.1313 | 0.1231 | 0.0505 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zhao, Y.; Zhang, M.; Ni, Q.; Wang, X. Adaptive Nonparametric Density Estimation with B-Spline Bases. Mathematics 2023, 11, 291. https://doi.org/10.3390/math11020291
Zhao Y, Zhang M, Ni Q, Wang X. Adaptive Nonparametric Density Estimation with B-Spline Bases. Mathematics. 2023; 11(2):291. https://doi.org/10.3390/math11020291
Chicago/Turabian StyleZhao, Yanchun, Mengzhu Zhang, Qian Ni, and Xuhui Wang. 2023. "Adaptive Nonparametric Density Estimation with B-Spline Bases" Mathematics 11, no. 2: 291. https://doi.org/10.3390/math11020291
APA StyleZhao, Y., Zhang, M., Ni, Q., & Wang, X. (2023). Adaptive Nonparametric Density Estimation with B-Spline Bases. Mathematics, 11(2), 291. https://doi.org/10.3390/math11020291