我爲分類任務創建了一些管道,我想查看每個階段存在/存儲的信息(例如,text_stats,ngram_tfidf)。我怎麼能這樣做。Sklearn:有什麼方法可以調試管道?
pipeline = Pipeline([
('features',FeatureUnion([
('text_stats', Pipeline([
('length',TextStats()),
('vect', DictVectorizer())
])),
('ngram_tfidf',Pipeline([
('count_vect', CountVectorizer(tokenizer=tokenize_bigram_stem,stop_words=stopwords)),
('tfidf', TfidfTransformer())
]))
])),
('classifier',MultinomialNB(alpha=0.1))
])