Apply model for each variable or leave them as factor? Imagine you want to predict ice-cream stock in your factory (by flavor). You have data like this:

Which makes more sense / is better?

*

*Make flavor a factor and train the whole dataset

*Group by flavor and train each flavor independently

Is there any difference?

In general this appears as an important issue in practical ML applications in business, i.e., monolithic model  vs. per-factor model. If target variable's distribution changes significantly within factors, i.e., categories, then building per-factor models would be better.
