Integrating RapidMiner into your application

skbalu
skbalu New Altair Community Member
edited November 5 in Community Q&A
Anybody has working Java example to invoke RapidMiner programmatically and open one of the RapidMiner examples? If so, can you please send it to me?

thanks
Tagged:

Answers

  • land
    land New Altair Community Member
    Hi,
    all you have to do is to invoke one of the static init methods of the RapidMiner class. After this, you can use any part of the API you want. The current javadoc of the API is available at sourceforge https://sourceforge.net/projects/yale/files/1.%20RapidMiner/5.0/rapidminer-5.0-javadoc.zip/download.
    For loading processes, you can construct them using one of the constructors of Process. (Make sure it's the RapidMiner Process class and not the Process class of Java itself.)

    For giving you more detailed descriptions, it would be very helpful if you could explain what you are going to do?

    Greetings,
      Sebastian
  • skbalu
    skbalu New Altair Community Member
    Hi Sebastian,

    Thanks for the response. All that I want is a Java program which start RapidMiner process, open the one of the sample XML file and then either display the data of the sample through the Java program or display the graph itself.

    Also, some of the sample java modules given in the tutorial are giving compilation errors. The compilor is unable to find the below methods.

    getPredictedLabel
    getExampleReader
    getMyNumOfAttributes
    getMyNumOfDataRows

    Thanks in advance.
  • biti
    biti New Altair Community Member
    Hi,

    I just did some work for RM4 some time ago and need to transfer it to RM5 now.
    For RM4.x there was a tutorial, explaining die ways to use RM in a Java application.
    For RM5 I can not find something like this.

    I have to create the whole process (loading and apply a model on some loaded data) dynamically and head some problems, I already mentioned in http://rapid-i.com/rapidforum/index.php/topic,1743.0.html
    (I thought the developement Forum would be the most adequate one...)

    Greetings from Dortmund

    Markus
  • land
    land New Altair Community Member
    Hi all,
    which tutorial are you referring to, skbalu? Which version of RapidMiner do you use anyway?

    And Markus, I will answer there. As you said, it's probably a much better location for discussing development...

    Greetings,
      Sebastian
  • CDriver
    CDriver New Altair Community Member
    Sebastian,

    I believe he's referring to the sample code in Figure 7.3(Integrating RapidMiner into your application).  I'm attempting to use RapidMiner in my code and ran into similar issues.  Unfortunately the tutorial has not been updated to reflect the API changes in Ver 5.0

    I did a quick search of the forum and it looks like it should be:

    "Attribute predictedLabel = resultSet.getAttributes().getPredictedLabel();"

    But I don't know about the other compilation errors. 

  • skbalu
    skbalu New Altair Community Member
    I tried in all versions but it gives same errors, in fact I get more errros in v5.0
  • land
    land New Altair Community Member
    Hi,
    ok, let me try to make things clear:
    The Tutorial for 4.x does not apply to RapidMiner 5.0!
    We have changed a lot since then but I bet, each line of code that must be changed is worth that effort. RapidMiner 5.0 has been improved a lot. Not only for the users, but also in the coding style and ease. Unfortunately we don't have a new tutorial available, so don't try to use the old one!
    There's the java doc available at source forge and we have a tutorial for writing extensions in our web shop. It also treats how to access data and such stuff. So it's probably worth a look for you.

    Greetings,
      Sebastian
  • skbalu
    skbalu New Altair Community Member
    Sebastian,

    It will be very useful if you have sample java web application programs which can be copied, compiled and run in our environment. We want to use RapidMiner but as with any other software we have starting problems to integrate RapidMiner in an external application using java API. Once, we have sample programs working then we can explore and enhance. We are planning to buy enterprise license but before that we have develop a prototype and show it to the management for funding.

    If you have a sample java web application which can open an existing sample XML file (supplied by RapidMiner), display the data and graph on the browser then we can take it further from there. If we struggle to show the prototype then selling the product to the user base and getting the funding will be difficult.

    Why don't RapidMiner people include working samples?

    thanks
    SK
  • land
    land New Altair Community Member
    Hi,
    RapidMiner people probably don't include working samples because as all humans, they have only two arms and hence only ten fingers.
    Wahoo, it would be really great having for arms and two heads: Then I could answer user questions AND code examples.

    But back to the topic: You are going to integrate RapidMiner into your own application and face some problems. If I understood you correctly, the application is web based, because you want to show the results in a Browser? Then I would try a completely different approach of using RapidAnalytics instead of RapidMiner itself. It can provide plots and data or other results of processes as web service, so that you can directly address it from the JavaScript of your webpage. I think this would be the preferable solution instead of loading a applet with the size of RapidMiner...

    Greetings,
      Sebastian
  • CDriver
    CDriver New Altair Community Member
    Sebastian,

    I'm with SK.  My company cannot proceed with buying RapidMiner licenses if I can't even make it do simple stuff.  What is taking me hours to figure out, you and your team can whip up in 30 minutes.  Consider some sample programs for your users to be an investment in future sales.  It will help!!!