[英]How to save a sklearn pipeline to json file?
我有我制作的这个自定义 sklearn 管道。 我想将它保存到我的数据库中,所以我需要将其转换为 json 格式。 我怎么能那样做?
Pipeline(steps=[('cleaner',
<ml.datatransformers.DataCleaner object at 0x000001C6936CB5B0>),
('engineering',
<ml.datatransformers.FeatureEngineering object at 0x000001C695C5D2E0>),
('prepare',
<ml.datatransformers.PrepareModel object at 0x000001C696ED0220>),
('xgb',
XGBRegressor(base_score=0.5, booster='gbtree', callbacks=None,
colsample_bylevel=1.0, colsample_bynode=...
gamma=0, gpu_id=-1, grow_policy='depthwise',
importance_type=None, interaction_constraints='',
learning_rate=0.300000012, max_bin=256,
max_cat_to_onehot=4, max_delta_step=0,
max_depth=10, max_leaves=0, min_child_weight=1.0,
missing=-999.0, monotone_constraints='()',
n_estimators=780, n_jobs=0, num_parallel_tree=1,
predictor='auto', random_state=0, reg_alpha=0,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.