Я хочу сделать прогноз относительно того, сколько почтовых открыток отправляется ежедневно в каждом почтовом отделении моего города. Задача кажется простой, но я хочу предсказать, сколько открыток отправлено в каждый офис и какого типа открытки.
Код: Выделить всё
Post Offices = [001, 002, 003]
Postcards Types = [A, B, C]
Prediction target = 'Amount'
Код: Выделить всё
+----------------------+-------------+---------------+--------+--------------------+
| Date | Post office | Postcard type | Amount | Other vairables... |
+----------------------+-------------+---------------+--------+--------------------+
| 2023-01-01 | 001 | A | 23 | |
+----------------------+-------------+---------------+--------+--------------------+
| 2023-01-01 | 001 | B | 1 | |
+----------------------+-------------+---------------+--------+--------------------+
| 2023-01-01 | 001 | C | 15 | |
+----------------------+-------------+---------------+--------+--------------------+
| 2023-01-01 | 002 | A | 44 | |
+----------------------+-------------+---------------+--------+--------------------+
| 2023-01-01 | 002 | B | 6 | |
+----------------------+-------------+---------------+--------+--------------------+
| 2023-01-01 | 002 | C | 29 | |
+----------------------+-------------+---------------+--------+--------------------+
| 2023-01-01 | 003 | A | 15 | |
+----------------------+-------------+---------------+--------+--------------------+
| 2023-01-01 | 003 | B | 1 | |
+----------------------+-------------+---------------+--------+--------------------+
| 2023-01-01 | 003 | C | 10 | |
+----------------------+-------------+---------------+--------+--------------------+
| 2023-01-02 | 001 | A | 25 | |
+----------------------+-------------+---------------+--------+--------------------+
| 2023-01-02 | 001 | B | 3 | |
+----------------------+-------------+---------------+--------+--------------------+
| Rest of reigsters... | | | | |
+----------------------+-------------+---------------+--------+--------------------+
As a bonus:
If anyone gets the solution, is there a way of automating this process of classification by categorical values? Imagine that I have a new variable "Delivery success" with values ["Delivery OK", "Delivery failure"] so that I can group them by ("Date", "Post office", "Postcard type" and "Delivery success"). How canI make a model that supports this feature?
Источник: https://stackoverflow.com/questions/781 ... tm-network