Learning effective dynamics from data-driven stochastic systems