"Using the series extension for your own operators"

RolandWRolandW Member Posts: 8 Contributor II
edited May 2019 in Help
Hey RM Community,

while it is fairly easy to use the standard rapidminer tools for your own extensions, it took me a while to find the extensions, RM provides with its extension manager. Specifically, I m processing data from postGIS (an extension to postgre) and I need to implement an interface between rapid miner and postgis. There is the postGIS jdbc that provides access to postGIS classes but RM does not understand them. So I need to transform them into data objects, RM understands, and of course backwards as well. The RM-series extension provides the classes I need, so I would like to use them. The problem is, I cant find the documentation of the extension nor do I find the source code. I presume I could use a decompiler on the jar file that holds the extension, but I would rather not do that because it tends to be quite messy.

Is there a good way to use the series extension?
Roland
Tagged:

Answers

  • fischerfischer Member Posts: 439 Maven
    Hi,

    the sources of the series extensions are on sourceforge, just as any other sources:

    http://sourceforge.net/projects/rapidminer/files/2.%20Extensions/Series/5.0/

    However, I'm not convinced yet that this has anything to do with your original postGIS problem. Where is the connection? :-)

    Cheers,
    Simon
  • RolandWRolandW Member Posts: 8 Contributor II
    Ohh there is no problem yet :) I was just wondering if it is possible to use the extensions for your own operators and apperently, it is :) Thank you! google didnt realy helped or I just used the wrong search phrase. Anyway, I hope it works as planed :)

    Best Regards,
    Roland
  • RolandWRolandW Member Posts: 8 Contributor II
    And now I already encountered the first problem.. :(

    If I want to use the series extension for for my own operator, I have to specify the series-library in the build path, specifically "rmx_series-5.0.2.jar" as external jar file.
    RapidMiner stores the extensions in "...\<user_name>\.RapidMiner5\managed\". If I specify this path, the extension class compiles, but the ant install fails because it expects the library in "...\EclipseProjects\RapidMiner_Extension_Template\lib". So I copy the rmx_series-5.0.2.jar file into this folder and specify it as library path in the build path. Again, the extension it self compiles and this time the ant install is successful. Also it runs smoothly unless I connect the output of the operator with one of the series extension operators. Than, RapidMiner produces a class cast exeption because the libraries (even through the files are identical) are not the same. Details of the error masseges are below.

    What can I do here?

    Best Regards,
    Roland


    Ant build error (case 1)
    [javac] Compiling 14 source files to C:\Dokumente und Einstellungen\wink_ro\Eigene Dateien\EclipseProjects\RapidMiner_Extension_Template\build
        [javac] C:\Dokumente und Einstellungen\wink_ro\Eigene Dateien\EclipseProjects\RapidMiner_Extension_Template\src\com\rapidminer\operator\soda\GISMultipointToSeries.java:47: package com.rapidminer.operator.valueseries does not exist
        [javac] import com.rapidminer.operator.valueseries.Complex;
        [javac]                                          ^
        [javac] C:\Dokumente und Einstellungen\wink_ro\Eigene Dateien\EclipseProjects\RapidMiner_Extension_Template\src\com\rapidminer\operator\soda\GISMultipointToSeries.java:48: package com.rapidminer.operator.valueseries does not exist
        [javac] import com.rapidminer.operator.valueseries.ValueSeries;
        [javac]                                          ^
    ....


        [javac] 15 errors
        [javac] 1 warning

    BUILD FAILED

    -----------------------------------------------------------------------------------

    Alternativly, the class cast exeption (case 2):

    2011-01-25 15:35:15 SEVERE: Process failed: operator cannot be executed (com.rapidminer.operator.valueseries.ValueSeries cannot be cast to com.rapidminer.operator.valueseries.ValueSeries). Check the log messages... (ProcessThread.run())
      java.lang.ClassCastException: com.rapidminer.operator.valueseries.ValueSeries cannot be cast to com.rapidminer.operator.valueseries.ValueSeries
          com.rapidminer.operator.valueseries.RapidMinerValueSeriesOperator.doWork(RapidMinerValueSeriesOperator.java:84)
          com.rapidminer.operator.Operator.execute(Operator.java:829)
          com.rapidminer.operator.execution.SimpleUnitExecutor.execute(SimpleUnitExecutor.java:51)
          com.rapidminer.operator.ExecutionUnit.execute(ExecutionUnit.java:709)
          com.rapidminer.operator.OperatorChain.doWork(OperatorChain.java:369)
          com.rapidminer.operator.Operator.execute(Operator.java:829)
          com.rapidminer.Process.run(Process.java:901)
          com.rapidminer.Process.run(Process.java:797)
          com.rapidminer.Process.run(Process.java:792)
          com.rapidminer.Process.run(Process.java:782)
          com.rapidminer.gui.ProcessThread.run(ProcessThread.java:62)
    2011-01-25 15:35:15 SEVERE: Here:          Process[1] (Process)
              subprocess 'Main Process'
                +- Read Database[1] (Read Database)
                +- gismultipoint_to_series[1] (gismultipoint_to_series)
          ==>  +- Visualize Series[1] (Visualize Series) (ProcessThread.run())
  • fischerfischer Member Posts: 439 Maven
    Hi,

    since you copied the series extension to your extension's lib (and did not remove it from its original place?)  RapidMiner will load the class twice, hence the class cast exception is expected.
    If you just need the classes at compile time, don't copy it to the lib dir, but just make sure it appears on the class path.

    Cheers,
    Simon

  • RolandWRolandW Member Posts: 8 Contributor II
    I think that is what the first error massege is about. If I leave the series extension jar in its original folder and set the compile pathin the project manager of eclipse to it ( i think thats equivalent to setting the classpath), the ant cant find the library in the lib folder. Therefore, the build fails. What I need is, to specify the folder with the rm-extensions in the ant file. But I dont know which option I have to set. I am sorry that this might be a very basic question, but I have never used ants before and after 1h of reading ant-tutorials, it appears to be not as easy as I thought.

    Best Regards,
    Roland
  • RolandWRolandW Member Posts: 8 Contributor II
    Is there someone who got an idea for a solution? I need the series extension at compiletime to transform the data into a suitable format and I would like to use the series extension for analysis after that. Maybe I even have to create a new operator that deals with series-examples. So I really need the series extension for compiling and during the data analysis process in RM. I cant rally beleave I am the first to encounter that problem, maybe I miss something or I am doing something wrong. Thanks in advance.
  • fischerfischer Member Posts: 439 Maven
    Hi,

    if you use the regular RapidMiner Extension build file, you can add something like this:

    <fileset id="build.dependentExtensions" dir="..">
    <include name="RapidMiner_Plugin_ValueSeries_Vega/build.xml" />
    </fileset>
    Best,
    Simon
Sign In or Register to comment.