# M5 model in ensemble [closed]

I am using the M5 model implemented in the RWeka package for predicting a continues variable based on several independent, ecological variables.

model  <- M5P(T_apr  ~ ., data=train)


I would like to use this to further build an ensemble model in R, but I'm having difficulties finding a way how to do this. Therefore my question: how to build an ensemble using M5 models in R?

## closed as off-topic by Tim♦Mar 20 '18 at 11:31

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question appears to be off-topic because EITHER it is not about statistics, machine learning, data analysis, data mining, or data visualization, OR it focuses on programming, debugging, or performing routine operations within a statistical computing platform. If the latter, you could try the support links we maintain." – Tim
If this question can be reworded to fit the rules in the help center, please edit the question.

• You should probably state which ensemble method you want to utilize (model averaging, bagging, boosting, ...), and take a look at the caret package and caretEnsemble. Be aware that ensemble building should be part of the training+evaluation process. – geekoverdose Jul 5 '16 at 8:27
• It isn't clear to me if you're asking a conceptual question about ensembles or a coding question (how to implement them in R). Note that the latter is off-topic here, see our help center – Silverfish Jul 5 '16 at 8:59
• My question is conceptual, to get a direction. I tried ipred package, but it works with regression trees, where leafs are constants. I need to work with M5, where leafs are represented by regression models. I didn’t state, which ensemble method I want, because I want to test more than just one (I know bagging, boosting and Random Forest). But I could start with bagging. I will go through caretEnsamble package and come back to you with my feedback. If there is any other suggestion, I am open for it. – JerryTheForester Jul 5 '16 at 10:31