Skip to content

Conversation

@pranjalmishra-ai
Copy link

Description

This PR improves the documentation for the BestEstimator class by replacing minimal docstrings with detailed NumPy-style documentation. It adds parameter descriptions, return types, and clear explanations for key methods.

Related Issues

Fixes #226

Type of Change

  • [BUG] - Bug fix (non-breaking change fixing an issue)
  • [ENH] - New feature (non-breaking change adding functionality)
  • [DOC] - Documentation changes
  • [MNT] - Maintenance

How was this solved?

I updated the docstrings for the following methods in src/hyperactive/integrations/sklearn/best_estimator.py:

  • score_samples, predict, predict_proba, predict_log_proba
  • decision_function, transform, inverse_transform
  • classes_ property

For each method, I added:

  1. Parameters Section: Defining X (array-like) and its shape.
  2. Returns Section: Defining the output format and shape.
  3. Correct Imports: Verified that helper functions like _deprecate_xt_in_inverse_transform are imported and used with the correct capitalization.

Checklist

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

Testing

Since this is a documentation-only change, no new tests were required.
I verified the syntax validity locally using:
python -m compileall src/hyperactive/integrations/sklearn/best_estimator.py

Additional Notes

Ensured indentation aligns with the project's existing code style.

@SimonBlanke SimonBlanke closed this Feb 1, 2026
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.

[DOC] Enhance BestEstimator docstrings

2 participants