python中归一化、标准化模型保存与加载

归一化模型保存

from sklearn import preprocessing
min_max_scaler = preprocessing.MinMaxScaler()

X = min_max_scaler.fit_transform(X)

from sklearn.externals import joblib
joblib.dump(min_max_scaler, 'scalar01')

归一化模型加载

from sklearn.externals import joblib
min_max_scaler = joblib.load('scaler01')
X = min_max_scaler.fit_transform(X)

你可能感兴趣的:(机器学习,python)