Speed up GridSearchCV using parallel processing

Поділитися
Вставка
  • Опубліковано 6 жов 2021
  • Want your grid search to run faster? Set n_jobs=-1 to use parallel processing with all CPUs!
    👉 New tips every TUESDAY and THURSDAY! 👈
    🎥 Watch all tips: • scikit-learn tips
    🗒️ Code for all tips: github.com/justmarkham/scikit...
    💌 Get tips via email: scikit-learn.tips
    === WANT TO GET BETTER AT MACHINE LEARNING? ===
    1) LEARN THE FUNDAMENTALS in my intro course (free!): courses.dataschool.io/introdu...
    2) BUILD YOUR ML CONFIDENCE in my intermediate course: courses.dataschool.io/buildin...
    3) LET'S CONNECT!
    - Newsletter: www.dataschool.io/subscribe/
    - Twitter: / justmarkham
    - Facebook: / datascienceschool
    - LinkedIn: / justmarkham

КОМЕНТАРІ • 7

  • @dataschool
    @dataschool  2 роки тому

    I hope this tip helps your work go faster! ⏰ Another way to save time is to use RandomizedSearchCV instead of GridSearchCV. Watch this video to learn more: ua-cam.com/video/Q5dH5mOQ_ik/v-deo.html

  • @anefuoche1053
    @anefuoche1053 2 роки тому

    the truth is the calmness of your voice makes learning exciting too

    • @dataschool
      @dataschool  2 роки тому

      That's great to hear! 🙏

  • @philwebb59
    @philwebb59 2 роки тому +1

    There's more to it than simply setting n_jobs to -1. You also need enough RAM for all those parallel processes to share. Otherwise, you max out your swap space and everything comes to a grinding halt.

    • @dataschool
      @dataschool  2 роки тому +1

      Thanks Phil! That's why I always recommend timing your process (with and without n_jobs set to -1) to see if it's helping or not. It's hard to know whether you have enough RAM for any given process without just trying it!

  • @mdmantejsingh
    @mdmantejsingh 2 роки тому +1

    Thank you, it's good to know.