Question



New data passed with ensemble of models?

Dr. Ballings,

Our model <- modelbuilding() output is current a list of models. Would it be okay if I throw in the newest day into that list and pass it
that way?

I'm running into trouble getting the variable to stay static by just passing it to the prediction() function. I actually found online there
may not be static variables in R without the use of the global environment to hold it?

Thanks,
Michael





Answers and follow-up questions





Answer or follow-up question 1

Dear Michael,

"Our model <- modelbuilding() output is current a list of models. Would it be okay if I throw in the newest day into that list and pass it
that way?"

Yes.

Also see my answer to your earlier question:
http://ballings.co/qa/question.php?nbr=122


"I'm running into trouble getting the variable to stay static by just passing it to the prediction() function. I actually found online
there
may not be static variables in R without the use of the global environment to hold it?"

Please elaborate on this. What do you mean with static?

Michel Ballings



Answer or follow-up question 2

No worries as long as we can pass it like that we'll be fine. Thanks for the help.

By static what I mean is in R once you run a function in R for it to hold the value of a variable, then if it's re-run to still maintain
that held value of that variable.

Ex: somewhere during modelbuilding () pass to the prediction() function the data for the newest day we're going to predict. Then when the
grader would run prediction(model), for that new data to still be held in the prediction function when it was passed earlier.

Again now that you say we can pass it when running prediction(model) we're good to go. We'll just have it in the list of models contained
in model <- modelbuilding() and be extract it from there.

Thanks,
Michael



Sign in to be able to add an answer or mark this question as resolved.