Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for model hyperparameter tuning #364

Open
fcogidi opened this issue Jan 11, 2023 · 0 comments
Open

Add support for model hyperparameter tuning #364

fcogidi opened this issue Jan 11, 2023 · 0 comments
Labels
enhancement New feature or request refactor Refactor existing code, with same or similar functionality

Comments

@fcogidi
Copy link
Collaborator

fcogidi commented Jan 11, 2023

The model wrappers have a method that is intended for tuning the model hyperparameters and returning the best model.
The method has the following signature:

    find_best(
        self,
        X: ArrayLike,
        y: ArrayLike,
        parameters: Union[Dict, List[Dict]],
        metric: Union[str, Callable, Sequence, Dict] = None,
        method: Literal["grid", "random"] = "grid",
        **kwargs,
    )

Currently, only the scikit-learn model wrapper SKModel implements this method, and that implementation would benefit from the following improvements:

  • Support using metrics from cyclops.evaluate.metrics in the hyperparameter search, potentially using the sklearn.metrics.make_scorer method.
  • Handle data splits e.g. predefined split, split by percentage, cross-validation split etc.
  • Support passing group and fit_params arguments when calling clf.fit.

The PyTorch model wrapper (PTModel) should implement this method as well, with the same behaviour as the sklearn model wrapper.

@fcogidi fcogidi added enhancement New feature or request refactor Refactor existing code, with same or similar functionality labels Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor Refactor existing code, with same or similar functionality
Projects
None yet
Development

No branches or pull requests

1 participant