Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
A minimal CatBoost example performing classification on the Iris dataset.
from catboost import CatBoostClassifier
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
# Load dataset
data = load_iris()
X_train, X_test, y_train, y_test = train_test_split(data.data, data.target, test_size=0.2, random_state=42)
# Define model
model = CatBoostClassifier(iterations=100, learning_rate=0.1, depth=3, verbose=0)
# Train model
model.fit(X_train, y_train)
# Predict
y_pred = model.predict(X_test)
print('Accuracy:', accuracy_score(y_test, y_pred))CatBoost (Categorical Boosting) is an open-source gradient boosting library developed by Yandex, optimized for handling categorical features automatically and providing state-of-the-art performance for classification, regression, and ranking tasks.
Origin & Creator
CatBoost was developed by Yandex in 2017 to provide a gradient boosting framework that efficiently handles categorical data while reducing prediction bias and overfitting.
Industrial Note
CatBoost is widely used in finance, recommendation systems, advertising, and other domains where tabular data contains categorical features and high predictive accuracy is needed.