Pages: [1]
  Print  
Author Topic: "Hello World" Plugin  (Read 4769 times)
tacio
Newbie
*
Posts: 5


« on: August 26, 2008, 03:54:29 PM »

Hello, I'm new here in the RapidMinner Community. I'm starting to develop a new open source clustering plugin for rapid miner. I followed the steps from the manual but I'm having some problems to create my first plugin.   Cry
I got a plugin from the web site, changed the manifest attributes and the operators.xml, and I created a new class extendind the  "AbstractFlatClusterer", and put all these stuff in jar file. At the end I put the jar file in the plugins directory.
My about scren apeared in the Help menu, but the plugin didn't show up in the Clustering operators folder in Rapid Miner GUI.
What Did I do wrong?
Here are the sttuf I wrote:

ABOUT.NFO:
Teste

MANIFEST.MF:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 1.5.0_16-b02 (Sun Microsystems Inc.)
Implementation-Vendor: Rapid-I
Implementation-Title: Teste
Implementation-URL: http://www.rapid-i.com
Implementation-Version: 4.2
RapidMiner-Version: 4.2
RapidMiner-Type: RapidMiner_Plugin

operators.xml:
<operators>

  operator
     name        = "Teste"         
     class       = "com.rapidminer.operator.learner.clustering.clusterer.TesteTacioCluster"
     description = "teste"
     group       = "Learner.Unsupervised.Clustering"/>

</operators>

TesteTacioCluster.java:
package com.rapidminer.operator.learner.clustering.clusterer;

import com.rapidminer.example.ExampleSet;
import com.rapidminer.operator.OperatorDescription;
import com.rapidminer.operator.OperatorException;
import com.rapidminer.operator.learner.clustering.ClusterModel;
import com.rapidminer.operator.learner.clustering.FlatCrispClusterModel;


public class TesteTacioCluster extends AbstractFlatClusterer
{

   public TesteTacioCluster(OperatorDescription description)
   {
      super(description);
      // TODO Auto-generated constructor stub
   }

   @Override
   public ClusterModel createClusterModel(ExampleSet exampleSet)
         throws OperatorException
   {
      // TODO Auto-generated method stub
      return new FlatCrispClusterModel();
   }

   @Override
   public boolean isFlatClusterer()
   {
      // TODO Auto-generated method stub
      return false;
   }

}

Thanks in advance for any help.
Logged
Tobias Malbrecht
Global Moderator
Sr. Member
*****
Posts: 293



WWW
« Reply #1 on: August 26, 2008, 04:07:11 PM »

Hi Tacio,

you mean that no operator Teste appeared in the operator group Leaner.Unsupervised.Clustering?

May I ask you, why you want to implement a new clustering plugin? Are there any clustering approaches you especially miss? The reason why I am asking is that we are currently revising the complete bunch of clustering approaches in RapidMiner which seem to result in at least a partial re-implementation. This will on the one hand increase the performance, on the other hand certainly crucially change the program structures concerning the clustering parts which might then lead to problems when you implement a plugin on the basis of the soon deprecated code.

Regards,
Tobias
Logged

Tobias Malbrecht
Director of Product Marketing
RapidMiner
tacio
Newbie
*
Posts: 5


« Reply #2 on: August 27, 2008, 02:22:09 PM »

Hi Mr. Tobias, the operator "Teste" didn't appear in the operator group "Leaner.Unsupervised.Clustering", but there is a "About Teste..." menu item in the "Help" Menu. I didn't understand why it's happened.

About yours questions:

Sure, you may ask.  Smiley
Well, I want to implement a new clustering plugin because my master thesis is about spatial clustering, so I'm planning to implement some spatial clustering algorithms (like CLARANS or BIRCH for example) in order to make a comparison about their results, since I didn't find these clustering algorithms implemented in any free software.

Regards,
Tacio
Logged
Tobias Malbrecht
Global Moderator
Sr. Member
*****
Posts: 293



WWW
« Reply #3 on: August 27, 2008, 03:16:29 PM »

Hi,

did maybe a line such as the following show up in the console when you started RapidMiner?

Code:
G Aug 27, 2008 4:09:16 PM: [Error] Cannot register 'TesteTacioCluster': java.lang.ClassNotFoundException: com.rapidminer.operator.learner.clustering.clusterer.TesteTacioCluster

Well, maybe these clustering algorithms may be interesting for us or the RapidMiner community as well and you would like to think about contributing them?! Wink

Regards,
Tobias
Logged

Tobias Malbrecht
Director of Product Marketing
RapidMiner
tacio
Newbie
*
Posts: 5


« Reply #4 on: August 27, 2008, 06:39:34 PM »

No, this line didn't appeared here. The log from the console is below.
And I will contribute with these plugins for sure. As son as a finish one them, I may upload it. But how can you see, I'm just in the begining. I would appreciate any help, too. Wink

The jar with the plugin is "teste.jar".
Here is the log:
RAPIDMINER_HOME is not set. Trying the directory 'C:\Arquivos de programas\Rapid\RapidMiner-4.2\scripts\..'...

