Machine learning for time series analysis and forecasting