Toward a generic representation of random variables for machine learning