Understanding Rapid Miner Model Values

ml_guyml_guy Member Posts: 11 Contributor II
edited November 2018 in Help
I want to train the model using RapidMiner and test using my own evaluator function in C#. For that purpose, I want to interpret the model values so that I can use it in c#.

As per my knowledge, RapidMiner uses a common format for its model files where the first line lists the learner used like
and then there is long list of attributes ID/Values  ???

what may be a good starting point in this direction?


  • ml_guyml_guy Member Posts: 11 Contributor II
    I know that for very complex models interpretation may be hard, but how about interpreting Naive Bayes and Linear Regression Model values?
  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    you could spend ages for reimplementing the model application functionality in C#, then again spend some years testing if the results are the same as in RapidMiner and finally you will ask yourself, why you didn't rewrite the evaluation in java. This should be easier, isn't it?

    At least it should be easier to use the JNI interface to connect to your C# or use some sort of a webservice for this. I don't see any other feasible solution, unless you are willing to wait, until we publish the PMML Export Extension, which will export some of the models in a standardized way.

  • ml_guyml_guy Member Posts: 11 Contributor II
    Hi Sebastian,

    You are absolutely right but my requirements are little different.

    The aim of my project is to show the efficiency of supervised learning algorithms in .Net (Training time doesn't matter, Testing time do). To this end, I tried JNI to evaluate my models but they are taking too much time in marshaling/de-marshalling rather than the actual processing. Web services are, I believe, slower than JNI.

    Now I am thinking to show the runtime of at least some simple algorithms like Naive Bayes by training the model in RapidMiner and using that in my C# evaluator. For Naive Bayes testing, I believe we need prior and posterior probabilities. If I am able to parse the RM model, I can use the values in .Net. Similarly for SVM, if there is some way to output the model in LibSVM format, I can use LibSVM implementation of C# to use that.

    Lastly, how much (tentatively) we will have to wait for PMML Export Extension of RM algorithms?

    Best Regards,

  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi Gerrard,
    if you really need it (and if it's still easier than reimplementing the learning algorithms in .net, too), I would write them out as pure xml. This should be quite understandable. Each member variable of the model class is represented by an xml tag of the same name. If you take the source code of the rapid miner model, you will see, which member variable is used for what.
    More complex models might become more complicated, but naive bayes is simple.

Sign In or Register to comment.