【发布时间】:2016-04-20 12:56:19
【问题描述】:
我已经为分类任务创建了一些管道,我想检查每个阶段存在/存储的信息(例如 text_stats、ngram_tfidf)。我怎么能这样。
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))
])
【问题讨论】:
标签: python python-2.7 scikit-learn