0
$\begingroup$

I'm playing with regression models in scikit-learn. The goal is to predict how much inventory we should purchase for the next 90 days. My data set has hundred of product categories. Each category has many unique features that do not apply to every category.

For Example: Shirt category could have "size" and "color" features where as the category Razors could have a "number of blades" feature.

Should I split my data up by category and make a different model for each? Or is it suffient to have one model in which I keep the products category as one of the features?

$\endgroup$
0
$\begingroup$

You should split them by category since their features do not apply to each category.

Under certain circumstances that perhaps you manage to group some categories together based on some business logic, then perhaps you can build less models.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Is this true even if I one hot encode my features? $\endgroup$ – Srule Mar 3 '19 at 13:02
  • $\begingroup$ if you can implement it, you can try both approaches and see which is better isn't it? Sometimes we even build separate models within the same category if it improve the performance. $\endgroup$ – Siong Thye Goh Mar 3 '19 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.