[英]How to use WEKA Machine Learning for a Bayes Neural Network and J48 Decision Tree
我正在尝试找出WEKA并使用我拥有的数据进行一些实验。
基本上我想做的是获取数据集1,将其用作训练集。 在其上运行J48决策树。 然后采用数据集2并在其上运行经过训练的树,原始数据集的输出带有一个用于预测的额外列。
然后使用贝叶斯神经网络再次执行相同的操作。
有人可以给我指向详细说明的链接,以说明我将如何精确地完成此操作? 我似乎缺少一些步骤,并且无法使用额外的列获取原始数据集的输出。
这是使用命令行执行此操作的一种方法。 该信息可在软件随附的Weka手册的第1章(“命令行入门”)中找到。
java weka.classifiers.trees.J48 -t training_data.arff -T test_data.arff -p 1-N
哪里:
-t <training_data.arff> specifies the training data in ARFF format
-T <test_data.arff> specifies the test data in ARFF format
-p 1-N specifies that you want to output the feature vector and the prediction,
where N is the number of features in your feature vector.
例如,在这里,我同时使用bean.arff进行培训和测试。 特征向量中有35个特征:
java weka.classifiers.trees.J48 -t大豆.arff -T大豆.arff -p 1-35
输出的前几行如下所示:
=== Predictions on test data ===
inst# actual predicted error prediction (date,plant-stand,precip,temp,hail,crop-hist,area-damaged,severity,seed-tmt,germination,plant-growth,leaves,leafspots-halo,leafspots-marg,leafspot-size,leaf-shread,leaf-malf,leaf-mild,stem,lodging,stem-cankers,canker-lesion,fruiting-bodies,external-decay,mycelium,int-discolor,sclerotia,fruit-pods,fruit-spots,seed,mold-growth,seed-discolor,seed-size,shriveling,roots)
1 1:diaporth 1:diaporth 0.952 (october,normal,gt-norm,norm,yes,same-lst-yr,low-areas,pot-severe,none,90-100,abnorm,abnorm,absent,dna,dna,absent,absent,absent,abnorm,no,above-sec-nde,brown,present,firm-and-dry,absent,none,absent,norm,dna,norm,absent,absent,norm,absent,norm)
2 1:diaporth 1:diaporth 0.952 (august,normal,gt-norm,norm,yes,same-lst-two-yrs,scattered,severe,fungicide,80-89,abnorm,abnorm,absent,dna,dna,absent,absent,absent,abnorm,yes,above-sec-nde,brown,present,firm-and-dry,absent,none,absent,norm,dna,norm,absent,absent,norm,absent,norm)
这些列是:(1)数据实例号; (2)地面真相标签; (3)预测标签; (4)错误; (5)预测置信度; (6)特征向量。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.