Model chosen depending on nominal value

meliniak
meliniak New Altair Community Member
edited November 5 in Community Q&A
Could any of the RapidMiner experts tell me is there any way to achieve following thing?

I want to have a single model. That model would consist of other models. Depending on a value of a chosen nominal attribute, the proper model would be used. Let's say that input data has an attribute named 'dayOfWeek'. If the value would be 'Monday', then decision tree called 'MondayModel' would be used, and so on. I hope that's clear, AFAIK that's a pretty basic approach to data mining.

Any answers, hints would be highly appreciable.  ::)

Answers

  • land
    land New Altair Community Member
    Hi,
    you could remember the model files using the remember operator with the appropriate nomial value as name. Then you could extract the data value from the example using a extract macro operator. This macro can then be used as name parameter of the recall operator. The problem is, that you can perform this only per example, so you will have to iterate over all examples using the loop examples operator. This will be rather slow compared to the normal model application performed on all examples at once.
    The other way would be to implement some sort of meta learner, that can learn different models depending on nominal attributes. But this would definitively involve coding.

    Greetings,
      Sebastian
  • meliniak
    meliniak New Altair Community Member
    Thank you very much, I will give it a try.