Ravindra BagaleCourses & study guides मराठी Track your progress

65. How to Forecast Sales with Time Series in Python (pandas and sklearn)

Chala mitrano, aaj apan future baghtoy. Magche months che sales gheun pudhche months predict karayche. Naive, moving average, seasonal naive, ani lag + LinearRegression. Dates shuffle naka. Copy-run karuya.

What you will learn in this chapter

  • Why businesses forecast next months from past months
  • What a time series is (trend, season, noise)
  • Naive last-value and seasonal naive forecasts
  • Moving average forecast
  • Lag features + LinearRegression in sklearn
  • Train/test split by time (never shuffle dates)
  • MAE and MAPE to score a forecast
  • Plot past vs forecast; optional Holt-Winters note

Fictional data

Mauli Kirana (Pune), Manchester clinic, Austin bank, Bhiwandi logistics, Surya Care (Bengaluru) and Nimbus Soft figures in this chapter are fictional sample data for learning only. They do not show real company numbers. People names are for practice; e-mails use example.com.

Concepts in this chapter

  1. 65.1Why Forecast Next Months from Past Months
  2. 65.2What Is a Time Series (Trend, Season, Noise)
  3. 65.3Naive Last-Value and Seasonal Naive Forecasts
  4. 65.4Moving Average Forecast
  5. 65.5Lag Features + LinearRegression with sklearn
  6. 65.6Train/Test Split by Time (Never Shuffle Dates)
  7. 65.7MAE, MAPE and Plot Past vs Forecast
  8. 65.8Practice, Tip and Close

The chapter recap is at the end of the last concept page.