Fog-aided wireless communications and machine learning