# Including identifier in machine learning model as feature vs separate model for every identifier

I am new to machine learning and i am building a model to predict number of customers for the model branch at specific hour/season/other feature.

I know it will be bad idea to pit id(branch_id in my case) into model but customer count in this case hugely depend on which branch it is so i cannot exclude it.

I can think of two solutions, i am not sure which one is right and what is the best practice.

1. Create dummy variable(one hot encoding to avoid wieghing one id more than other) for all branch ids,but since i have 600 unique branch ids my features will go up-to 600+rest_of_features.
2. Learn a separate model for each of the branch(600 models), i am not sure if it is right approach and also i am not very familiar with this approach and it will be very time consuming.

Looking for the suggestion

Example of the data is below

    +-----------+------+-----------+-----------+-------------------+
| branch_id | hour | feature_2 | feature_3 | Count of customer |
+-----------+------+-----------+-----------+-------------------+
|         1 |   12 |        .. |        .. |                19 |
|         1 |   01 |        .. |        .. |                25 |
|         2 |   23 |        .. |        .. |                14 |
|         2 |   01 |        .. |        .. |                 5 |
+-----------+------+-----------+-----------+-------------------+


branch_id in this case is a categorical variable, and you can treat is just like you would other categoricals (like city: "Seattle", "San Diego", "Austin"). You just need to be sure you use an algorithm that can treat it as categorical. LightGBM uses a method that sorts and optimally splits the histogram of the categorical integers, which is faster than OHE. CatBoost can leverage a few different methods.