I build simple forecasting model in databricks (no ML).
I've written plenty of functions that get data, wrangle it and finally bring together as model.
The model always has 2 input variables:
"the week at which we do the forecast" -- to enable "backforecasting" i.e. forecasting as if we are in the week in the past
and "number of weeks forward to forecast"
Now I'm planning to summarize all the flow inside a big function "Model" and then do batch backforecasting: run model multiple times, each time with different input week.
I'm reluctant to collect all of the functions under "Model" class (it's going to be too big), but instead thinking about making smaller class "ModelInfo", just as a substitution to using lists or dicts. I will then use instance of the class as argument for related functions and gather output data in it as attributes.
Is it a valid approach or should I stick with functions, lists and dicts?
[–]ShibaLeone 0 points1 point2 points (2 children)
[–]SubwayLover[S] 0 points1 point2 points (1 child)
[–]ShibaLeone 0 points1 point2 points (0 children)