Text this: A New Optimized Stochastic Approach for Multidimensional Integrals in Machine Learning