Hyperactive icon indicating copy to clipboard operation
Hyperactive copied to clipboard

[Feature] Add CatBoostCvExperiment integration (#229)

Open coder-jayp opened this issue 10 months ago • 2 comments

Description

Adds a new CatBoostCvExperiment integration that allows Hyperactive to perform cross-validation directly using CatBoost's native catboost.cv() function.

This enables efficient hyperparameter tuning for CatBoost models with built-in CV.

Related Issues

Closes #229

Type of Change

  • [x] [ENH] - New feature (non-breaking change adding functionality)

How was this solved?

  • Created new class CatBoostCvExperiment in src/hyperactive/experiment/integrations/catboost_cv.py
  • Implemented _evaluate() to run catboost.cv() with fixed CV settings and dynamic hyperparameters
  • Added optional metric and loss_function parameters (with automatic custom_metric handling when they differ)
  • Set direction tag to "lower" (CatBoost objectives are minimization)
  • Added CatBoostCvExperiment to init.py exports
  • Added two pytest tests in src/hyperactive/tests/test_integrations/test_catboost_cv.py:
    • Basic Logloss run
    • AUC metric with Logloss objective (verifies metric/loss separation)

Checklist

  • [x] PR title includes appropriate tag: [BUG], [ENH], [DOC] or [MNT]
  • [x] Linked to related issue (if applicable)
  • [ ] Code passes make check (lint, format, isort)
  • [x] Tests added/updated for changes (if applicable)
  • [ ] Documentation updated (if applicable)

Testing

Run the integration tests (verbose mode recommended):

pytest src/hyperactive/tests/test_integrations/test_catboost_cv.py -v

coder-jayp avatar Feb 02 '26 18:02 coder-jayp

@SimonBlanke, it would be great to get some feedback. Thanks.

coder-jayp avatar Feb 16 '26 15:02 coder-jayp

Hi @SimonBlanke, could you please review my PR?

coder-jayp avatar Apr 05 '26 17:04 coder-jayp