2014-05-18 48 views
0

我现在面临Weka的一个常见问题,“列车和测试仪不兼容”。 我有一个csv格式的大型数据集。当我得到这样的错误时,我将我的数据集(用于练习目的)减少到列车集中的2个数据和测试集中的1个数据。我正在使用j48分类器。列车和测试仪不兼容:比较2个csv文件

我检查过相同的数据格式出现在csv中,并且同样的列标题也出现了。

列车组和测试组给出如下:

车组:

Stop Words/Punctuations1(L),Stop Words/Punctuations/Stemming1(L),Stop Words/Punctuations/Lammetizing1(L),Stop Words/Punctuations1(NC),Stop Words/Punctuations/Stemming1(NC),Stop Words/Punctuations/Lammetizing1(NC),Stop Words/Punctuations2(L),Stop Words/Punctuations/Stemming2(L),Stop Words/Punctuations/Lammetizing2(L),Stop Words/Punctuations2(NC),Stop Words/Punctuations/Stemming2(NC),Stop Words/Punctuations/Lammetizing2(NC),Stop Words/Punctuations3(L),Stop Words/Punctuations/Stemming3(L),Stop Words/Punctuations/Lammetizing3(L),Stop Words/Punctuations3(NC),Stop Words/Punctuations/Stemming3(NC),Stop Words/Punctuations/Lammetizing3(NC),Stop Words/Punctuations4(L),Stop Words/Punctuations/Stemming4(L),Stop Words/Punctuations/Lammetizing4(L),Stop Words/Punctuations4(NC),Stop Words/Punctuations/Stemming4(NC),Stop Words/Punctuations/Lammetizing4(NC),Stop Words/Punctuations5(L),Stop Words/Punctuations/Stemming5(L),Stop Words/Punctuations/Lammetizing5(L),Stop Words/Punctuations5(NC),Stop Words/Punctuations/Stemming5(NC),Stop Words/Punctuations/Lammetizing5(NC),(No Stop Words/Punctuations)1(L),(No Stop Words/Punctuations)/Stemming1(L),(No Stop Words/Punctuations)/Lammetizing1(L),(No Stop Words/Punctuations)1(NC),(No Stop Words/Punctuations)/Stemming1(NC),(No Stop Words/Punctuations)/Lammetizing1(NC),(No Stop Words/Punctuations)2(L),(No Stop Words/Punctuations)/Stemming2(L),(No Stop Words/Punctuations)/Lammetizing2(L),(No Stop Words/Punctuations)2(NC),(No Stop Words/Punctuations)/Stemming2(NC),(No Stop Words/Punctuations)/Lammetizing2(NC),(No Stop Words/Punctuations)3(L),(No Stop Words/Punctuations)/Stemming3(L),(No Stop Words/Punctuations)/Lammetizing3(L),(No Stop Words/Punctuations)3(NC),(No Stop Words/Punctuations)/Stemming3(NC),(No Stop Words/Punctuations)/Lammetizing3(NC),(No Stop Words/Punctuations)4(L),(No Stop Words/Punctuations)/Stemming4(L),(No Stop Words/Punctuations)/Lammetizing4(L),(No Stop Words/Punctuations)4(NC),(No Stop Words/Punctuations)/Stemming4(NC),(No Stop Words/Punctuations)/Lammetizing4(NC),(No Stop Words/Punctuations)5(L),(No Stop Words/Punctuations)/Stemming5(L),(No Stop Words/Punctuations)/Lammetizing5(L),(No Stop Words/Punctuation)5(NC),(No Stop Words/Punctuations)/Stemming5(NC),(No Stop Words/Punctuations)/Lammetizing5(NC),No Stop Words1(L),No Stop Words/Stemming1(L),No Stop Words/Lammetizing1(L),No Stop Words1(NC),No Stop Words/Stemming1(NC),No Stop Words/Lammetizing1(NC),No Stop Words2(L),No Stop Words/Stemming2(L),No Stop Words/Lammetizing2(L),No Stop Words2(NC),No Stop Words/Stemming2(NC),No Stop Words/Lammetizing2(NC),No Stop Words3(L),No Stop Words/Stemming3(L),No Stop Words/Lammetizing3(L),No Stop Words3(NC),No Stop Words/Stemming3(NC),No Stop Words/Lammetizing3(NC),No Stop Words4(L),No Stop Words/Stemming4(L),No Stop Words/Lammetizing4(L),No Stop Words4(NC),No Stop Words/Stemming4(NC),No Stop Words/Lammetizing4(NC),No Stop Words5(L),No Stop Words/Stemming5(L),No Stop Words/Lammetizing5(L),No Stop Words5(NC),No Stop Words/Stemming5(NC),No Stop Words/Lammetizing5(NC),No Punctuations1(L),No Punctuations/Stemming1(L),No Punctuations/Lammetizing1(L),No Punctuations1(NC),No Punctuations/Stemming1(NC),No Punctuations/Lammetizing1(NC),No Punctuations2(L),No Punctuations/Stemming2(L),No Punctuations/Lammetizing2(L),No Punctuations2(NC),No Punctuations/Stemming2(NC),No Punctuations/Lammetizing2(NC),No Punctuations3(L),No Punctuations/Stemming3(L),No Punctuations/Lammetizing3(L),No Punctuations3(NC),No Punctuations/Stemming3(NC),No Punctuations/Lammetizing3(NC),No Punctuations4(L),No Punctuations/Stemming4(L),No Punctuations/Lammetizing4(L),No Punctuations4(NC),No Punctuations/Stemming4(NC),No Punctuations/Lammetizing4(NC),No Punctuations5(L),No Punctuations/Stemming5(L),No Punctuations/Lammetizing5(L),No Punctuations5(NC),No Punctuations/Stemming5(NC),No Punctuations/Lammetizing5(NC),Class 
1.00,2.00,3.00,2.00,4.00,4.20,4.80,5.40,6.00,6.60,7.20,7.80,8.40,9.00,9.60,10.20,10.80,11.40,12.00,12.60,13.20,13.80,14.40,15.00,15.60,16.20,16.80,17.40,18.00,18.60,19.20,19.80,20.40,21.00,21.60,22.20,22.80,23.40,24.00,24.60,25.20,25.80,26.40,27.00,27.60,28.20,28.80,29.40,30.00,30.60,31.20,31.80,32.40,33.00,33.60,34.20,34.80,35.40,36.00,36.60,37.20,37.80,38.40,39.00,39.60,40.20,40.80,41.40,42.00,42.60,43.20,43.80,44.40,45.00,45.60,46.20,46.80,47.40,48.00,48.60,49.20,49.80,50.40,51.00,51.60,52.20,52.80,53.40,54.00,54.60,55.20,55.80,56.40,57.00,57.60,58.20,58.80,59.40,60.00,60.60,61.20,61.80,62.40,63.00,63.60,64.20,64.80,65.40,66.00,66.60,67.20,67.80,68.40,69.00,69.60,70.20,70.80,71.40,72.00,72.60,HR 
1.00,2.00,3.00,2.00,4.00,4.20,4.80,5.40,6.00,6.60,7.20,7.80,8.40,9.00,9.60,10.20,10.80,11.40,12.00,12.60,13.20,13.80,14.40,15.00,15.60,16.20,16.80,17.40,18.00,18.60,19.20,19.80,20.40,21.00,21.60,22.20,22.80,23.40,24.00,24.60,25.20,25.80,26.40,27.00,27.60,28.20,28.80,29.40,30.00,30.60,31.20,31.80,32.40,33.00,33.60,34.20,34.80,35.40,36.00,36.60,37.20,37.80,38.40,39.00,39.60,40.20,40.80,41.40,42.00,42.60,43.20,43.80,44.40,45.00,45.60,46.20,46.80,47.40,48.00,48.60,49.20,49.80,50.40,51.00,51.60,52.20,52.80,53.40,54.00,54.60,55.20,55.80,56.40,57.00,57.60,58.20,58.80,59.40,60.00,60.60,61.20,61.80,62.40,63.00,63.60,64.20,64.80,65.40,66.00,66.60,67.20,67.80,68.40,69.00,69.60,70.20,70.80,71.40,72.00,72.60,LR 

