I have a dataset of streets - and each street contains several houses.

street_id | house_id | number of calls | number of people living | etc...
1         | 1        | 10              | 5
1         | 2        | 3               | 1
2         | 3        | 4               | 2
2         | 4        | 15              | 19
  1. My goal is to find for each street, the most popular house.
  2. I have GT - streets with several houses, and for each street, which house was the most popular house.
  3. For the data example above - the results should be (street 1 -> house 1, street 2 -> house 4) because houses #1, #4 are the most popular in their street.
  4. Popular will be determined with classification algorithm - we have much more features than the 2 above (they are just for example). That's why we have the GT for - so our algorithm can learn what popular is.

We can find the most popular street using features about each house -

  • number of calls made from house
  • number of people living in house
  • etc

But we don't need to find all of the popular houses from all of the houses - we need for each street, to find the most popular house.

Do you know how can I solve this task?
I've thought about regular classification, but that would results giving all of the popular houses, and not one for each street.

Thanks in advance!

  • 2
    $\begingroup$ What's "GT"? Please spell out the acronyms. $\endgroup$ – D.W. Oct 8 '20 at 0:08

You will have to restructure your data in such a way that one input contains data pertaining to only one street (but of all the houses.) This involves grouping the data by street_id.

You should then use several inputs in such a way to train your model to find out the popular house. Since it will be a supervised-learning task, you'll have to label your data accordingly.

But there's a problem here. Each street has different number of houses. One way to handle this problem is by fixing an upper bound on the number of houses per street and padding your data up to this upper bound.


Kedaar, but restructure our data in such a way that one input contains one street, I will classify streets - and not houses. And that's not the goal.
Or you meant each time you classify all of the houses in one street.


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.