WEKA RandomForest模型加载。 Weka异常:没有训练文件,也没有给出对象输入文件

时间:2015-10-25 11:41:42

标签: shell weka

我目前正在使用两个shell脚本来训练/测试随机森林模型。 当我训练模型时,我完全没有问题。但是,在调用尝试加载模型的test.sh时,会生成以下错误:

Weka exception: No training file and no object input file given.

General options:

-h or -help
    Output help information.
-synopsis or -info
    Output synopsis for classifier (use in conjunction  with -h)
-t <name of training file>
    Sets training file.
...

在train.sh我有:

 java -Xmx1g -classpath $CLASSPATH:weka.jar weka.classifiers.trees.RandomForest \
    -t "$FileNameFeaturesTrain_weka" \
    -no-cv \
    -I $numTrees -K $numFeat -S 0 \
    -p 0 -distribution -d "$fileNameModel" > "$fname_output_pred"

在test.sh中我有:

java -Xmx1g -classpath $CLASSPATH:weka.jar weka.classifiers.trees.RandomForest \
    -l "$FileNameModel" \
    -T "$FileNameFeaturesTest_weka" \
    -no-cv \
    -p 0 -distribution > "$fname_output_pred"

我不明白为什么模型没有加载到我的test.sh脚本中。但是,相同的逻辑和标志适用于weka.classifiers.functions.Logistic,weka.classifiers.functions.MultilayerPerceptron等。此错误仅发生在RandomForest中。我正在使用WEKA 3.6.12。 我将不胜感激任何提示或意见。 谢谢,

0 个答案:

没有答案