2012-12-03 103 views
0

爲什麼weka無法正確預測測試集的值?使用爲什麼weka無法正確預測測試集的值?

命令:

weka -c 'weka.classifiers.functions.SMO -no-cv -t triggering.arff -d triggering.model' 
weka -c 'weka.classifiers.functions.SMO -p 0 -T triggering-new.arff -l triggering.model' 

題庫數據:

@relation triggering 

@attribute iota real 
@attribute A{TRUE, FALSE} 
@attribute B{TRUE, FALSE} 
@attribute C{TRUE, FALSE} 

@data 
10, FALSE, FALSE, FALSE 
20, FALSE, FALSE, FALSE 
30, FALSE, TRUE, FALSE 
40, FALSE, FALSE, TRUE 
50, TRUE, FALSE, FALSE 

測試數據:

@relation triggering-new 

@attribute iota real 
@attribute A{TRUE, FALSE} 
@attribute B{TRUE, FALSE} 
@attribute C{TRUE, FALSE} 

@data 
10, ?, ?, ? 
20, ?, ?, ? 
30, ?, ?, ? 

預測:

=== Predictions on test data === 

inst#  actual predicted error prediction 
    1  1:? 2:FALSE  1 
    2  1:? 2:FALSE  1 
    3  1:? 2:FALSE  1 

回答

0

我認爲你的意思是測試集不是訓練集,因爲這是你在這裏提供的輸出。測試集數據不具有屬性值。如果您試圖預測A給定B和C的值,則必須在測試數據集中提供B和C.

+0

我試圖預測A,B和C中給出絲毫的價值。 – user252816

0

您必須在測試集中填充實例(填充每個屬性的前三個實例的值),並且只保留該類爲空。

問候, 萊昂納多