yobx.sklearn.model_selection.random_search#
- yobx.sklearn.model_selection.random_search.sklearn_randomized_search_cv(g: GraphBuilderExtendedProtocol, sts: Dict, outputs: List[str], estimator: RandomizedSearchCV, X: str, name: str = 'randomized_search_cv') str | Tuple[str, ...][source]#
Converts a
sklearn.model_selection.RandomizedSearchCVinto ONNX by delegating to the converter registered forbest_estimator_.After fitting,
RandomizedSearchCVexposes the best model found during the randomized cross-validated search via itsbest_estimator_attribute. The ONNX graph produced here is therefore identical to converting that best estimator directly.X ──[best_estimator_ converter]──► output(s)
- Parameters:
g – the graph builder to add nodes to
sts – shapes and types defined by scikit-learn
outputs – desired output tensor names for the result
estimator – a fitted
RandomizedSearchCVX – name of the input tensor
name – prefix used for names of nodes added by this converter
- Returns:
name of the output tensor, or a tuple of output tensor names
- Raises:
AttributeError – if
estimatorhas not been fitted yet (i.e.best_estimator_does not exist)