[scikit-learn] MinMaxScaler scales all (and only all) features in X?

Loïc Estève loic.esteve at ymail.com
Thu Jan 23 02:47:02 EST 2025


Hi,

it feels like you want to use a ColumnTransformer that can apply different preprocessing to different
columns, see e.g. this example:
https://scikit-learn.org/stable/auto_examples/miscellaneous/plot_pipeline_display.html#displaying-a-complex-pipeline-chaining-a-column-transformer

You can use 'passthrough' for the columns you don't want to change.

Cheers,
Loïc

> Hi,
>
> I have a mixture of table data and intermediate vectors from another model, which don't seem to scale productively. The fact that
> MinMaxScaler seems to do all features in X makes me wonder if/how people train with such mixed data.
>
> The easy approaches seem to be either scale the db data and then combine with the vectors, or just scale the db columns in place 'by hand'.
>
> Otherwise, I might consider adding a column-list option to the API.
>
> I suspect I'm just missing something important, since I wandered in following this purely-tabular example, which seemed good before adding
> ML-derived vectors:
>
> https://www.kaggle.com/code/carlmcbrideellis/tabular-classification-with-neural-networks-keras
>
> Any advice or more-appropriate example to follow would be great.
>
> Thanks,
>
> Bill
>
> -- 


More information about the scikit-learn mailing list