Using the model to classify new data

kyleoliva14kyleoliva14 Member Posts: 7 Contributor I
edited December 2018 in Help

I used the Write Model operator to save my model as an .xml file.

Is it possible to use this .xml file in a java app? Like load the model then use this model to classify new data.

Tagged:

Answers

  • Telcontar120Telcontar120 Moderator, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,150   Unicorn

    No, that model file is designed to be utilized only by RapidMiner.  You can try exporting your model as PMML, which can be read by some other programs.  But not all model types are compatible with PMML and there are several different versions/implementations so it isn't foolproof in any regard.

    Why don't you just do the future scoring inside RapidMiner?  Or make its scoring process accessible as a web service?

    Brian T.
    Lindon Ventures 
    Data Science Consulting from Certified RapidMiner Experts
    sgenzer
  • IngoRMIngoRM Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University Professor Posts: 1,597  RM Founder

    I am with Brian here.  It is definitely easier to use the RapidMiner platform for scoring.  You should check out RapidMiner Server, its web services, and the new super-fast job agents for this:

     

    https://rapidminer.com/products/server/

     

    However, if you absolutely have to hack your code yourself, you can build the model application process in RapidMiner which loads this model XML file and applies it to new data.  The result can then be passed back to your application.

     

    This discussion here might be helpful for this and there is some documentation also on our docs site:

     

    https://community.rapidminer.com/t5/Developer-Forum/RM-integration-to-Java-Text-Mining-Repository-Problem/m-p/26449

     

    Cheers,

    Ingo

    sgenzerThomas_Ott
Sign In or Register to comment.