Skip to content

Conversation

@ZohaibHassan16
Copy link

Description

This PR introduces LightGBM-based test functions, which includes both a Regressor and a Classifier.

Related Issues

Fixes #6

Type of Change

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

How was this solved?

Here is what I did:

  1. Created the Classes: Built LightGBMRegressorFunction and LightGBMClassifierFunction classes.
  2. Hyperparameters & Stuff: Set up a search space with 9 params, used a closure in objective func and made sure model works with library's surrogate system.
  3. Registered Everything: I updated the __init__.py files in both folders

Checklist

Required

  • [ x] PR title includes appropriate tag: [ENH]
  • [ x] Code passes make check (lint, format, isort)

Tests

  • [ x] No tests needed (briefly explain why: The implementation follows established, verified temps by using existing models like RandomForest and DecisionTree, I just adhered to their convention)

Documentation

  • [ x] Documentation added/updated (docstrings, user guide, examples)

Note: New features ([ENH]) typically require both tests and documentation.
Bug fixes ([BUG]) should include a regression test when possible.

Testing

Verification can be performed by instantiating the classes and checking the search space or objective function:
from surfaces.test_functions.machine_learning.hyperparameter_optimization.tabular.regression import LightGBMRegressorFunction lgbm_f = LightGBMRegressorFunction(dataset="diabetes", cv=5) print(lgbm_f.search_space) lgbm_f._create_objective_function() print(f"Pure objective function ready: {lgbm_f.pure_objective_function is not None}")

Copy link
Owner

@SimonBlanke SimonBlanke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening the PR. I'll look into this. In the meantime you should also add this new feature to the docs: https://github.com/SimonBlanke/Surfaces/tree/main/docs/source

@ZohaibHassan16
Copy link
Author

Hey @SimonBlanke , just did and also fixed a few module export issues which I stubbed into while testing docs in terminal. Let me know if you need anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH] add LightGBM test-function for tabular machine-learning

2 participants