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

33. Linear Regression in Python with sklearn

33.6 Practice, Tip and Close

Why. Close the chapter when you can fit LinearRegression, read coef_, and avoid one classic mistake without notes.

How.

Chapter practice

  1. Build a 12-row fictional table: daily_pedha_sales vs temperature_c for Mauli Dairy Nashik.
  2. Split, fit LinearRegression, print intercept_ and coef_.
  3. Predict sales for a new day at 36°C.
  4. Write one sentence: “Each extra °C changes predicted sales by about ___ trays.”
  5. List two mistakes you will refuse in a real notebook.

Practice task

Add a second feature is_weekend (0/1). Refit. Explain both coefficients in Marathi or English in one line each.

Thodkyaat sangaycha tar (quick recap)

  • Regression predicts a number (₹, kg, minutes)
  • LinearRegression learns intercept_ + coef_
  • Always split; never put y inside X
  • Read coef_ in business units, carefully

Samajla ka? Next: Chapter 34 — Classification with Logistic Regression (yes/no answers).