  We consider the problem of adaptive stratified sampling for Monte Carlo
integration of a noisy function, given a finite budget n of noisy evaluations
to the function. We tackle in this paper the problem of adapting to the
function at the same time the number of samples into each stratum and the
partition itself. More precisely, it is interesting to refine the partition of
the domain in area where the noise to the function, or where the variations of
the function, are very heterogeneous. On the other hand, having a (too) refined
stratification is not optimal. Indeed, the more refined the stratification, the
more difficult it is to adjust the allocation of the samples to the
stratification, i.e. sample more points where the noise or variations of the
function are larger. We provide in this paper an algorithm that selects online,
among a large class of partitions, the partition that provides the optimal
trade-off, and allocates the samples almost optimally on this partition.
