Search code examples
javaeclipseclassificationrapidminer

How to import RapidMiner JARs in Eclipse?


I want to create a RapidMiner classifier on Java that classifies a user based on his/her touch input. I have searched for days now, I have RapidMiner Studio and have downloaded the rapidMiner-studio from github - but I don't know which one should I include on my library/build path.

Do I just include all of them? Any help would be greatly appreciated.


Solution

  • I found the answer to my question, so far I found out that you can run a process ( a .rmp) file you created from RapidMiner in Eclipse, and the JAR files i added are located at C:\Program Files\RapidMiner\RapidMiner Studio\lib

    Here's my code:

    package rapid_process;
    
    import com.rapidminer.Process;
    import com.rapidminer.RapidMiner;
    import com.rapidminer.operator.Operator;
    import com.rapidminer.operator.OperatorException;
    //import com.rapidminer.operator.io.ExcelExampleSource;
    import com.rapidminer.tools.XMLException;
    import java.io.File;
    import java.io.IOException;
    import java.lang.Object;
    
    public class process {
    
    public static void main(String[] args) throws IOException, XMLException, OperatorException {
        /*// Path to process-definition
        final String processPath = "C:/Users/Evie/.RapidMiner/repositories/Local Repository/processes/Compare ROCs.rmp";
    
        // Init RapidMiner
        RapidMiner.setExecutionMode(ExecutionMode.COMMAND_LINE);
        RapidMiner.init();
    
        // Load process
        final com.rapidminer.Process process = new com.rapidminer.Process(new File(processPath));
        process.run();*/
    
        try {
              RapidMiner.setExecutionMode(RapidMiner.ExecutionMode.COMMAND_LINE);
              RapidMiner.init();
    
              Process process = new Process(new File("C:/Users/YourUser/.RapidMiner/repositories/Local Repository/processes/Compare ROCs.rmp"));
    
              process.run();
    
            } catch (IOException | XMLException | OperatorException ex) {
              ex.printStackTrace();
            }
    
        }
    
    }