The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Automatically apply learned classifier
Legacy User
Member Posts: 0 Newbie
Hi,
I've generated a classifier based on the learner decision trees and would
like to use this learned model for future examples to predict their classes.
How can this be accomplished? My future examples are generated by
another application that writes them into a CSV file which was also
used as IO module during the learning phase. Now, I'm wondering how
this new example can be passed to RapidMiner which automatically
applies the learned model on that example and somehow outputs the
predicted class which I could further use in another application.
Generating the example, invoking RapidMiner's JAR file and reading
the predicted class from a file should be not a problem. But I don't
know how to apply the model to the read example and how to dump
the predicted class.
Any ideas?
Regards,
Martin
I've generated a classifier based on the learner decision trees and would
like to use this learned model for future examples to predict their classes.
How can this be accomplished? My future examples are generated by
another application that writes them into a CSV file which was also
used as IO module during the learning phase. Now, I'm wondering how
this new example can be passed to RapidMiner which automatically
applies the learned model on that example and somehow outputs the
predicted class which I could further use in another application.
Generating the example, invoking RapidMiner's JAR file and reading
the predicted class from a file should be not a problem. But I don't
know how to apply the model to the read example and how to dump
the predicted class.
Any ideas?
Regards,
Martin
0
Answers
I am afraid I got you wrong... Run a process like this one (e.g. using rapidminer without gui): ...assuming that you have saved the created model before...
hope this was helpful,
Steffen
yes, this was exactly what I was looking for. :-)
After some slight modifications, the classification
of new examples works fine.
One more questions on that. Currently, I'm using the
script "rapidminer" from the scripts directory by invoking
it with "sh scripts/rapidminer/mymodel.xml". Most of the
time is spent for "Loading operators from 'operators.xml'.",
about 8 seconds for the model you have posted previously
on a Pentium4 2,66GHz. Can the application of the rapdiminer
model be somehow accelerated? Maybe rapidminer and its
operators can remain in memory when a classification must
be done multiple times.
And is this the typical way of using a previously learned rapdiminer
models by invoking the script with a process file and generate
an output in a file? Or can rapidminer be used more efficiently
in a framework where most modules are written in C++?
Regards,
Martin
Another alternative would be to invoke Java from C++ and call the RapidMiner.init() method once (taking all the time) and then just run the process from an API call - this is described in detail in the last chapter of the RapidMiner tutorial. This should also be much faster.
Cheers,
Ingo
entries in operators.xml in directory resources but could not see
any speedup. Also the removed operators were still available in
the GUI in "New Operator". I can even remove operators.xml completely
and RapidMiner still works fine. So, do I modify the right file?
you might have to run ant with target "copy-ressources" so that your changes to the operator.xml will take effect.
Regards,
Tobias