Ravindra BagaleCourses & study guides English Track your progress

34. Logistic Regression ने Python मध्ये Classification

Data Science

34.5 Practice, Tip आणि Close

का गरजेचे आहे. LogisticRegression fit, predict_proba वाचणे आणि एक threshold trade-off सांगता आले की पुढे जाऊ शकता.

कसे करायचे.

Chapter practice

  1. 15 काल्पनिक Blinkit-style rows: distance_km आणि rain_mm मधून late_delivery 0/1.
  2. stratify वापरून split करा, LogisticRegression fit करा आणि predictions print करा.
  3. Test set साठी predict_proba print करा.
  4. Thresholds 0.3 आणि 0.7 वापरून पाहा; flags कसे बदलतात ते लिहा.
  5. एक ओळ लिहा: कमी threshold customer ला कधी मदत करेल?

थोडक्यात सांगायचं तर (quick recap)

  • Classification → categories / हो-ना
  • LogisticRegression + predict / predict_proba
  • Default threshold 0.5; फक्त कारणाने बदला
  • Class balance आणि leakage लक्ष्यात ठेवा

समजलं का? पुढे: Chapter 35 — Decision Trees आणि Random Forests.