Density estimation robust algorithm