Optimal Learning in High Dimensions