Adaptive grid based localized learning for multidimensional data