Catboost hyperparams search
ML System Design practice on Codemia
Design recommenders, ranking systems and training pipelines the way ML interviews actually ask for them, with worked solutions.
CatBoost, a high-performance open-source library, is widely used for gradient boosting on decision trees. It provides excellent support for categorical features, making it suitable for a variety of machine learning tasks. Just as with any sophisticated machine learning framework, the selection of hyperparameters for CatBoost plays a crucial role in achieving optimal performance. In this article, we will delve into some best practices and strategies for CatBoost hyperparameters search.
Understanding Key Hyperparameters
Before we dive into the methods for hyperparameter tuning, it's essential to understand the key hyperparameters in CatBoost:
- Learning Rate (
eta):- Controls the contribution of each tree to the final prediction.
- Smaller values may offer better convergence at the expense of longer training times.
- Typical range:
0.01to0.3.
- Depth:
- Determines the maximum depth of trees.
- Balances model complexity and performance.
- Typical range:
4to10.
- Iterations (
n_estimators):- Defines the number of trees in the model.
- Larger numbers may lead to overfitting; requires a balancing act with learning rate.
- Typical values:
300to1000.
- L2 Leaf Regularization:
- Applies regularization to prevent overfitting.
- A regularization technique applied to the values in the leaves.
- Suggested starting range:
1to10.
- Random Strength:
- Noise level added to features for scoring in each tree construction step.
- Helps in building more diverse trees.
- Typical range:
1to20.
- Bagging Temperature:
- Controls the amount of randomness in bagging.
- Higher values result in more aggressive data sampling and diversified trees.
- Typical range:
0to1.
- Grow Policy:
- Determines tree growth strategy:
SymmetricTree,Depthwise, orLossguide.
Hyperparameter Tuning Strategies
1. Grid Search
Grid search is a brute-force technique where we test all the combinations of a fixed set of hyperparameter values. Its simplicity makes it a good option for small datasets or when computational resources are not a constraint.
Related reading
- Categorical and continuous cross feature column in Tensorflow
- Categorical features correlation
- Categorical focal loss on keras
- CBOW v.s. skip-gram why invert context and target words?
- Caterpillars and Leaves. Can we do better than Onc?
- Celery does not release memory
- C/C Machine Learning Libraries for Clustering
- Change default GPU in TensorFlow

DSA Fundamentals
Master algorithmic patterns and data structures through hands-on LeetCode-style problems - from arrays and hashing to dynamic programming and advanced graphs.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
ML System Design practice on Codemia
Design recommenders, ranking systems and training pipelines the way ML interviews actually ask for them, with worked solutions.