# BlueYonder Hackathon at Pycon/PyData 2024 — Data

来源：https://www.kaggle.com/competitions/blueyonder-hackathon-at-pyconpydata-2024/data

本地 Meta Kaggle 快照；不是本次实时页面。

# Dataset Description

The data for for this competition contains around three years of historical sales data for for 200 products in 20 retail stores. The data is present on a product-retail store-day (P_ID – L_ID – DATE) level, meaning every row contains the day-aggregated sales sum for a given product in a given store at a given price point.

Every product is part of a product group hierarchy tree, where PG_ID_1 is the highest level and PG_ID_3 represents the lowest level in the hierarchy. Product '118' for example is part of product group '29' (PG_ID_3), which on the product group level tree is one level below product group '4' (PG_ID_2) and two levels below 'product group '2' (PG_ID_1). So the hierarchy for the product is '2' --> '4' --> '29' (from level 1 to 3). All products are hereby assigned to the lowest level in the hierarchy (PG_ID_3) which in turn means that the top two hierarchy levels (PG_ID_1 and PG_ID_2) don't have products directly assigned to them.

The sales area of every retail store location (L_ID) is contained within the 'SALES_AREA' column. The sales area does not vary over time for a given location and is independent of the product. It simply expresses the whole floor space that is available for selling products within the retail store location.

Additionally, the data contains the information on whether there was an event happening on a given transaction (EVENT column, e.g. Christmas), whether there were school holidays (SCHOOL_HOLIDAY column).

Lastly, there are three price and promotion related columns. NORMAL_PRICE contains the non-discounted list price of the product in a given store on a given date. If there was no promotion active (PROMOTION_TYPE column is then == 0) the SALES_PRICE column equals the NORMAL_PRICE. If there was a special promotion active (PROMOTION_TYPE column is then > 0), the SALES_PRICE will be smaller than the NORMAL_PRICE. In any case the SALES_PRICE represents the customer-facing price at which the product in a given store on a given day was purchased for.

**Goal: Your challenge is to use the provided training dataset to train a Cyclic Boosting model (or any other ML model) tor beat our baseline on the provided test dataset**

## Files

*   **train.parquet** - the training set
*   **test.parquet** - the test set in the evaluation period, obviously without actual sales
*   **sample_submission.csv** - a sample submission file in the correct format

## Columns

- `P_ID` - Unique identifier of the product that is sold in a given location on a given date (integer)
- `PG_ID_3` - 3rd and lowest level in the product group hierarchy that the product (P_ID) is assigned to directly. Sits below PG_ID_2`. (integer)
- `PG_ID_2` - 2nd and middle level in the product group hierarchy, that sits between PG_ID_3 and PG_ID_2. No products are directly assigned to this level (integer)
- `PG_ID_1` - 1st and highest level in the product group hierarchy, that sits above PG_ID_2. No products are directly assigned to this level (integer)
- `NORMAL_PRICE` - The non-discount list price for which a product is sold at in a given store on a given date, excl. price reductions (float)
- `L_ID` - Unique identifier of the location in which a product is sold on a given date (integer)
- `SALES_AREA` - Time- and product-independent floor space in a retail location (L_ID) (integer)
- `STOCKS` - Per day available morning stocks (maximum amount of sales for the day) per product in a retail location (integer)
- `DATE` - The date on which the products were sold in a given retail store (datetime)
- `SCHOOL_HOLIDAY` - Flag indicating whether there were school holidays for a given sales record (float)
- `EVENT` - Indicating whether there was an active event for a data record. Possible events are 'Christmas', 'Labour_Day', 'Local_Holiday_2', 'Local_Holiday_0', 'Local_Holiday_1', 'German_Unity', 'Other_Holiday' and 'Easter', otherwise None (category/string)
- `PROMOTION_TYPE` - The promotion type (in reality this could be TV advertisement, price reduction, etc.) that was applied for a given sales record. 0 indicates no promotion being active (integer)
- `SALES_PRICE` - The final, customer-facing price for which a product is sold at in a given store on a given date. If there is a PROMOTION_TYPE !=0 then the SALES_PRICE can be smaller than the NORMAL_PRICE, else SALES_PRICE = - `NORMAL_PRICE` (float)
- `SALES` - The total sum of units of a product (P_ID) that was sold in a given retail store (L_ID) on a given day (DATE) (integer)