Casting IOObjectCollection into ValueSeries [SOLVED]

kuehn
kuehn New Altair Community Member
edited November 5 in Community Q&A
Hello,

I got a message from rapid-miner I don't understand.
The input data for the Extract Average Element is an emty set, so maybe it's that.
On the one hand I am confused because the message/expception covers a casting problem (see log below).
On the other hand it's difficult to understand because there is a handle exception element around the failed subprocess.

The validation finishes without any error or warning message.

Jan 11, 2012 2:46:12 PM SEVERE: Process failed: operator cannot be executed (com.rapidminer.operator.IOObjectCollection cannot be cast to com.rapidminer.operator.valueseries.ValueSeries). Check the log messages...
Jan 11, 2012 2:46:12 PM SEVERE: Here:           Process[1] (Process)
          subprocess 'Main Process'
            +- Read MSSQL 2008 publn[1] (Read Database)
            +- Store[1] (Store)
            +- Read MSSQL 2008 citn[1] (Read Database)
            +- Store (2)[1] (Store)
            +- pat_publn_retrieve[1] (Retrieve)
            +- Collect[1] (Collect)
            +- Multiply (5)[1] (Multiply)
            +- Append (3)[1] (Append)
            +- Loop p in patent[1] (Loop Examples)
          subprocess 'Example Process'
            |     +- Retrieve[1] (Retrieve)
            |     +- Rename[1] (Rename)
            |     +- load esPatentSummaryDates (2)[1] (Handle Exception)
          subprocess 'Try'
            |     |  |  +- load esPatentSummaryDates[1] (Recall)
          subprocess 'Catch'
            |     +- Extract Macro[1] (Extract Macro)
            |     +- Filter Examples[1] (Filter Examples)
            |     +- Join[1] (Join)
            |     +- Handle Exception[1] (Handle Exception)
          subprocess 'Try'
            |     |  |  +- for pc in pcs (2)[1] (Loop Examples)
          subprocess 'Example Process'
            |     |  |        +- load esPatentCitationDates (3)[0] (Handle Exception)
          subprocess 'Try'
            |     |  |        |  |  +- load esPatentCitationDates (4)[0] (Recall)
          subprocess 'Catch'
            |     |  |        +- Extract Macro (3)[0] (Extract Macro)
            |     |  |        +- Filter Examples (3)[0] (Filter Examples)
            |     |  |        +- Multiply (6)[0] (Multiply)
            |     |  |        +- Select Attributes (4)[0] (Select Attributes)
            |     |  |        +- Select Attributes (5)[0] (Select Attributes)
            |     |  |        +- Generate ID (3)[0] (Generate ID)
            |     |  |        +- Generate ID (4)[0] (Generate ID)
            |     |  |        +- Join (3)[0] (Join)
            |     |  |        +- Generate Attributes (2)[0] (Generate Attributes)
            |     |  |        +- Select Attributes (6)[0] (Select Attributes)
            |     |  |        +- Collect (5)[0] (Collect)
            |     |  |        +- Append (4)[0] (Append)
            |     |  |        +- Multiply (7)[0] (Multiply)
            |     |  |        +- Collect (6)[0] (Collect)
            |     |  |        +- save esPatentCitationDates (2)[0] (Remember)
          subprocess 'Catch'
            |     |     +- Set Macro[0] (Set Macro)
            |     +- Print to Console[1] (Print to Console)
      ==>   |     +- Extract Average[1] (Extract Average)
            |     +- Append[0] (Append)
            |     +- Multiply (3)[0] (Multiply)
            |     +- Multiply (4)[0] (Multiply)
            |     +- save esPatentSummaryDates[0] (Remember)
            +- Collect (4)[0] (Collect)
            +- Extract Average (2)[0] (Extract Average)

if the input is not an empty set thereI got another message :
Jan 11, 2012 3:18:04 PM SEVERE: Process failed: operator cannot be executed (com.rapidminer.example.set.SimpleExampleSet cannot be cast to com.rapidminer.operator.valueseries.ValueSeries).
This message makes sense, but there is failing an exception that offers an Bugreport.

Is this a Bug ?

Thanks for your help!
Tagged:

Answers

  • [Deleted User]
    [Deleted User] New Altair Community Member
    Hi kuehn,

    The operator Extract Average is dealing with Value Series but examining your log it seems that you connect a collection to the input port of that operator.
    Using the operator Data To Series you can transform an ExampleSet (you would have to use the Append operator before that one to transform the collection into an ExampleSet) into a series object which can then be processed by the Extract Average operator.

    If you simply want to compute the average value of two attributes you can use the Generate Attributes operator.

    By the way: This operator is located inside the catch block of the Handle Exception operator so it is correct that the process stops when an error occurs here.

    Best,

    Edin Klapic

  • kuehn
    kuehn New Altair Community Member
    Thank you , i am going more and more familar with this very sexy software.

    But the operator it self is inside another try block .. that is what i can't understand.

    But i'm missing a summary which gives a short summary for all elements (i don't mean the tool insided one).
  • [Deleted User]
    [Deleted User] New Altair Community Member
    Hi Uwe,

    as far as I can see your Extract Avergage operator is located inside the blue catch block which is inside the red catch block:

              subprocess 'Main Process'
                +- Read MSSQL 2008 publn[1] (Read Database)
                ...
                subprocess 'Example Process'
                      |    +- Retrieve[1] (Retrieve)
                      |    +- Rename[1] (Rename)
                      |    +- load esPatentSummaryDates (2)[1] (Handle Exception)
                                    subprocess 'Try'
                                              |    |  |  +- load esPatentSummaryDates[1] (Recall)
                                    subprocess 'Catch'
                                              |    +- Extract Macro[1] (Extract Macro)
                                              |    +- Filter Examples[1] (Filter Examples)
                                              |    +- Join[1] (Join)
                                              |    +- Handle Exception[1] (Handle Exception)

                                                              subprocess 'Try'
                                                                            |    |  |  +- for pc in pcs (2)[1] (Loop Examples)
                                                                            subprocess 'Example Process'
                                                                                          |    |  |        +- load esPatentCitationDates (3)[0] (Handle Exception)

                                                                                        subprocess 'Try'
                                                                                                        |    |  |        |  |  +- load esPatentCitationDates (4)[0] (Recall)
                                                                                          subprocess 'Catch'
                                                                                                        |    |  |        +- Extract Macro (3)[0] (Extract Macro)
                                                                                                      ...
                                                                                                        |    |  |        +- save esPatentCitationDates (2)[0] (Remember)

                                                            subprocess 'Catch'
                                                                            |    |    +- Set Macro[0] (Set Macro)
                                                                            |    +- Print to Console[1] (Print to Console)
                                                                  ==>  |    +- Extract Average[1] (Extract Average)
                                                                            ...
                                                                                  +- Extract Average (2)[0] (Extract Average)



    If I get you right you miss a summary with operator descriptions.
    There is no such summary available and please take into account that RapidMiner is Open Source and we somehow have to earn money so we can develop RapidMiner further and answer questions in the forum. ;)

    Best,
    Edin
  • kuehn
    kuehn New Altair Community Member
    Hi Edin,

    thank you for the answer,
    yes it's (better it was) correct, that the extract operator is in the try catch block, because I would  in the first iteration take care  that an valid result for the outside returns.

    I know that RM is OS and that there are ressources are limited.
    I plan to go into that great Project, may be as an Developer.

    Unfortunately .. the posted process has changed and so i should set this Entry as solved.

    Ciao
    Uwe