2014-05-18 91 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),一切正常。我想你必須在火車和測試集中有相同的類標籤來評估分類器。祝你好運。