1

I have a set of features as follows:

enter image description here

Where gift is categorical features and value of gift is value of the gift (numerical features). Both are the promotion. The objective is that I would like to forecast the sale for next day (or week).

My idea is embedding gift and value of gift into one vector (I call: Promotional characteristics), then It will be the new feature. I will use this features and sale to forecast.

Will my idea be correct and if possible, what is the technique to embedding gift and value of gift into one vectors?

Sherry
  • 21
  • 1
  • Is your problem here only to deal with Categorical variable (Gift) and transform it to Numerical so you can use a model with it ? If so, depending on the number of possible values, you can use One Hot Encoder or Categorical Encoder. You should check this answer : https://datascience.stackexchange.com/a/97949/101580 – Adept Aug 05 '21 at 06:40
  • Yes, I would like to deal with both Categorical variable! One hot encoder is the good method. But beside the variable of gift, there are also other feature such as weekday of the promotion. I would like to embed all thing relate to promotion (gift, value, day of promotion) into 1 vector! Correct me if my idea be wrong! – Sherry Aug 05 '21 at 06:51
  • What do you mean by one vector ? You have to keep 1 line per index (here, 1 line per day), but yoi can multiply variables with OneHot (if there's not too much) – Adept Aug 05 '21 at 07:09
  • One vector mean I would like to find a vector represent for gift variable (include gift, value of gift,...) – Sherry Aug 05 '21 at 07:12
  • OneHot will work, it'll remain 1 line (vector, of numerical data) for 1 gift – Adept Aug 05 '21 at 07:17
  • 1
    I understood your instructions! Many thanks! But it case gifl columns have lot of elements, what will be the method to replace OneHot – Sherry Aug 05 '21 at 07:49
  • I wrote something about it here : https://datascience.stackexchange.com/a/79575/101580 If you're in unsupervised, Target Encoding won't work, so you'll have either to deal with those variables or reduce by yourself (Create categories, and assign variables, like Cake and Candy > Sugar Products ; Shoes and TShirt > Clothes, so you reduce number of classes. Also, you can create a class 'Other' for products appearing not often – Adept Aug 05 '21 at 08:31

0 Answers0