- Create your own ICDF estimation using kernel density estimation, allowing you to control iteration limits and convergence criteria.
- Preprocess your data (e.g., transformations) to mitigate convergence issues before using "ksdensity".
how to change the number of Newton method iterations
2 次查看(过去 30 天)
显示 更早的评论
I am using the ksdensity as follows
ksdensity(a,b,'function','icdf');
but I get a warning on the non-convergence.
I know that the kernel density first fit an initial inverse CDF and then refines the estimation using the Newton method. However, the newton iteration take 100 steps only and then stops. In order to see if I can converge I would like to increase this value.
Can anybody help to understand how to change such parameter (number of iterations)?
0 个评论
回答(1 个)
Pratyush
2024-5-14
Hi Luigi,
The "ksdensity" function in MATLAB doesn't offer a direct way to adjust the maximum number of iterations for the Newton method used in estimating the inverse cumulative distribution function (ICDF). To address non-convergence issues, you have a few options:
A custom implementation involves estimating the density, integrating it to get the CDF, and then numerically finding the ICDF, which offers full control but requires careful numerical work.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!