Is this email not displaying correctly? View it in your browser.
Train in Data, learn machine learning online

NO! Optuna Doesn’t Do Magic To Tune Hyperparameters

Image description

Welcome to Data Bites!



Every Monday, I’ll drop a no-fluff, straight-to-the-point tip on a data science skill, tool, or
method to help you stay sharp in the field. I hope you find it useful!

🎉 We’ve Hit 100 Reviews on Trustpilot, Thanks to You!

We’re over the moon! 🚀 Train in Data has officially reached 100 reviews on Trustpilot and it’s all because of YOU. What a way to end 2025 on a high note! 🌟

Image description

Every review, every bit of feedback, every story of your learning journey truly matters.
Your contributions help us improve, inspire others, and grow the Train in Data community.



If you haven’t shared your experience yet, we’d be honored to hear from you whenever you’re ready.



👉 See what others are saying: Trustpilot Reviews
👉 Explore our courses: Train in Data Courses



Here’s to celebrating 2025 together and stepping into 2026 with even more curiosity, learning, and growth! 💛

Share Your Review & Celebrate With Us

NO! Optuna Doesn’t Do Magic To Tune Hyperparameters

Ive seen many discussions and videos claiming Optuna magically finds the best hyperparameter configurations for your models. But let’s be clear—Optuna relies on well-studied methods like Bayesian optimization and random search.



By default, Optuna uses Bayesian optimization with Tree-structured Parzen Estimators (TPE), which is also employed by Hyperopt. From a purely technical standpoint, Optuna isn't inherently better than Hyperopt.



What’s unique about Optuna, and what skyrocketed it to success, is the design of the API. You no longer need lines and lines of code to define the hyperparameter space, and then create an objective function to pass that space into your model.



Optuna has a define-by-run API, which means you can define the hyperparameter space as you need it—directly within the objective function. This simplicity has fully embraced the Pythonic way of coding, and it's a big part of why Optuna has become so popular. 🙌



What else sets Optuna apart:

  • Support for various sampling methods (random search, TPE, grid search and more)
  • Early stopping techniques like Successive Halving and Hyperband
  • Good documentation that lets you get started fast

And I’ll squeeze this in: to tune hyperparameters of scikit-learn algorithms, I don’t think you need to get out of the scikit-learn ecosystem. Randomized search has been shown to be one of the best methods for optimization, if allowed enough trials. And scikit-learn also supports successive halving to stop training suboptimal configurations, so you can save tons of time.



So, when should you use Optuna? When training models outside the sklearn ecosystem, like xgboost or lightgbms, and for neural networks.



I hope you find it useful!

Closing 2025 with Gratitude

Before I close this final newsletter of 2025, I want to take a moment to speak from the heart and wish our incredible Train in Data students and committee a very Happy New Year.

Image description

Thank you for being part of this journey. Your trust, dedication, curiosity, and ongoing support are what make Train in Data such a special community. To our students, your commitment to learning and growth continues to inspire me. To our committee, thank you for the care, time, and passion you put into building and supporting this space behind the scenes.



As we step into a new year together, I’m deeply grateful for each of you and excited for what’s ahead. May the year bring you clarity, growth, and many meaningful moments, both in learning and beyond.



With gratitude and warm wishes for the year ahead,

Sole

While you are at it, check out our courses:

Stop aimless internet browsing. Start learning today with meticulously crafted courses offering a robust curriculum, fostering skill development with steadfast focus and efficiency.

More courses

Did someone share this email with you? Think it's pretty cool? Then just hit the button and subscribe to Data Bites. Don’t miss out on any of our tips and propel your data science career to new heights.

Subscribe
Image description

Hi…I’m Sole



The main instructor at Train in Data. My work as a data scientist, includes creating and implementing machine learning models for evaluating insurance claims, managing credit risk, and detecting fraud. In 2018, I was honoured with a Data Science Leaders' award, and in 2019 and again in 2024, I was acknowledged as one of LinkedIn's voices in data science and analytics.

View

You are receiving this email because you subscribed to our newsletter, signed up on our website, purchased or downloaded any products from us.

Follow us on social media

Copyright (C) 2025 Train in Data. All rights reserved.

If you would like to unsubscribe, please click here.