Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created Feb 4, 2021
Embed
What would you like to do?
train_dataset = cb.Pool(X_train,y_train,
cat_features=categorical_indicies)
test_dataset = cb.Pool(X_test,y_test,
cat_features=categorical_indicies)
model = cb.CatBoostClassifier(loss_function='Logloss',
eval_metric='Accuracy')
grid = {'learning_rate': [0.03, 0.1],
'depth': [4, 6, 10],
'l2_leaf_reg': [1, 3, 5,],
'iterations': [50, 100, 150]}
model.grid_search(grid,train_dataset)
pred = model.predict(X_test)
print(classification_report(y_test, pred))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment