"[SOLVED] Getting the Text View of ImprovedNeuralNet in CommandLine or Written"

mertmert Member Posts: 4 Contributor I
edited June 2019 in Help
Hello guys,

I am working on a bunch of files (~350) that are input for my cross-validated NueralNet model. I am trying to automate this process by using command line interface of RapidMiner. Right now what I need is to get the text view result of NueralNet in the command line or written in a file. I tried to get this done by Export options. Export Model creates some xml file, but it is really hard to find the resulting nodes, biases, thresholds in that file. This file is no way similar to the text view of NeuralNet showed on GUI.

When you check your NueralNet results in GUI, you can see the options to print or save the result as eps file etc. However, I need to write it to a file automatically and txt file is preferred in the command line.


  • MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869 Unicorn

    what do you want to do with the written models? Why not simply store them in the repository, such that you use the command line to create and store the models, and use the RapidMiner GUI to view the models comfortably from the repository?
    If you choose this approach, the Store operator is your friend. It cannot only store data, but also models.

    Best regards,
  • mertmert Member Posts: 4 Contributor I
    The reason why I want to write text view of NeuralNet is that I use the weights and bias/threshold information in that view to create a simple prediction system. I have written a script to read that text view from a txt file and create a ruby class that returns a value between 0 and 1 for given input values. For now I copy the text view from RapidMiner GUI and paste them into a txt file and save it. Since I have more than 300 input data sets to create model, I want to automate that.
  • MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869 Unicorn
    Hm, why not simply apply the Neural Net to do the prediction? ;) In that case you could create and apply all your 300 models either from within RapidMiner, or call RapidMiner from your ruby script.

    If you want to stick to the extraction of information from the models, you will have to get it from the xml created by Write Model. Another possibility would be to use the Execute Script operator to extract the features from a neural net, output them as an example set and then export them as csv.

    However, I would probably go for the first approach of doing everything with RapidMiner.
  • mertmert Member Posts: 4 Contributor I
    You are right I may simply use RapidMiner, but I am creating a simple web application that can be used by people to make their own predictions (which will be using the classes generated from text view results of NeuralNet). (This whole thing is about to make guesses on coming local elections in Turkey based on the models I generated via RapidMiner on existing past election data sets.)

    I really appreciate if you can help out with using Execute Script operator on the model generated by NeuralNet. I checked some websites to get some information about usage, but I think I need further assistance.
  • mertmert Member Posts: 4 Contributor I
    I think I find a solution. By enabling Expert Mode (Top Menu > View > Expert Mode), I can make log information written to a file. I changed logverbosity to all and get all the NeuralNet text view results written to log file. Then, using bash scripts I extracted final result from that file.
  • MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869 Unicorn
    Ok, I would really use a different approach (e.g. deploy the process  as webservice via RapidAnalytics), but anything that makes you happy is fine ;)

    Happy Coding!
Sign In or Register to comment.