测试仪:

Stop Words/Punctuations1(L),Stop Words/Punctuations/Stemming1(L),Stop Words/Punctuations/Lammetizing1(L),Stop Words/Punctuations1(NC),Stop Words/Punctuations/Stemming1(NC),Stop Words/Punctuations/Lammetizing1(NC),Stop Words/Punctuations2(L),Stop Words/Punctuations/Stemming2(L),Stop Words/Punctuations/Lammetizing2(L),Stop Words/Punctuations2(NC),Stop Words/Punctuations/Stemming2(NC),Stop Words/Punctuations/Lammetizing2(NC),Stop Words/Punctuations3(L),Stop Words/Punctuations/Stemming3(L),Stop Words/Punctuations/Lammetizing3(L),Stop Words/Punctuations3(NC),Stop Words/Punctuations/Stemming3(NC),Stop Words/Punctuations/Lammetizing3(NC),Stop Words/Punctuations4(L),Stop Words/Punctuations/Stemming4(L),Stop Words/Punctuations/Lammetizing4(L),Stop Words/Punctuations4(NC),Stop Words/Punctuations/Stemming4(NC),Stop Words/Punctuations/Lammetizing4(NC),Stop Words/Punctuations5(L),Stop Words/Punctuations/Stemming5(L),Stop Words/Punctuations/Lammetizing5(L),Stop Words/Punctuations5(NC),Stop Words/Punctuations/Stemming5(NC),Stop Words/Punctuations/Lammetizing5(NC),(No Stop Words/Punctuations)1(L),(No Stop Words/Punctuations)/Stemming1(L),(No Stop Words/Punctuations)/Lammetizing1(L),(No Stop Words/Punctuations)1(NC),(No Stop Words/Punctuations)/Stemming1(NC),(No Stop Words/Punctuations)/Lammetizing1(NC),(No Stop Words/Punctuations)2(L),(No Stop Words/Punctuations)/Stemming2(L),(No Stop Words/Punctuations)/Lammetizing2(L),(No Stop Words/Punctuations)2(NC),(No Stop Words/Punctuations)/Stemming2(NC),(No Stop Words/Punctuations)/Lammetizing2(NC),(No Stop Words/Punctuations)3(L),(No Stop Words/Punctuations)/Stemming3(L),(No Stop Words/Punctuations)/Lammetizing3(L),(No Stop Words/Punctuations)3(NC),(No Stop Words/Punctuations)/Stemming3(NC),(No Stop Words/Punctuations)/Lammetizing3(NC),(No Stop Words/Punctuations)4(L),(No Stop Words/Punctuations)/Stemming4(L),(No Stop Words/Punctuations)/Lammetizing4(L),(No Stop Words/Punctuations)4(NC),(No Stop Words/Punctuations)/Stemming4(NC),(No Stop Words/Punctuations)/Lammetizing4(NC),(No Stop Words/Punctuations)5(L),(No Stop Words/Punctuations)/Stemming5(L),(No Stop Words/Punctuations)/Lammetizing5(L),(No Stop Words/Punctuation)5(NC),(No Stop Words/Punctuations)/Stemming5(NC),(No Stop Words/Punctuations)/Lammetizing5(NC),No Stop Words1(L),No Stop Words/Stemming1(L),No Stop Words/Lammetizing1(L),No Stop Words1(NC),No Stop Words/Stemming1(NC),No Stop Words/Lammetizing1(NC),No Stop Words2(L),No Stop Words/Stemming2(L),No Stop Words/Lammetizing2(L),No Stop Words2(NC),No Stop Words/Stemming2(NC),No Stop Words/Lammetizing2(NC),No Stop Words3(L),No Stop Words/Stemming3(L),No Stop Words/Lammetizing3(L),No Stop Words3(NC),No Stop Words/Stemming3(NC),No Stop Words/Lammetizing3(NC),No Stop Words4(L),No Stop Words/Stemming4(L),No Stop Words/Lammetizing4(L),No Stop Words4(NC),No Stop Words/Stemming4(NC),No Stop Words/Lammetizing4(NC),No Stop Words5(L),No Stop Words/Stemming5(L),No Stop Words/Lammetizing5(L),No Stop Words5(NC),No Stop Words/Stemming5(NC),No Stop Words/Lammetizing5(NC),No Punctuations1(L),No Punctuations/Stemming1(L),No Punctuations/Lammetizing1(L),No Punctuations1(NC),No Punctuations/Stemming1(NC),No Punctuations/Lammetizing1(NC),No Punctuations2(L),No Punctuations/Stemming2(L),No Punctuations/Lammetizing2(L),No Punctuations2(NC),No Punctuations/Stemming2(NC),No Punctuations/Lammetizing2(NC),No Punctuations3(L),No Punctuations/Stemming3(L),No Punctuations/Lammetizing3(L),No Punctuations3(NC),No Punctuations/Stemming3(NC),No Punctuations/Lammetizing3(NC),No Punctuations4(L),No Punctuations/Stemming4(L),No Punctuations/Lammetizing4(L),No Punctuations4(NC),No Punctuations/Stemming4(NC),No Punctuations/Lammetizing4(NC),No Punctuations5(L),No Punctuations/Stemming5(L),No Punctuations/Lammetizing5(L),No Punctuations5(NC),No Punctuations/Stemming5(NC),No Punctuations/Lammetizing5(NC),Class 
25.41,25.41,24.86,0.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,HR 

谁能告诉我对此。

谢谢你,

回答

0

好了,我不知道你的整个数据集,但为您发布的样品,我认为这将是因为在你测试集只有一个类的标签。我只是在测试集中复制了这一行,并添加了第二个标签(LR),一切正常。我想你必须在火车和测试集中有相同的类标签来评估分类器。祝你好运。