-1

So I have trained a random forest model in R which I have converted into a pmml file. But how do you import the pmml file into Android Studio and use it for predictions? I have a hard time finding examples of this online. The model is very simple and I only have 4 features which are used to classify the input data as "A","B" or "C". So I want to, given these 4 features, be able to input that into my trained model and get an output in the app. Is there some interface that I can import and use?

desertnaut
  • 57,590
  • 26
  • 140
  • 166

1 Answers1

2

Since you already have a pmml you may better checkout this library. It's a PMML evaluator for Android. You could be able to import your pmml for inferences with it. Hope this would be useful. Note: I haven't tried this particular library myself.

Keshan
  • 14,251
  • 10
  • 48
  • 72
  • Thank you for the answer. In the installation file it say that I should go to the project root and enter "mvn clean install". How do I do that? Like in windows cmd or what? – user10309561 Sep 05 '18 at 03:21
  • Yes, first make sure you have maven installed in your system https://maven.apache.org/install.html then you have to run "mvn clean install" on cmd from project root. – Keshan Sep 05 '18 at 05:22
  • And project root, is that my Android Studio root directory? Or where should I install it? Thank you for the help – user10309561 Sep 05 '18 at 07:14