我正在使用`sklearn.pipeline.Pipeline`来链接特征提取器和分类器。有没有一种方法可以并行地结合多个特征选择类(例如来自`sklearn.feature_selection.text`)并连接它们的输出?
我的代码现在看起来如下:
我的代码现在看起来如下:
pipeline = Pipeline([
('vect', CountVectorizer()),
('tfidf', TfidfTransformer()),
('clf', SGDClassifier())])
它的结果如下:
vect -> tfidf -> clf
我想要能够指定以下管道:
vect1 -> tfidf1 \
-> clf
vect2 -> tfidf2 /