Код: Выделить всё
from sklearn import preprocessing
from sklearn.preprocessing import PowerTransformer
yj = PowerTransformer(method='yeo-johnson')
df = yj.fit_transform(df)
dump(yj, 'yeo_johnson_scaler.bin', compress=True)
Код: Выделить всё
yj=load('yeo_johnson_scaler.bin')
df = yj.transform(df)
Код: Выделить всё
/usr/local/lib/python3.10/dist-packages/sklearn/base.py:348: InconsistentVersionWarning: Trying to unpickle estimator StandardScaler from version 1.2.2 when using version 1.3.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations
warnings.warn(
Подробнее здесь: https://stackoverflow.com/questions/789 ... r-from-ver