我得到以下错误:
File "<ipython-input-2-c2b8a0449401>", line 3
news_train = skd.load_files('C:\Users\ahmir\Downloads\Compressed\SkdLearnDataSet\20news-bydate-train',
^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
运行此代码时:
import sklearn.datasets as skd
categories = ['alt.atheism', 'soc.religion.christian','comp.graphics', 'sci.med']
news_train = skd.load_files('C:\Users\ahmir\Downloads\Compressed\SkdLearnDataSet\20news-bydate-train',
categories= categories, encoding= 'UTF-8')
news_test = skd.load_files('C:\Users\ahmir\Downloads\Compressed\SkdLearnDataSet\20news-bydate-test',categories= categories, encoding= 'ISO-8859-1')
目前没有回答
相关问题 更多 >
编程相关推荐