2
我有非常明確的機器學習訓練集(只有字符串屬性)。爲什麼WEKA-TestSets必須具有類屬性?
例如
@relation training_rel
@attribute class {politics,sports}
@attribute text string
@data
politics,'some text about politics over here'
... // a lot of other training instances of class politics
sports,'and now some sports over here'
... // a lot of other training instances of class sports
好吧,這是我的訓練集,當然只是一個例子...現在我想建立一個分類器(NaiveBayes)。這工作完全正常。我知道大多數分類器無法處理文本,所以我必須過濾我的數據。我爲此使用了一個StringToWordVector。
我發現的網絡上的所有示例都定義了測試實例也具有類值(http://www.cs.ubc.ca/labs/beta/Projects/autoweka/datasets/) 但是爲什麼?我的意思是我不知道我的文本是屬於政治還是體育,這就是爲什麼我使用分類器來了解這個...我明白錯誤嗎?