Hi guys,
I'm searching for an elegan solution of the following problem: to train multiple instances of a predictor, separated by the value of an attribute.
Example: say I have a "Country" attribute in may data, and the nomial values of Country are "US" and "UK".
I could design my process in this way (may in 2 separated files..) and everything would works fine.

Or I could create a loop on the attributes that would do the same job:

and my question is: is there any component or modelling tecnique to implement a logic that is splitting the data based on an attribute (country, in this example) and generating different instances of the model?

Many thanks for your help!
Thanks,
Matteo