-
How to output JSON from "Execute Script"?
I have a script producing a JSON output. Unfortunately, this output seems to be "class java.lang.String" rather than "document", so it is not consumed by other operators. The question is - how to properly return a "document" object containing e.g. following JSON: {item_id: {$in: [36, 39]}} This should be used as EVD (Read…
-
Groovy reference
Hi, It seems it is impossible to find Groovy lang scripting reference for RapidMiner. Is it available? How to know what packages are implemented and how to access them? I cannot find any clue how to use JsonOutput class in Execute Stript object! But my question is general - where the hell is the scripting guide???
-
Text Processing extension and Java/Groovy script
I am interested in using a Groovy script to interact with the Text Processing extension. I cannot seem find any sourcecode, javadoc, etc for this extension. Is there any documention or a repository available somewhere for this extension?
-
Use ta-lib library for data minig by Execute Script (groovy)
Hello, I see the tutorial of Execute Script, that substract the mean of multiple attributes. And I would like to make something samed, data mining from technicial indicators. First, I have a financial database which describe serial temporally prices of an instrument of FOREX with the date and five attributes more (O,H, L,…
-
Execute Script - GroovyScript problem.
Hi RM Community, I'm having a small issue with my Execute Script operator. So the desired outcome is to run a script in loop example subprocess and then to append all the IOOjective Collection together into one example set. However when running this process i find that the Script alters data type of one of the attributes.…
-
"Importing Stanford CoreNLP classes in Groovy ExecuteScript"
I'm trying to utilize http://nlp.stanford.edu/software/corenlp.shtml Java library into my Groovy code in ExecuteScript operator. I'm doing import edu.stanford.nlp.*; and then StanfordCoreNLP pipeline = new StanfordCoreNLP(props); When I run the whole process there is an error that it can't locate StanfordCoreNLP class.…
-
"Get and set values using Groovy Script"
Dear All, I want to learn how to use groovy script. How to get example values for a particular attribute? and how to set example values for a particular attribute? The example by Ingo, pasted below only shows how to iterate over all attributes and all examples. This is nice, but what if you only want to iterate over all…
-
"How using NumericalMatrix in groovy"
Hello, I've written a groovy script to calculate a new matix from an exampleSet. import com.rapidminer.operator.visualization.dependencies.NumericalMatrix; import Jama.Matrix; ExampleSet exampleSet = operator.getInput(ExampleSet.class); double[][] data = new double[exampleSet.size()][exampleSet.getAttributes().size()]; int…
-
"Unable to use @Grab in Groovy script to add maven dependencies to classpath"
Hi, I want to use the "Execute Script" RM operator to run a Groovy script using the HTTPBuilder module. The Groovy script uses @Grab to add the required dependencies and runs perfectly in the GroovyConsole. But when I run it from the RapidMiner UI in the "Execute Script" operator, I get the following error : Process…
-
"Can a groovy script count clusters?"
Hello all, The Cluster Count Performance operator returns very odd values. I decided to look at the code to see what was going on and I noticed these lines in the file 'ClusterNumberEvaluator.java' at about line 90 for (int i = 0; i < model.getNumberOfClusters(); i++) numItems = +model.getCluster(i).getNumberOfExamples();…
-
"Groovy scripts: Editor"
Dear RapidMiners, thanks a lot for a great (GREAT!) script operator, the power of which I'm just about beginning to discover... it makes me think that many of the more complex flows, where the screen gets cluttered with operators each doing not much would be much better implemented as a script ... But: please, Please,…
-
"groovy script return type"
hi all i've written a script that parses association rules and returns and example set. now i want to write this example set to my database, using the "Write database" operator (i'm using a mysql db). however, when i'm trying to connect the output of my "Execute script" operator to the input of the "Write database" op, RM…
-
"Classpath to add Groovy Modules"
I'd like to use the HTTPBuilder Groovy modules, and while my groovy script works within Groovy, RapidMiner5 does not find the actual classes in the jar files. In RAPIDMINDER_HOME (on my machine set to c:\program files\rapid-i\rapidminer5\) I found a groovy-all.jar that seems to contain all class files that groovy needs. Do…
-
Create Operator or Output with Groovy
My Problem is quite simple: I want to load a Webpage with Groovy in a Text-Operator (i.e. Document) and then extract certain attributes (e.g. all * -Texts). Now I can fetch the HTML from a page with "http://rapid-i.com".toURL().text But the Script Operator does not return anything to the output, even when I use the…
-
"Load singleMacroDefinition into groovy"
Hello, I have two operators which gives input to groovy. ExampleSet exampleSet = operator.getInput(ExampleSet.class,1); ExampleSet exampleSet2 = operator.getInput(ExampleSet.class,0); One exampleSet1 is data from a database query, while exampleSet2 is from an excel file. What I would like to do, is change the input from a…