how to use rapid miner with c # per command line

rodriguezestefarodriguezestefa Member Posts: 3 Newbie
Hi, sorry, I'm new to this, I need help.
 I try to use a rapid miner process saved in a local repository, I've seen this code in some question:
 ProcessStartInfo Info = new ProcessStartInfo("C:/Program Files/Rapid-I/RapidMiner/scripts/rapidminer.bat");
           Info.UseShellExecute = false;
           Info.ErrorDialog = false;
           Info.CreateNoWindow = true;
           Info.RedirectStandardOutput = true;
           Info.Arguments = "C:/Program Files/Rapid-I/RapidMiner/scripts/01_ParameterOptimization.xml";
   
           Process p = System.Diagnostics.Process.Start(Info);

           System.IO.StreamReader oReader2 = p.StandardOutput;
           string sRes = oReader2.ReadToEnd();
           oReader2.Close();
           //All the external programs output is now in sRes
                       
           Console.WriteLine(sRes);
           Console.ReadLine();
Where do I pass the repository route to execute the process? 
How do I send the new excel file from which I want to obtain results based on the training set already done?, 

Answers

  • David_ADavid_A Moderator, Employee, RMResearcher, Member Posts: 110  RM Research
    Hi,

    I don't know any specifics for the C# interface but basic command line interface for RapidMiner works as follows:


    Either from the repository: (here for example via sh command for linux):​

    • sh ./programs/rapidminer-studio/scripts/rapidminer-batch.sh ​"//Local Repository/demo"​

    The "//" indicates the start of a RapidMiner repository path​​

    Or directly pointing to an process file (xml/rmp):​

    • sh ./programs/rapidminer-studio/scripts/rapidminer-batch.sh ​-f "/home/demo.rmp"​

    In addition you can set macro values by adding -M as parameter, directly followed by the macro name. For example:
    • sh ./programs/rapidminer-studio/scripts/rapidminer-batch.sh "//Local Repository/demo" -Msample_size=100 

    I hope that helps you.

    Best,
    David
    MaerkliSGolbert
Sign In or Register to comment.