"Error getting IOContainer from Operator"

shadrigoshadrigo Member Posts: 9 Contributor II
edited May 2019 in Help
Hi,
perhaps this is because i am not familiar with the api so well.

I want to catch the ClusterModel from a DBSCAN Clustering.
For this I have defined a ProcessFile int the RapidMiner GUI with an Arff-ExampleSource, an DBSCAN Operator and a ClusterModelWriter.

I want to use this Processfile in Java and get the ClusterModel without writing it to the filesystem.

I load just the processfile, and try to adapt the usage of an IOContainer from the tutorial.  (RapidMiner is initialized)

Process clusterProcess = RapidMiner.readProcessFile(processFile);
Operator dbScanOperator =  clusterProcess.getOperator("DBScanClustering");
IOContainer dbscIOContainer = dbScanOperator.apply(new IOContainer());
but then i get an OperatorExceptionError:
at com.rapidminer.operator.Operator.stop(Operator.java:741)
at com.rapidminer.operator.Operator.checkForStop(Operator.java:735)
at com.rapidminer.operator.Operator.apply(Operator.java:615)

what have I forgotten or missed?

I appreciate your help

Thomas
Tagged:

Answers

  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi Thomas,
    this way you are just applying your operator, not the whole process. So the arff file is not loaded, and the clustering algorithm cannot work.
    This way it should work:
    Process clusterProcess = RapidMiner.readProcessFile(processFile);
    IOContainer dbscIOContainer = clusterProcess.run();
    ClusterModel model = dbsclOContainer.getClass(ClusterModel.class);
    Greetings,
      Sebastian
  • shadrigoshadrigo Member Posts: 9 Contributor II
    oh yes, i get it.  :D

    thank you.

    i was mistaken and thought i first define where to collect the
    data into and then grab them after the process has run.

    instead i first get my results by the run() method and then look where to get them from.

    thank you for your help sebastian!
Sign In or Register to comment.