check_search_not_fitted_error¶
yohou.testing.check_search_not_fitted_error(search_cv, y, X_actual=None)
¶
Check fitted attributes before fit() raise NotFittedError.
Accessing fitted attributes before fit() must raise NotFittedError.
Calling predict() before fit() must raise NotFittedError or
AttributeError (AttributeError when refit=False is also
accepted).
Parameters ¶
| Name | Type | Description | Default |
|---|---|---|---|
search_cv
|
BaseSearchCV
|
Unfitted search CV instance |
required |
y
|
DataFrame
|
Test target data |
required |
X_actual
|
DataFrame
|
Test features |
None
|
Raises ¶
| Type | Description |
|---|---|
AssertionError
|
If neither NotFittedError nor (for predict) AttributeError is raised |