1

I am trying to use Amazon forecast for the first time.

After reading the documentation, I want to manually fill the missing values in my dataset. I want to make sure that Amazon understands well what I am sending.

My missing values are mainly divided into two categories:

  • Days when an item was in stock and was not sold (real 0)
  • Days when an item was out of stock and was not sold (NaN according to Amazon docs)

So in my dataset, I made this:

+---------+------------+--------+
| item_id | timestamp  | demand |
+---------+------------+--------+
|     299 | 2020-01-01 | 0      |
|     320 | 2020-01-01 | NaN    |
+---------+------------+--------+

Does Amazon is going to understand the string NaN that I've included in the dataset? I can't understand from the documentation if NaN is just a method that Amazon can use to automatically fill missing values or if I can actually include those values in my dataset.

Thank you for your help

Hammerbot
  • 15,696
  • 9
  • 61
  • 103

1 Answers1

0

NaN should not be a string, it should be a true NaN object. Then be sure to adjust the filling logic, like so:

{
    "AttributeName": "target_value",
    "FeaturizationPipeline": [
         {
             "FeaturizationMethodName": "filling",
             "FeaturizationMethodParameters": {
                 "aggregation": "sum",
                 "middlefill": "nan",
                 "backfill": "nan"
             }
         }
     ]
 }
mdrishan
  • 469
  • 3
  • 15