How To Set up RapidMiner library in Android Studio - java

I am currently working on an object recognition app. I'm using Android Studio and I have created a Neural Network model on Rapid Miner Studio and saved it as PMML. I want to apply this model on a set of extracted features in Android Studio so that I can obtain a prediction (e.g: is the object a fruit/vegetable/nut?). However, I'm not able to integrate the Rapid Miner library in Android Studio. I've downloaded "rapidminer-extension-template" from https://github.com/rapidminer/rapidminer-extension-template. Is it the correct file that should be downloaded?
I have looked for a working solution for the past 4 days but I can't seem to find one.
Do I have to use the Rapid Miner library to apply the PMML model or is it possible to use something else?

the extension template is used to create new extensions for RapidMiner, which can provide new Operators.
So in your case you would need is an interpreter of the PMML model in Android. This project looks promising, but I haven't tested it myself.
Also please note, that the Write PMML Operator of RapidMiner currently does not support Neural Network models. The help text states the supported models are :
Decision Tree Models
Rule Models
Naive Bayes models for nominal attributes
Linear Regression Models
Logistic Regression Models
Centroid based Cluster models like models of k-means and k-medoids
Also feel free to ask further, or re-post, questions in the RapidMiner community forum, especially if you have questions about extension development you can find qualified help there.

I downloaded the pmml-evaluator library and added it to my project. The documentation on GitHub helped me achieve what I was looking for; it was able to read the PMML model and provide a prediction.
Also, even if on RapidMiner's website, they say that the PMML writer's list of compatible classifiers is restricted to the ones mentioned, I was able to save the Neural Net model and use it for prediction in Android Studio.

Related

Android Open and Save String to/from Google Drive SDK

I have read allot about Google drive integration and I want to save STRING into Google drive and also to retrieve, I have used this demo but it is giving me errors.
please anyone provide me demo for my requirement
First, let's clear the confusion here. Your original question refers to a demo that uses the original RESTful API (aka DriveSDKv2), where Simple Plan mentions a different API, the new Google Drive Android API (GDAA).
The GDAA, does not have the full functionality at the moment, but it can be combined with the DriveSDKv2 to supplement what's missing (delete, description, indexable, ...). On the other hand, the GDAA takes care of all synchronization, offline and caching issues. You just create, retrieve, update the files as if they were local and the magic of up/down synchronization is left to GDAA. And the missing functionality is promised soon.
If you decide to dive into GDAA, there are 3 demos available on Github at the moment:
quick start
full-blown demo
trivial example with wrapper class to create, retrieve files/folders
Both demo and trivial examples have the create functionality with a text written to a file. If you pull any of them and step through, you'll get the idea.

Generating training data using Tess4J

I am using Tess4J to use Tesseract programmatically, which works great for recognition tasks.
Now I want to add some features that help with generating traineddata files from texts like described in this wiki article, but from Java/Tess4J. It won't matter if I have to use the "NEW Automated method" or the "Old Manual method". Both will be fine.
Does Tess4J support this or is there another binding for Java that is capable of training Tesseract?
The training is provided by other executables besides Tesseract, and they are not exposed as API or libraries. For Java-based Tesseract training, you may want to check out jTessBoxEditor project.

Generating CCD document using MDHT API

I am trying to use MDHT API to generate CCD documents. I am doing this in the following way.
Downloaded Java runtime libraries and placed them in classpath and writing code to generate all the sections using MDHT API.
Writing code for each section is taking long (a bit complicated). I was wondering if I am missing anything. Is there any open source mdht GUI that generates code for each section or am I moving in the right direction?
I am currently stuck at Medications Section/Immunization Section. Can anyone please redirect me to any examples/tutorials related to each section. I have already looked at user guide/developers guide.
Any help is appreciated.
I think MDHT API will only provide a Model for the CCD document.
if it contains any default implimentaion to generate CCD document,,i dont know..
any way better you just generate the XML in DOM,STAXs API.
CCD example link
Another better API that i found is MIRTH
follow the link
Mirth User guide
The best place to look for help/sample code is the developers forum: Eclipse Community Forums ยป Model Driven Health Tools.
You may need to create a (free) account to get access.
You could also go to the forums to post your specific MedicationsSection/immunization question for a possible specific answer.
Another good site is CDA tools: MDHT Developers Guide. Look at Produce CDA Content using MDHT API.
There are countless examples of building documents in the test code projects.
Download the All In One (MDHT_CDATools) from GitHub linked in the MDHT project site and look at the code in the test projects such as: org.openhealthtools.mdht.cda.consol.example
The closest (current) thing to a GUI based document building application in MDHT would be using the all in one to modify the existing models and generate sample snippets/documents that way (or creating a model from scratch, which includes only what you need). If you wanted the entire document produced in XML, you could then generate the instance from GeneralHeaderConstraints as opposed to any of the many child templates (which would give you snippets). Either way, this is not really the intention of the model interface (it's more for conformance) and would take you far longer to implement than using the API itself - which accesses the models which already exist in order to auto-generate conformant content quickly.

1-D barcode scanner(using images from a capturing device) implementation in java

I am a student and as a project i have to implement a barcode(1-D) based attendance marking system.While surfing across the web i came to know that barcode readers are a bit costly toys to purchase,so now what I want to do is I want to capture images of barcodes through a capturing device(mostly a webcam) and then process them to get the content stored in it.
I found a few projects on the internet that do the same but they use .NET f/w and I am not so familiar with .NET technology. The only project that uses java is http://sourceforge.net/projects/javabarcoderead/ but somehow i am not able to run the jar file they are providing.
SO, I would like to know about the algorithms or methods that can be used for the same or even any project from where i can get some insight on how to move further with this...
Happy Coding...
You're right, it would be very difficult to use a library with no documentation and no source code.
I'd suggest using ZXing. It's a well-documented library with lots of examples.

JavaNNS - Parsing the created Neural Network

I'm currently working on a Neural Network for creating a "better" PNG Predictor (Prefilter).
I already created the network (with JavaNNS) which has a quite good learning rate on 8-Bit grayscale images.
Now my next step would be to include this created network in my prepared PNG Encoder/Decoder which is written in Java. But to do that I need to parse the created .net file from JavaNNS.
I don't want to invent the wheel again so is there any chance that another one of you has already written a simple parser for the .net files of the JavaNNS which would read all the layers with the neurons, the connections and the weights on the connections and store it in any usable Java data structure?
I know it isn't that hard to create a parser, but it would be awesome to save time and skip this "boring" task.. :)
Thanks!
JavaNNS's predecessor, SNNS (alternative link), had an export function which exported the trained network as C code (essentially a header and source file pair). These files could then be used in custom code.
In Java you could use JNI or JNA to call C code and I am sure there are threads here on SO how to accomplish this.
I do not know the current version of JavaNNS, but maybe they already provide an export function exporting the network as Java code instead of C? Or you could open your trained network in the old SNNS and export it?
I just wanna add that I've created my own .net (JavaNNS) File Parser in Java. It is possible to parse single hidden layer networks. If anyone needs the code who run into the same problem I had before I am happy to share my code.
You can contact me on my blog. Here is the post about the Neural Network Project I've done. Just let a comment there and I will provide you the JavaNNS Parser and the corresponding NeuralNetwork Class.
http://prineblog.wordpress.com/2011/06/21/neural-network-as-predictor-for-image-coding-png/
I just updated the Version of Nen to Beta - It is a lightweight 3-layer neural network implementation in Java for regression and classification. A little performance comparison against support vector machines (LibSVM) demonstrates its capabilities. It can be used via command line or Java.

Categories

Resources