Skip to content

Add grid search hyperparameter tuning example #36

@noahgift

Description

@noahgift

Add comprehensive example demonstrating grid search for hyperparameter tuning with regularized regression models.

Background:
Grid search is a fundamental technique for hyperparameter optimization, but we currently lack an example showing how to use our grid_search_alpha() function for tuning regularization parameters.

Scope:
Create example demonstrating:

  1. Grid search basics with cross-validation
  2. Tuning alpha for Ridge regression
  3. Tuning alpha for Lasso regression
  4. Tuning alpha and l1_ratio for ElasticNet
  5. Interpreting GridSearchResult (best params, scores, indices)
  6. Comparing optimal vs. default hyperparameters

Deliverables:

  • Create examples/grid_search_tuning.rs
  • Add book chapter: book/src/examples/grid-search-tuning.md
  • Update SUMMARY.md
  • Show performance improvement from tuning
  • Demonstrate cross-validation integration
  • Include visualization of alpha vs. score curves

Use Case:
Show practical workflow:

  1. Define parameter grid
  2. Run grid search with K-Fold CV
  3. Identify best parameters
  4. Retrain with optimal params
  5. Evaluate on test set

Labels: documentation, enhancement, model-selection

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions