2016-11-06 67 views

回答

3

這是因爲twenty_newsgroups數據集是不是你的系統上下載。

像這樣運行您的示例代碼。

import logging 
from sklearn.datasets import fetch_20newsgroups 
logging.basicConfig() # to show logging message of what is happening behind the scene. 

categories = ['sci.med', 'sci.space'] 
twenty_sci_news = fetch_20newsgroups(categories=categories) 

它會顯示消息幕後發生的情況。嘗試相應的調試。

希望它有幫助!

相關問題