2012-12-03 54 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

您必须在测试集中填充实例(填充每个属性的前三个实例的值),并且只保留该类为空。

问候, 莱昂纳多