Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.
"Can a groovy script count clusters?"
awchisholm
RapidMiner Certified Expert, Member Posts: 458 Unicorn
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
This gets used later in this line
Anyway my question, before I embark on it, will it be possible to use the Groovy scrting operator to calcuate this myself?
regards
Andrew
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
numitems is set to one more than the number of examples in the last cluster.
for (int i = 0; i < model.getNumberOfClusters(); i++)
numItems = +model.getCluster(i).getNumberOfExamples();
This gets used later in this line
So leads to weird values. I think numItems += model should fix it.
PerformanceCriterion pc = new EstimatedPerformance("Number of clusters", 1.0 - (((double) model.getNumberOfClusters()) / ((double) numItems)), 1, false);
Anyway my question, before I embark on it, will it be possible to use the Groovy scrting operator to calcuate this myself?
regards
Andrew
Tagged:
0
Answers
ok, that's a typo causing a lot of headache I corrected this by removing the blank between = and +...
Additionally I have changed the behavior of the operator so that it now returns two criterions one containing the actual number.
And of course you can do this with the Grovy Scripting operator.
Greetings,
Sebastian
If you say it can be done with Groovy then I'll try it.
regards
Andrew