glassbox.orchestrator.base_search¶
Abstract BaseSearch for grid/randomized search.
BaseSearch
¶
Bases: ABC
Abstract base class for search-based model selection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
estimator
|
BaseModel
|
The model to optimize. |
required |
param_space
|
Dict
|
Parameter search space. |
required |
cv_engine
|
BaseSplitter
|
Cross-validation splitter. |
required |
scoring_func
|
Callable
|
Scoring function used to evaluate candidates. |
required |
Attributes:
| Name | Type | Description |
|---|---|---|
best_params_ |
Dict
|
Best found parameter set. |
best_score_ |
float
|
Best scoring value. |
best_estimator_ |
BaseModel
|
Best estimator instance. |
Source code in glassbox/orchestrator/base_search.py
fit
¶
Fit the search object and select the best estimator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
X
|
ndarray
|
Training data of shape (n_samples, n_features). |
required |
y
|
ndarray
|
Target values of shape (n_samples,). |
required |
Returns:
| Type | Description |
|---|---|
Self
|
The fitted search object. |