Categories

Versions

You are viewing the RapidMiner Developers documentation for version 9.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 fileOperatorsNAME.xmland 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 foldercom.rapidminer.resources.iconsand subfolders called16,24and48.
    • 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 foldercom.rapidminer.resources.icons.

At this point you can already build the extension and use it in RapidMiner Studio. You could see the operator in theOperator Tree, but its name would be the key. Instead, you need to define a translation from the key to the operator name in the fileOperatorsDocNAME.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 caseMy Operator). To improve the search results you can define additional tags per operator.

  my_own_operator My Operator  My First Tag My Second Tag   

Coloring your operator

If you want your operator to have a specific color, open the filegroupsNAME.propertiesand 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 theGradle Tasks视图和双击任务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 theOperators Treepanel in theExtensionsgroup. 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 toadd input and output ports, for example, if your operator should process an example set. Look at theParameterspanel and theHelppanel, and you'll see that there are not yet parameters that you can set or help for your operator.Adding parametersto your operator helps users to configure how your operator should be executed.添加文件;nto 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.