Skip to content

[ENH] Add estimator details to html repr of estimators #7438

Open
@mateuszkasprowicz

Description

Currently, meta estimators (descendants of _HeterogenousMetaestimator) lack detailed information. An example from sklearn:

from sklearn.compose import ColumnTransformer
from sklearn.preprocessing import Normalizer

ct = ColumnTransformer(
    [("norm1", Normalizer(norm='l1'), [0, 1]),
     ("norm2", Normalizer(norm='l1'), slice(2, 4))])

ct

image

In contrast, an example from sktime:

from sktime.transformations.compose import ColumnEnsembleTransformer
from sktime.transformations.series.boxcox import BoxCoxTransformer
from sktime.transformations.series.exponent import ExponentTransformer

params2 = {
            "transformers": [("transformer1", ExponentTransformer(), [0])],
            "remainder": BoxCoxTransformer(method="fixed"),
        }

ct = ColumnEnsembleTransformer(**params2)

ct

image

As you can see there is no column names in ColumnEnsembleTransformer. The goal is to review other meta-estimators, override their default _sk_visual_block method and update name details based on appropriate estimator attribute.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions