Suppose I have examples of two categories, Products, and Aisles.

Each product has variables like price, weight, moisture rating etc and then Aisles has variables like max weight it can handle, moisture near it, etc.

Now I want to run some algorithm which classifies which products should go in which aisles based on product and aisles variables.

examples if product A has weight 10kg, moisture it can handle x, it should go to Aisle which can handle that weight and has that moisture rating.

Provided I have same variables across product and aisles, how can I solve my problem?

  • $\begingroup$ You make it sound like a decision tree. If the same variables (features) apply to all products, try that. $\endgroup$
    – Emre
    Jan 5, 2018 at 0:34
  • $\begingroup$ Are you looking for an algorithm like K nearest neighbors etc, or for a methodology/strategy, like some application of set theory? $\endgroup$
    – grldsndrs
    Jan 8, 2018 at 19:17

1 Answer 1


There is no generalized algorithm to match two categories of data where the dimension is different and perhaps the attribute could also be different. However you can transform the data into similar dimension. One method I would suggest you is to take PCA of both the data. After taking PCA you can pick the first k principal component of both the data making them virtually identical data with similar attributes. Then you can use k-nearest neighbour on the transformed data of Aisles to train your model. The model could be easily used to test the transformed data of products.


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.