def pipeline(self):
# This is a property for serialization support with xgboost,
# because we change self.clf after __init__.
pipeline = [self.vec]
if isinstance(self.clf, XGBClassifier):
# Work around xgboost issue:
# https://github.com/dmlc/xgboost/issues/1238#issuecomment-243872543
pipeline.append(CSCTransformer())
pipeline.append(self.clf)
return make_pipeline(*pipeline)
评论列表
文章目录