  Given a random sample of points from some unknown density, we propose a
data-driven method for estimating density level sets under the r-convexity
assumption. This shape condition generalizes the convexity property. However,
the main problem in practice is that r is an unknown geometric characteristic
of the set related to its curvature. A stochastic algorithm is proposed for
selecting its optimal value from the data. The resulting reconstruction of the
level set is able to achieve minimax rates for Hausdorff metric and distance in
measure, up to log factors, uniformly on the level of the set.
