Vote Model with Attribute Selection for Inner Learners?

srt19170
srt19170 New Altair Community Member
edited November 5 in Community Q&A
I'm trying to create a process which uses the Vote operator to train three inner learners.  Each inner learner is trained on a different subset of the attributes using Select Attribute -- i.e., one Linear Regression on Att1 & Att2, another Linear Regression on Att3 & Att4, and a Neural Network on Att5 & Att6.

This part works fine.

However, if want to Apply the model produced by Vote, I get an errors like this:

Aug 26, 2011 12:10:40 AM WARNING: LinearRegression: The number of regular attributes of the given example set does not fit the number of attributes of the training example set, training: 2, application: 10

Presumably because the model produced by Vote doesn't recreate the Select Attributes.

How should I handle this?

(BTW, I find it almost impossible to find anything with the search function on this forum, but I apologize if this has been addressed before!)

-- Scott
Tagged:

Answers

  • MariusHelf
    MariusHelf New Altair Community Member
    You are right, the voting model contains only the models created by it's inner operators, not the preprocessing steps. The linear regression however, *in it's current implementation*, does not care if there are more attributes in the test set than in the training set, as long as the training attributes are still there. I am currently not sure how the neural net handles this.
  • srt19170
    srt19170 New Altair Community Member
    Marius, thanks for the response.  I was actually aware that it will work for Linear Regression and a few other learners, but in general it will cause a failure or erroneous results.  My real question is whether it is possible to build a voting model that will incorporate any preprocessing.  The Vote operator seems fairly useless otherwise; it's rarely going to be the case where you want all the inner learners to take exactly the same data set.
  • MariusHelf
    MariusHelf New Altair Community Member
    Unfortunately, the effect of Select Attributes operator cannot be stored in a model. If however the preprocessing operator produces a preprocessing model, you can use the Group Models operator inside the voting operator.

    For your specific problem some manual work is necessary. You could e.g. train your models and then apply them with their preprocessing steps by hand on the same data, and Join the results together. Then with the Generate Aggregation operator you can calculate the final label. For nominal labels the "mode" aggregate function is what you are looking for.