Using local jre: C:\Arquivos de programas\Rapid\RapidMiner-4.2\scripts\..\jre\bin\java.exe...
Starting RapidMiner from 'C:\Arquivos de programas\Rapid\RapidMiner-4.2\scripts\..' using classes from 'C:\Arq
uivos de programas\Rapid\RapidMiner-4.2\scripts\..\lib\rapidminer.jar'...
G Aug 27, 2008 11:54:21 AM: rapidminer.home is 'C:\Arquivos de programas\Rapid\RapidMiner-4.2\scripts\..'.
G Aug 27, 2008 11:54:21 AM: Loading operators from 'C:\Arquivos de programas\Rapid\RapidMiner-4.2\scripts\..\l
ib\plugins\teste.jar'.
G Aug 27, 2008 11:54:21 AM: ----------------------------------------------------
G Aug 27, 2008 11:54:21 AM: Initialization Settings
G Aug 27, 2008 11:54:21 AM: ----------------------------------------------------
G Aug 27, 2008 11:54:21 AM: Default system encoding for IO: windows-1252
G Aug 27, 2008 11:54:21 AM: Load core operators...
G Aug 27, 2008 11:54:21 AM: Load Weka operators: true
G Aug 27, 2008 11:54:21 AM: Load JDBC drivers from lib directory: true
G Aug 27, 2008 11:54:21 AM: Load JDBC drivers from classpath: false
G Aug 27, 2008 11:54:21 AM: Load plugins: true
G Aug 27, 2008 11:54:21 AM: Load plugins from 'C:\Arquivos de programas\Rapid\RapidMiner-4.2\scripts\..\lib\pl
ugins'
G Aug 27, 2008 11:54:21 AM: ----------------------------------------------------
G Aug 27, 2008 11:54:21 AM: Read rcfile 'C:\Arquivos de programas\Rapid\RapidMiner-4.2\scripts\..\etc\rapidmin
errc'.
G Aug 27, 2008 11:54:21 AM: Trying rcfile 'C:\Arquivos de programas\Rapid\RapidMiner-4.2\scripts\..\etc\rapidm
inerrc.Windows XP'...skipped
G Aug 27, 2008 11:54:21 AM: Trying rcfile 'C:\Documents and Settings\T▀cio Vinicius\.rapidminer\4_2_0_rapidmin
errc'...skipped
G Aug 27, 2008 11:54:21 AM: Read rcfile 'C:\Documents and Settings\T▀cio Vinicius\.rapidminer\4_2_0_rapidminer
rc.Windows XP'.
G Aug 27, 2008 11:54:21 AM: Trying rcfile 'C:\Arquivos de programas\Rapid\RapidMiner-4.2\scripts\rapidminerrc'
...skipped
G Aug 27, 2008 11:54:21 AM: Trying rcfile 'C:\Arquivos de programas\Rapid\RapidMiner-4.2\scripts\rapidminerrc.
Windows XP'...skipped
G Aug 27, 2008 11:54:21 AM: Trying rapidminer.rcfile. Property not specified...skipped
G Aug 27, 2008 11:54:21 AM: Loading operators from 'operators.xml'.
G Aug 27, 2008 11:54:26 AM: Loading JDBC driver information from 'etc:jdbc_properties.xml'.
-------------------------------------------------------------------------------------------------------------------------------------------
Logged
Pascal Welke
Guest
« Reply #5 on: August 31, 2008, 02:09:08 PM »

Hello,

may it be that your operators.xml does not contain an opening branch "<" before "operator" in line 3?
I found out that even the smallest errors in operators.xml lead to a total ignorance of your plugin by rapidminer.

Greets, Pascal
Logged
Tobias Malbrecht
Global Moderator
Sr. Member
*****
Posts: 293



WWW
« Reply #6 on: August 31, 2008, 08:53:32 PM »

Hi,

this indeed might be the problem combined with the fact, that there is only one operator is present in Tacios operators.xml. If there is an improper operator tag in an operators.xml where there are more operators, at least some class not found errors appear. As a consequence, we should add an error message in the case the operators.xml of a plugin can not be properly read, if this is technically feasible (which I have not checked yet).

Regards,
Tobias
Logged

Tobias Malbrecht
Director of Product Marketing
RapidMiner
tacio
Newbie
*
Posts: 5


« Reply #7 on: September 10, 2008, 12:55:06 PM »

Yeah! I was only missing a "<". Now it's working. Thanks for the help.  Grin
Logged
tacio
Newbie
*
Posts: 5


« Reply #8 on: November 18, 2008, 09:40:09 PM »

Just closing the topic... My "Hello world" plugin became the "Clarans" plugin. As I promised, I sent it to the Rapid Miner staff using the "feature request tracker". If anyone has any observation about this plugin, get in contact with me.  Wink

Thanks for Helping.
Logged
Pages: [1]
  Print  
 
Jump to: