yobx.sklearn.sklearn_helper#

class yobx.sklearn.sklearn_helper.TraceableTransformerMixin[source]#

Marks a transformer as traceable. Then its method transform will be traced to export it into ONNX.

yobx.sklearn.sklearn_helper.get_n_expected_outputs(estimator: BaseEstimator) int[source]#

Returns the number of expected outputs.

yobx.sklearn.sklearn_helper.get_output_names(estimator: BaseEstimator, convert_options: ConvertOptionsProtocol | None = None, name: str | None = None) Sequence[str] | None[source]#

Returns output names for every estimator.

yobx.sklearn.sklearn_helper.longest_prefix(names: Sequence[str]) str[source]#

Creates a common prefix for all name in names.

yobx.sklearn.sklearn_helper.post_process_output_names(estimator: BaseEstimator, output_names: Sequence[str], convert_options: ConvertOptionsProtocol | None = None, name: str | None = None) Sequence[str][source]#

Makes sures the number of outputs is expected.