🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Different result when calling the same process from RM and from IDE[SOLVED]

User: "mmarag"
New Altair Community Member
Updated by Jocelyn
Hello to all,
i have created a RM process that reads a text document, process it with simple text mining operators (e.g. tokenize, transform cases, stopwords) and then loads a weight file and model file (i also tryied to add these as repositories, using retrieve) and classifies the document as positive or negative.

The same document is classified as negative (the right class when someone reads the content of the document) within RM but when called from inside the Java code in Netbeans (again the same process!) it is classified as positive :o

i am attaching a piece of code that calls the process. Any help is appreciated!

Manolis

File z=new File("C://Users//.....//Classify.rmp");
Process process1;
    IOContainer ioResult1 = null;
       try {
           process1 = new  Process(z);
            ioResult1 = process1.run();
        } catch (XMLException ex) {
            System.out.println("problem with XML Rapidminer");
        } catch (OperatorException ex) {
            System.out.println("problem with Operator Rapidminer");
        }
          ExampleSet resultSet1=(ExampleSet)ioResult1.getElementAt(0);
            Example example1=resultSet1.getExample(0);
             Attribute opinion=example1.getAttributes().get("prediction(Class)");
        String resultString1=example1.getValueAsString(opinion);

         System.out.println(comment+"->"+resultString1);

Find more posts tagged with

Sort by:
1 - 3 of 31
    User: "Skirzynski"
    New Altair Community Member
    Can you attach a minimal version of your process and a small amount of your data where this behaviour occurs?
    User: "mmarag"
    New Altair Community Member
    OP
    The problem is figured out and solved locally from netbeans. It seemed that Greek and Slovenian characters were not realized by Rapidminer when called from Java, a simple replace made the job. However, I think you people from RapidMiner have to check this issue for future cases..

    Best regards

    Manolis
    User: "Marco_Boeck"
    New Altair Community Member
    Hi,

    when creating a process by supplying a File parameter, RapidMiner uses UTF-8 encoding to read the file. If your textfile uses a different encoding, problems like yours may arise.

    Regards,
    Marco