Categories

Versions

You are viewing the RapidMiner Developers documentation for version 10.2 - Check here for latest version

Changing Configurations

To test your operator in RapidMiner Studio, you must first change some configuration in the extension project. Adapt the following two files (replace 'NAME' with the name of your extension):

  • OperatorsNAME.xml
  • OperatorsDocNAME.xml

Here is how to make your operators available to RapidMiner:

  1. Decide on a name of the operator group to put the operator in.
  2. Open the file OperatorsNAME.xml and add the new group with a key.
  3. Add an operator tag. The operator has a key, the class (with the complete package path) and, optionally, an icon. If an icon is already part of the RapidMiner Core, you can just use it.

    Otherwise:

    • Create the folder com.rapidminer.resources.icons and subfolders called 16, 24 and 48.
    • Paste the icon you want to use in the sizes 16x16 pixels, 24x24 pixels and 48x48 pixels in the respective folder.
    • Add a 96x96 pixels version of the icon directly to the folder com.rapidminer.resources.icons.

At this point you can already build the extension and use it in RapidMiner Studio. You could see the operator in the Operator Tree, but its name would be the key. Instead, you need to define a translation from the key to the operator name in the file OperatorsDocNAME.xml. Define the key and name for every operator and the operator group.

The operator search in RapidMiner Studio will find operators not only by name (in this case My Operator). To improve the search results you can define additional tags per operator.

<operatorHelp>
    <operator>
        <key>my_own_operator</key>
        <name>My Operator</name>
        <tags>
            <tag>My First Tag</tag>
            <tag>My Second Tag</tag>
        </tags>
    </operator>
</operatorHelp>

Coloring your operator

If you want your operator to have a specific color, open the file groupsNAME.properties and add a color for your operator group. Use the operator group key to define the operator group and use a Hex code to define the operator color. For example:

# Operator group colors
group.operator_test.color = #5FDE35

Testing your operator

The following section describes how to test your operator.

Installing the extension

To install the extension:

  • If you are using Eclipse, select the project in the Gradle Tasks view and double-click the task installExtension.
  • If using a text editor, open a command prompt, browse to the extension template project and execute the following command:

      ./gradlew installExtension
    

Starting RapidMiner Studio

Open RapidMiner Studio and find your operator group in the Operators Tree panel in the Extensions group. Drag the new operator on to the process canvas. Verify that the operator has the color and icon that you defined and that it has a name instead of a key. You can run the process and the operator will produce a log entry, but depending on the purpose of your operator, there might be something missing.

It might be helpful to add input and output ports, for example, if your operator should process data. Look at the Parameters panel and the Help panel, and you'll see that there are not yet parameters that you can set or help for your operator. Adding parameters to your operator helps users to configure how your operator should be executed. Adding documentation to your operator is obviously useful. Use it to explain what your operator does and which parameters can be set. You can even add sample processes.