yobx.sklearn.feature_selection.rfe#
- yobx.sklearn.feature_selection.rfe.sklearn_rfe(g: GraphBuilderExtendedProtocol, sts: Dict, outputs: List[str], estimator: RFE, X: str, name: str = 'rfe') str[source]#
Converts a
sklearn.feature_selection.RFEinto ONNX.After fitting, the transformer keeps the features selected by recursive feature elimination. The selected column indices are stored in
estimator.get_support(indices=True)and are fixed constants at conversion time, so the ONNX graph contains a singleGathernode that selects those columns from the input matrix:X ──Gather(axis=1, indices)──► output
- Parameters:
g – the graph builder to add nodes to
sts – shapes defined by scikit-learn
estimator – a fitted
RFEoutputs – desired output names
X – input name (shape
(N, F))name – prefix name for the added nodes
- Returns:
output name
- yobx.sklearn.feature_selection.rfe.sklearn_rfecv(g: GraphBuilderExtendedProtocol, sts: Dict, outputs: List[str], estimator: RFECV, X: str, name: str = 'rfecv') str[source]#
Converts a
sklearn.feature_selection.RFECVinto ONNX.After fitting, the transformer keeps the features selected by recursive feature elimination with cross-validation. The selected column indices are stored in
estimator.get_support(indices=True)and are fixed constants at conversion time, so the ONNX graph contains a singleGathernode that selects those columns from the input matrix:X ──Gather(axis=1, indices)──► output
- Parameters:
g – the graph builder to add nodes to
sts – shapes defined by scikit-learn
estimator – a fitted
RFECVoutputs – desired output names
X – input name (shape
(N, F))name – prefix name for the added nodes
- Returns:
output name