0

I am performing a text categorization task in Rapid miner by integrating Rapid miner in Java. I am using 10-fold cross validation (x_validation operator). I have a requirement to access the samples in test/train splits in each fold ?

I have tried a lot but couldn't iterate through each fold ? i am new to Rapid miner so i am stuck at here....

I appreciate any help (i don't have enough reputation to upload image but it's a simple 10-fold cross validation process which i am accessing through java code) ...

Process process = new Process(new File(filePath));
        XValidation validation =(XValidation) process.getOperator("Validation");

        // how to do this step for each fold seperately as it may only be getting these operators only for first iteration/fold
        Operator naive_bayes = validation.getSubprocess(0).getOperatorByName("Naive Bayes"); 
        Operator apply_model = validation.getSubprocess(1).getOperatorByName("Apply Model");

        IOContainer container = process.run();

        IOObject train_data = naive_bayes_weka.getOutputPorts().getPortByIndex(0).getAnyDataOrNull();
        IOObject test_data = naive_bayes_weka.getInputPorts().getPortByIndex(1).getAnyDataOrNull();
4

1 回答 1

0

在大多数情况下,您不需要重建过程控制结构。只需将“存储”运算符添加到您的流程中,然后在需要的地方重新加载内容。除非您不想修改用于您的流程的所有运算符类,否则无法直接访问中间结果。

于 2014-09-24T09:39:03.913 回答