The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

"Integrating RM5 process in a Java application"

imim Member Posts: 12 Contributor II
edited June 2019 in Help
Hi, I have a little rapid miner 5 process that simply reads a csv, changes attribute to label and then i aply a decision tree. It runs ok.

How can I export that process in order to be possible to run it from a Java application?
Any little sample would be very appreciated.

Suppose I have defined these two operators:


Operator inputOperator = OperatorService.createOperator("read_csv.class");
inputOperator.setParameter("file_name","C:\\ing.csv");

Operator inputOperator2 = OperatorService.createOperator("set_role.class");
inputOperator2.setParameter("name","value");
inputOperator2.setParameter("target_role","label");

How do I connect the read CVS to the setRole operator?

Thanks a lot

IM
Tagged:

Answers

  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi,
    you could save a process designed in RapidMiner to xml and then load it using new Process(file) and execute it via process.run.

    Greetings,
      Sebastian
  • imim Member Posts: 12 Contributor II
    Thank you Sebastian.



    I used the option menu File|Export process to write it to xml file. Then when i try to load it the compiler says:

    [Fatal Error] :1:1: Content is not allowed in prolog.
    com.rapidminer.tools.XMLException: Cannot parse document: Content is not allowed in prolog.
            at com.rapidminer.Process.readProcess(Process.java:887)
            at com.rapidminer.Process.readProcess(Process.java:862)
            at com.rapidminer.Process.<init>(Process.java:225)
            at BkThread.createModel(BkThread.java:77)
            at BkThread.MakeAndExecuteModel(BkThread.java:47)
            at BkThread.run(BkThread.java:31)


    Any help?
    IM
  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi,
    would you post or attach a link on this process file?

    Greetings,
      Sebastian
  • imim Member Posts: 12 Contributor II
    How sad... it was invisible characters :-(

    It is running now very well.

    Thank you.

    IM
Sign In or Register to comment.