Generalization bounds for regression and classification on adaptive covering input domains