Pages: [1]
  Print  
Author Topic: Integrating rapid miner in C# application  (Read 2951 times)
Clan21
Newbie
*
Posts: 9


« on: September 09, 2009, 04:57:23 PM »

Hello   programmers,
funny circumstances force me to try run rapidminer in C#. It isnt my choice.Is there some way how to do this?
Thanks for any response.Even the crazy one.

Greetings,
Andrew Smiley
« Last Edit: September 09, 2009, 11:12:31 PM by Clan21 » Logged
Sebastian Land
Administrator
Hero Member
*****
Posts: 2418


« Reply #1 on: September 10, 2009, 11:35:08 AM »

Hi Andrew,
sounds really like fun Smiley I think you will either have to use the Java native interface JNI or use a webservice, which takes the data and runs the process on it and returns the results in an appropriate form. We currently provide some webservices, so if you don't want to write it on your own and host your own server, you might want to contact us.

Greetings,
  Sebastian
Logged

Hope to see you at RapidMiner Community Meeting and Conference (RCOMM 2011) in Dublin from June 7-10, 2011.
The Call for Paper is online now!
More information at http://www.rcomm2011.org
Clan21
Newbie
*
Posts: 9


« Reply #2 on: September 10, 2009, 05:53:49 PM »

Hi Sebastian,
thanks for reply. I look at JNI, IKVM, webservices and it look great.At this point I decrease my goals and I try using rapidminer in C# app rather than integrating.I choose simple solution via System.Diagnostics.Process.Start() method. However there is some sort of tedious problem. When i run the code in C# in Visual studio 2008 or directly from comand line, it ends up with error: [Fatal] Cannot read config file C:/Program Files/Rapid-I/RapidMiner/scripts/01_ParameterOptimization.xml! Here is the source code:

Code:
static void Main(string[] args)
 {
            
            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();
            
}

I cant imagine where is the bug.In Java via metod RapidMiner. init()  and process.run() everything works well.

Cheers,
Andrew
« Last Edit: September 11, 2009, 01:59:54 AM by Clan21 » Logged
Sebastian Land
Administrator
Hero Member
*****
Posts: 2418


« Reply #3 on: September 11, 2009, 08:33:43 AM »

Hi,
I guess, your process files is either not existing, misspelled or simply must be quoted.

Greetings,
  Sebastian
Logged

Hope to see you at RapidMiner Community Meeting and Conference (RCOMM 2011) in Dublin from June 7-10, 2011.
The Call for Paper is online now!
More information at http://www.rcomm2011.org
Clan21
Newbie
*
Posts: 9


« Reply #4 on: September 13, 2009, 12:09:37 AM »

Hi,
adding escaped quotes fix my problem.Thanks.

Cheers,
Andrew
Logged
slycom
Newbie
*
Posts: 3


« Reply #5 on: January 13, 2012, 01:17:40 PM »

Hi,

Any one used IKVM tool to run the RM from .NET application?
Logged
Pages: [1]
  Print  
 
Jump to: